Skip to content

Commit

Permalink
test, feat: test.run set result to process.exitCode.
Browse files Browse the repository at this point in the history
  • Loading branch information
xicilion committed Oct 24, 2017
1 parent 77e6458 commit 42b69ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion fibjs/src/test/test.cpp
Expand Up @@ -9,6 +9,7 @@
#include "ifs/test.h" #include "ifs/test.h"
#include "ifs/assert.h" #include "ifs/assert.h"
#include "ifs/util.h" #include "ifs/util.h"
#include "ifs/process.h"
#include "QuickArray.h" #include "QuickArray.h"
#include "date.h" #include "date.h"
#include "console.h" #include "console.h"
Expand Down Expand Up @@ -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) 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() result_t test_base::setup()
Expand Down
2 changes: 1 addition & 1 deletion test/main.js
Expand Up @@ -66,4 +66,4 @@ run("./profiler_test.js");


run("./v8_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.