Skip to content

Commit

Permalink
Display full ParPar output on full test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
animetosho committed Dec 11, 2024
1 parent e2a68cf commit a3b9921
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ jobs:
with:
node-version: ${{ matrix.version }}
- run: npm install --production
- run: node ${{ matrix.flags }} par-compare.js -f
- run: node ${{ matrix.flags }} par-compare.js -f -v
working-directory: test
8 changes: 5 additions & 3 deletions test/par-compare.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ var skipFileCreate = true; // skip creating test files if they already exist (sp
var pruneCache = false; // prune unused keys from cached results


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

var fs = require('fs');
var crypto = require('crypto');
Expand Down Expand Up @@ -220,7 +222,7 @@ function par2_args(o) {
return a.concat([o.out], o.in);
}
function parpar_args(o) {
var a = ['-q'];
var a = verbose ? [] : ['-q'];
// TODO: tests for multi file generation
if(o.blockSize) a.push('--input-slices='+o.blockSize+'b');
if(o.inBlocks) a.push('--input-slices='+o.inBlocks);
Expand Down Expand Up @@ -582,7 +584,7 @@ async.timesSeries(allTests.length, function(testNum, cb) {
proc.execFile(exeNode, execArgs, function(err, stdout, stderr) {
timePP = Date.now() - timePP;
if(err) {
console.error('Error info: ', err);
console.error('Error occurred after ' + (timePP/1000) + '; std output: ');
process.stdout.write(stdout);
process.stderr.write(stderr);
throw err;
Expand Down

0 comments on commit a3b9921

Please sign in to comment.