Permalink
Browse files

test, feat: test.run set result to process.exitCode.

  • Loading branch information...
xicilion committed Oct 24, 2017
1 parent 77e6458 commit 42b69ff4c26ea23f1299d7858de229b760be9bbc
Showing with 5 additions and 2 deletions.
  1. +4 −1 fibjs/src/test/test.cpp
  2. +1 −1 test/main.js
View
@@ -9,6 +9,7 @@
#include "ifs/test.h"
#include "ifs/assert.h"
#include "ifs/util.h"
#include "ifs/process.h"
#include "QuickArray.h"
#include "date.h"
#include "console.h"
@@ -422,7 +423,9 @@ result_t test_base::afterEach(v8::Local<v8::Function> func)
result_t test_base::run(int32_t loglevel, int32_t& retVal)
{
return _case::run(loglevel, retVal);
result_t hr = _case::run(loglevel, retVal);
process_base::set_exitCode(retVal);
return hr;
}
result_t test_base::setup()
View
@@ -66,4 +66,4 @@ run("./profiler_test.js");
run("./v8_test.js");
repl ? process.exit(-test.run()) : test.run(console.DEBUG);
test.run();

0 comments on commit 42b69ff

Please sign in to comment.