summaryrefslogtreecommitdiff
path: root/utests/utest_run.cpp
diff options
context:
space:
mode:
authorBenjamin Segovia <segovia.benjamin@gmail.com>2012-05-03 17:12:18 +0000
committerKeith Packard <keithp@keithp.com>2012-08-10 16:16:59 -0700
commit14430f2092f27a4fda9d8d80be90373388a06801 (patch)
tree5fa0ec1d8cf63d3c8c033d5e389130a0cbaf4851 /utests/utest_run.cpp
parentccd746d3af1a4778e5c145fb752ea5a739f70840 (diff)
downloadbeignet-14430f2092f27a4fda9d8d80be90373388a06801.tar.gz
Finished the small test framework
Diffstat (limited to 'utests/utest_run.cpp')
-rw-r--r--utests/utest_run.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/utests/utest_run.cpp b/utests/utest_run.cpp
index 9721c75c..e577b7be 100644
--- a/utests/utest_run.cpp
+++ b/utests/utest_run.cpp
@@ -23,14 +23,22 @@
*
* Just run the unit tests. The user can possibly provides the subset of it
*/
-#include "utest.hpp"
+#include "utest_helper.hpp"
+#include "utest_exception.hpp"
+#include <iostream>
int main(int argc, char *argv[])
{
- if (argc >= 2)
- for (int i = 1; i < argc; ++i)
- UTest::run(argv[i]);
- else
- UTest::runAll();
+ try {
+ cl_ocl_init();
+ if (argc >= 2)
+ for (int i = 1; i < argc; ++i)
+ UTest::run(argv[i]);
+ else
+ UTest::runAll();
+ cl_ocl_destroy();
+ } catch (Exception e) {
+ std::cout << " " << e.what() << " [SUCCESS]" << std::endl;
+ }
}