Updated Branches: refs/heads/1994-merge-rcouch c8753b582 -> fe862184f
exit with the correct error code Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/ccb6d7b9 Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/ccb6d7b9 Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/ccb6d7b9 Branch: refs/heads/1994-merge-rcouch Commit: ccb6d7b9f340097f22aec8be43afdf834e9af5d5 Parents: c8753b5 Author: Benoit Chesneau <beno...@apache.org> Authored: Sun Jan 12 13:55:04 2014 +0100 Committer: Benoit Chesneau <beno...@apache.org> Committed: Sun Jan 12 13:55:04 2014 +0100 ---------------------------------------------------------------------- test/javascript/test_js.escript | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/ccb6d7b9/test/javascript/test_js.escript ---------------------------------------------------------------------- diff --git a/test/javascript/test_js.escript b/test/javascript/test_js.escript index 4ee7a8a..dac7bd7 100755 --- a/test/javascript/test_js.escript +++ b/test/javascript/test_js.escript @@ -129,8 +129,10 @@ start_couch() -> stop_couch() -> application:stop(couch_replicator), + timer:sleep(1000), application:stop(couch_httpd), - application:stop(couch). + application:stop(couch), + application:stop(os_mon). restart_couch() -> stop_couch(), @@ -191,16 +193,18 @@ test(TestDir, Files) -> NSuccess = length(Success), Count = NFailed + NSuccess, - io:format("==> javascript tests results.~n~n", []), + io:format("~n==> javascript tests results.~n~n", []), lists:foreach(fun({Name, Status}) -> io:format("~s ... ~s~n", [Name, Status]) end, lists:usort(Failed ++ Success)), case NFailed of 0 -> - io:format("~nAll tests successful.~nTests: ~p~n", [Count]); + io:format("~nAll tests successful.~nTests: ~p~n", [Count]), + halt(0); _ -> - io:format("~n~p/~p tests failed~n", [NFailed, Count]) + io:format("~n~p/~p tests failed~n", [NFailed, Count]), + halt(1) end. main([]) -> TestDir = filename:join([scriptdir(), "test"]),