-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use child processes to run each set of tests, in order to deal with t…
…he memory leak in vm.runInNewContext()
- Loading branch information
Showing
2 changed files
with
53 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"use strict"; | ||
|
||
var TestCase = require("./helper/test-case"); | ||
var argv = require("yargs").argv; | ||
|
||
if (argv.language) { | ||
process.on('message', function (data) { | ||
if (data.filePath) { | ||
try { | ||
TestCase.runTestCase(argv.language, data.filePath); | ||
process.send({success: true}); | ||
} catch (e) { | ||
process.send({error: e}); | ||
} | ||
} | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters