testaro 4.2.6 → 4.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/batchify.js +1 -0
- package/create.js +6 -5
- package/package.json +1 -1
- package/samples/scripts/{tsp10.json → tp10.json} +1 -1
package/batchify.js
CHANGED
package/create.js
CHANGED
|
@@ -21,9 +21,10 @@ const reportDir = process.env.REPORTDIR;
|
|
|
21
21
|
// ########## FUNCTIONS
|
|
22
22
|
|
|
23
23
|
// Runs one script and writes a report file.
|
|
24
|
-
const runHost = async (id, script) => {
|
|
24
|
+
const runHost = async (id, script, host = {}) => {
|
|
25
25
|
const report = {
|
|
26
26
|
id,
|
|
27
|
+
host,
|
|
27
28
|
log: [],
|
|
28
29
|
script,
|
|
29
30
|
acts: []
|
|
@@ -43,16 +44,16 @@ exports.runJob = async (scriptID, batchID) => {
|
|
|
43
44
|
// If there is a batch:
|
|
44
45
|
let batch = null;
|
|
45
46
|
if (batchID) {
|
|
46
|
-
// Convert the script to a batch-based set of scripts.
|
|
47
|
+
// Convert the script to a batch-based set of host scripts.
|
|
47
48
|
const batchJSON = await fs.readFile(`${batchDir}/${batchID}.json`, 'utf8');
|
|
48
49
|
batch = JSON.parse(batchJSON);
|
|
49
50
|
const specs = batchify(script, batch, timeStamp);
|
|
50
|
-
// For each script:
|
|
51
|
+
// For each host script:
|
|
51
52
|
while (specs.length) {
|
|
52
53
|
const spec = specs.shift();
|
|
53
|
-
const {id, script} = spec;
|
|
54
|
+
const {id, host, script} = spec;
|
|
54
55
|
// Run it and save the result with a host-suffixed ID.
|
|
55
|
-
await runHost(id, script);
|
|
56
|
+
await runHost(id, script, host);
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
59
|
// Otherwise, i.e. if there is no batch:
|
package/package.json
CHANGED