File: 0002-Integrate-into-cmake-s-test-framework.patch

package info (click to toggle)
intel-gmmlib 18.4.1%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,664 kB
  • sloc: cpp: 41,866; ansic: 4,897; makefile: 8
file content (39 lines) | stat: -rw-r--r-- 1,106 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From: Sebastian Ramacher <sramacher@debian.org>
Date: Wed, 14 Nov 2018 22:07:54 +0100
Subject: Integrate into cmake's test framework

---
 CMakeLists.txt                   |  1 +
 Source/GmmLib/ULT/CMakeLists.txt | 10 +++-------
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e018641..9e447c7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,4 +4,5 @@ if (NOT DEFINED RUN_TEST_SUITE)
 option (RUN_TEST_SUITE "run test suite after install" ON)
 endif (NOT DEFINED RUN_TEST_SUITE)
 
+enable_testing()
 add_subdirectory(Source/GmmLib)
diff --git a/Source/GmmLib/ULT/CMakeLists.txt b/Source/GmmLib/ULT/CMakeLists.txt
index 3432374..90990be 100644
--- a/Source/GmmLib/ULT/CMakeLists.txt
+++ b/Source/GmmLib/ULT/CMakeLists.txt
@@ -149,12 +149,8 @@ else()
     )
  endif()
 
-add_custom_target(Run_ULT ALL DEPENDS GMMULT)
-
-add_custom_command(
-    TARGET Run_ULT
-    POST_BUILD
-    COMMAND echo running ULTs
-    COMMAND ${EXE_NAME}  --gtest_filter=CTest*
+add_test(
+    NAME ULT
+    COMMAND $<TARGET_FILE:${EXE_NAME}> --gtest_filter=CTest*
 )