From c5ed940555d9e9a4864a9d46304deea835bfaebf Mon Sep 17 00:00:00 2001 From: Brian Terlson Date: Sat, 15 Nov 2014 15:54:47 -0800 Subject: [PATCH] Fix file cleanup for console runner --- bin/run.js | 13 +++++++++++++ lib/runners/console.js | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/bin/run.js b/bin/run.js index 846142d..5ebcbc5 100755 --- a/bin/run.js +++ b/bin/run.js @@ -32,7 +32,18 @@ var Tributary = require('stream-bifurcate') var scenarios = require('../lib/scenarios'); var readFile = _.wrapCallback(fs.readFile); var DEFAULT_BATCH_SIZE = 75; + +if(args.config) { + require(path.join(process.cwd(), args.config)); +} + +var t262 = require('../index') +console.log(t262.config); + +console.log() + var Runner = loadRunner(); +console.log(Runner); // default to console runner if passing console command if(args.consoleCommand && args.runner === 'node') { @@ -121,6 +132,8 @@ function scenarioStream(test) { // Load the runner function loadRunner() { + if(t262.config.runner) return t262.config.runner; + try { return require('../lib/runners/' + args.runner); } catch(e) { diff --git a/lib/runners/console.js b/lib/runners/console.js index a968c6a..b25b9b3 100644 --- a/lib/runners/console.js +++ b/lib/runners/console.js @@ -142,7 +142,7 @@ ConsoleRunner.prototype.executeBatch = function(batch, batchDone) { } }) - //fs.unlink(scriptFile); + fs.unlink(scriptFile); batchDone(); }); }