From 9e93b06c2a49b5497f06cf8109065fddcee635a6 Mon Sep 17 00:00:00 2001 From: Morgan Allen Date: Sun, 29 Jul 2018 13:34:17 -0700 Subject: [PATCH] prepare to move to dynamic fixture selection --- test/test.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/test.js b/test/test.js index 203c71e..90bdd1c 100644 --- a/test/test.js +++ b/test/test.js @@ -9,6 +9,9 @@ const portString = "/dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge const buildPath = path.join(__dirname, "lora32", "build"); +const TB_DEV1 = process.env.TB_DEV1 || "0000"; +const TB_DEV2 = process.env.TB_DEV2 || "0001"; + var args = [ "--chip", "esp32", @@ -105,20 +108,20 @@ async.series([ async.parallel([ function(done) { - flash(portString.replace("SERIAL_ID", "0001"), done); + flash(portString.replace("SERIAL_ID", TB_DEV1), done); }, function(done) { - flash(portString.replace("SERIAL_ID", "0002"), done); + flash(portString.replace("SERIAL_ID", TB_DEV2), done); }], next); }, function(next) { async.parallel({ dev1: function(done) { - serial(portString.replace("SERIAL_ID", "0001"), done); + serial(portString.replace("SERIAL_ID", TB_DEV1), done); }, dev2: function(done) { - serial(portString.replace("SERIAL_ID", "0002"), done); + serial(portString.replace("SERIAL_ID", TB_DEV2), done); } }, next); }