Skip to content

Commit a3b9921

Browse files
committed
Display full ParPar output on full test failure
1 parent e2a68cf commit a3b9921

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.github/workflows/test-full.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ jobs:
3333
with:
3434
node-version: ${{ matrix.version }}
3535
- run: npm install --production
36-
- run: node ${{ matrix.flags }} par-compare.js -f
36+
- run: node ${{ matrix.flags }} par-compare.js -f -v
3737
working-directory: test

test/par-compare.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ var skipFileCreate = true; // skip creating test files if they already exist (sp
1616
var pruneCache = false; // prune unused keys from cached results
1717

1818

19-
var fastTest = process.argv.slice(2).indexOf('-f') > -1;
19+
var procArgs = process.argv.slice(2);
20+
var fastTest = procArgs.indexOf('-f') > -1;
21+
var verbose = procArgs.indexOf('-v') > -1;
2022

2123
var fs = require('fs');
2224
var crypto = require('crypto');
@@ -220,7 +222,7 @@ function par2_args(o) {
220222
return a.concat([o.out], o.in);
221223
}
222224
function parpar_args(o) {
223-
var a = ['-q'];
225+
var a = verbose ? [] : ['-q'];
224226
// TODO: tests for multi file generation
225227
if(o.blockSize) a.push('--input-slices='+o.blockSize+'b');
226228
if(o.inBlocks) a.push('--input-slices='+o.inBlocks);
@@ -582,7 +584,7 @@ async.timesSeries(allTests.length, function(testNum, cb) {
582584
proc.execFile(exeNode, execArgs, function(err, stdout, stderr) {
583585
timePP = Date.now() - timePP;
584586
if(err) {
585-
console.error('Error info: ', err);
587+
console.error('Error occurred after ' + (timePP/1000) + '; std output: ');
586588
process.stdout.write(stdout);
587589
process.stderr.write(stderr);
588590
throw err;

0 commit comments

Comments
 (0)