aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-05-07 16:46:02 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-05-09 10:45:42 +0000
commit621f4905a0a991ce4e34443cd873953e58c51017 (patch)
tree1f21f25a2c00bb742a2ecf300f1cab687e1edc2b /tests
parent0f340f8fa9d0a47b5066966e2082881a13f12ca7 (diff)
Fix return value of qjstest
When running the test suite succeeds, we should exit with 0 and otherwise non-zero. EXIT_SUCCESS and EXIT_FAILURE is the standard way that we also use in other command line tools. Change-Id: Ia74d171e58b92230389054e61779dfc03b7e5876 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/ecmascripttests/qjstest/main.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/qml/ecmascripttests/qjstest/main.cpp b/tests/auto/qml/ecmascripttests/qjstest/main.cpp
index c6f7994f8f..4a3541d892 100644
--- a/tests/auto/qml/ecmascripttests/qjstest/main.cpp
+++ b/tests/auto/qml/ecmascripttests/qjstest/main.cpp
@@ -29,6 +29,7 @@
#include <QCoreApplication>
#include <QCommandLineParser>
#include <qdebug.h>
+#include <stdlib.h>
#include "test262runner.h"
@@ -106,5 +107,8 @@ int main(int argc, char **argv)
flags |= Test262Runner::WriteTestExpectations;
testRunner.setFlags(flags);
- return testRunner.run();
+ if (testRunner.run())
+ return EXIT_SUCCESS;
+ else
+ return EXIT_FAILURE;
}