prepare to move to dynamic fixture selection
This commit is contained in:
parent
8be54a6858
commit
9e93b06c2a
1 changed files with 7 additions and 4 deletions
11
test/test.js
11
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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue