]> git.localhorst.tv Git - blank.git/blobdiff - tst/test.cpp
make test binary exit with failure on failed tests
[blank.git] / tst / test.cpp
index 180b0edca640286a520c767d37a74f2a4547eea0..f95ead372d3ce212faa3b17872aae9dd6a5fa38e 100644 (file)
@@ -1,5 +1,3 @@
-#include "app/init.hpp"
-
 #include <cppunit/extensions/TestFactoryRegistry.h>
 #include <cppunit/ui/text/TestRunner.h>
 
@@ -8,17 +6,12 @@ using CppUnit::TextUi::TestRunner;
 
 
 int main(int, char **) {
-       blank::InitSDL sdl;
-       blank::InitGL gl;
-       blank::Window win;
-       blank::GLContext ctx(win.CreateContext());
-       blank::InitGLEW glew;
-
        TestRunner runner;
        TestFactoryRegistry &registry = TestFactoryRegistry::getRegistry();
        runner.addTest(registry.makeTest());
-       runner.run();
-
-       return 0;
-
+       if (runner.run()) {
+               return 0;
+       } else {
+               return 1;
+       }
 }