summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Versace <chad.versace@linux.intel.com>2012-04-04 17:53:47 -0700
committerChad Versace <chad.versace@linux.intel.com>2012-04-08 12:37:34 -0700
commit04ee0d87f02a9b498c7ee2e5f652fa1f47b50c0e (patch)
treee04ebd677531f2fac545aa66bf58dbca09cf1a40
parent309adc8cfc629cafd25f90d1b3acf20ef90fb777 (diff)
cmake: Add gl_basic_test to `make check`
Unit tests are run first. If unit tests fail, then subsequent tests are not ran. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
-rw-r--r--CMakeLists.txt23
-rw-r--r--tests/unittests/CMakeLists.txt11
2 files changed, 14 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 160234d..129950e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -180,15 +180,6 @@ if(waffle_has_x11_egl)
endif(waffle_has_x11_egl)
# ------------------------------------------------------------------------------
-# Target: check
-# ------------------------------------------------------------------------------
-
-if(waffle_build_tests)
- # Subdirectories should add dependencies.
- add_custom_target(check)
-endif(waffle_build_tests)
-
-# ------------------------------------------------------------------------------
# Add subdirectories
# ------------------------------------------------------------------------------
@@ -205,6 +196,20 @@ if(waffle_build_examples)
endif(waffle_build_examples)
# ------------------------------------------------------------------------------
+# Target: check
+# ------------------------------------------------------------------------------
+
+# The unit tests are ran first. If they fail, then no subsequent tests are ran.
+
+if(waffle_build_tests)
+ add_custom_target(check
+ DEPENDS waffle-unittest gl_basic_test
+ COMMAND ${CMAKE_BINARY_DIR}/tests/unittests/waffle-unittest
+ COMMAND ${CMAKE_BINARY_DIR}/tests/functional/gl_basic_test
+ )
+endif(waffle_build_tests)
+
+# ------------------------------------------------------------------------------
# Print summary
# ------------------------------------------------------------------------------
diff --git a/tests/unittests/CMakeLists.txt b/tests/unittests/CMakeLists.txt
index 6684efa..72f15bd 100644
--- a/tests/unittests/CMakeLists.txt
+++ b/tests/unittests/CMakeLists.txt
@@ -14,14 +14,3 @@ target_link_libraries(waffle-unittest
waffle
waffle_test
)
-
-# ----------------------------------------------------------------------------
-# Target: waffle-check
-# ----------------------------------------------------------------------------
-
-add_custom_target(waffle-check
- DEPENDS waffle-unittest
- COMMAND ${CMAKE_CURRENT_BINARY_DIR}/waffle-unittest
- )
-
-add_dependencies(check waffle-check)