Skip to content

Commit

Permalink
test: don't polute TAP output with test debug
Browse files Browse the repository at this point in the history
  • Loading branch information
rmg committed Jul 26, 2016
1 parent 3d45dde commit 05e0875
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion test/load-msg-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function secondaryMgr(rootDir, lang, t, aml, positive, callback) {
msgFound.push(msg.message);
if (msgFound.length === (msgWanted[lang].length + 1)) {
for (var i = 0; i < msgFound.length - 1; i++) {
console.log('checking', msgWanted[lang][i]);
t.comment('checking', msgWanted[lang][i]);
if (positive) {
t.match(msgFound[i + 1], msgWanted[lang][i],
lang + ' message ' + i.toString() + ' is correct.');
Expand Down
10 changes: 5 additions & 5 deletions test/slt-test-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function testHarness(t, targets, noFixtures, testCallback, testAllDone) {
function checkErrMsg(outMsg, errMsg, key, targets, t) {
outMsg = stripRootDirInfo(outMsg, key);
errMsg = stripRootDirInfo(errMsg, key);
if (DEBUG) console.log(
if (DEBUG) t.comment(
'\n<<< BEGIN', key,
'\nout ________________\n',
outMsg,
Expand Down Expand Up @@ -119,19 +119,19 @@ function testHarness(t, targets, noFixtures, testCallback, testAllDone) {
keys.forEach(function(key) {
if (noFixtures) {
var dir = path.join(destDir, key);
console.log('--- making dir: %s', dir);
t.comment('--- making dir: %s', dir);
shell.mkdir('-p', dir);
console.log('----- made dir: %s', dir);
t.comment('----- made dir: %s', dir);
} else {
var dir = path.join(__dirname, 'fixtures', key);
copyDirs.push(dir);
}
});
if (!noFixtures) {
console.log('--- copying %d: %s to %s',
t.comment('--- copying %d: %s to %s',
copyDirs.length, JSON.stringify(copyDirs, null, 2), destDir);
shell.cp('-r', copyDirs, destDir);
console.log('---- copied %d: %s to %s',
t.comment('---- copied %d: %s to %s',
copyDirs.length, JSON.stringify(copyDirs, null, 2), destDir);
}
var asyncTasks = [];
Expand Down
6 changes: 3 additions & 3 deletions test/test-load-msg-forking.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var cluster = require('cluster');
test('secondary test on forking', function(t) {
if (cluster.isMaster && !process.argv[2]) {
var msg = f('Master is %s', process.pid);
console.log(msg);
t.comment(msg);
cluster.setupMaster({
exec: __filename,
args: ['second_invoke'],
Expand All @@ -26,11 +26,11 @@ test('secondary test on forking', function(t) {
cluster.fork();
cluster.on('online', function(worker) {
msg = f('Worker %s has started', worker.process.pid);
console.log(msg);
t.comment(msg);
});
cluster.on('exit', function(worker) {
msg = f('Worker %s has completed', worker.process.pid);
console.log(msg);
t.comment(msg);
t.end();
});
} else if (cluster.isWorker) {
Expand Down

0 comments on commit 05e0875

Please sign in to comment.