Skip to content

Commit 6176871

Browse files
author
thk123
committed
Add and invoke a ctest target for checking expected failure unit tests
1 parent 18cca67 commit 6176871

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ jobs:
243243
- cmake -S . -Bbuild '-DCMAKE_BUILD_TYPE=Release' '-DCMAKE_CXX_COMPILER=/usr/bin/g++-7' '-DCMAKE_USE_CUDD=true' -DCMAKE_CXX_FLAGS="-DBDD_GUARDS" '-DWITH_MEMORY_ANALYZER=On'
244244
- git submodule update --init --recursive
245245
- cmake --build build -- -j4
246-
script: (cd build; ctest -V -L CORE -j2)
246+
script: (cd build; ctest -V -L CORE -j2; ctest -V -R unit-xfail -j2)
247247

248248
# cmake build using clang++-6
249249
- stage: Test different OS/CXX/Flags
@@ -280,7 +280,7 @@ jobs:
280280
- cmake -S . -Bbuild '-DCMAKE_BUILD_TYPE=Release' '-DCMAKE_CXX_COMPILER=/usr/bin/clang++-7' '-DCMAKE_CXX_FLAGS=-Qunused-arguments' '-DWITH_MEMORY_ANALYZER=On'
281281
- git submodule update --init --recursive
282282
- cmake --build build -- -j4
283-
script: (cd build; ctest -V -L CORE -j2)
283+
script: (cd build; ctest -V -L CORE -j2; ctest -V -R unit-xfail -j2)
284284

285285
# cmake build on OSX, using default clang
286286
- stage: Test different OS/CXX/Flags
@@ -300,7 +300,7 @@ jobs:
300300
- cmake -S . -Bbuild '-DCMAKE_BUILD_TYPE=Release' '-DCMAKE_OSX_ARCHITECTURES=x86_64'
301301
- git submodule update --init --recursive
302302
- cmake --build build -- -j4
303-
script: (cd build; ctest -V -L CORE -j2)
303+
script: (cd build; ctest -V -L CORE -j2; ctest -V -R unit-xfail -j2)
304304

305305

306306
# Run Coverity

buildspec-linux-cmake-gcc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ phases:
2222
post_build:
2323
commands:
2424
- cd build; ctest -V -L CORE -j2
25+
- cd build; ctest -V -R unit-xfail -j2
2526
- echo Build completed on `date`
2627
cache:
2728
paths:

jbmc/unit/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,11 @@ add_test(
3636
COMMAND $<TARGET_FILE:java-unit>
3737
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
3838
)
39+
40+
add_test(
41+
NAME java-unit-xfail
42+
COMMAND $<TARGET_FILE:java-unit> "[!shouldfail]"
43+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
44+
)
45+
3946
set_tests_properties(java-unit PROPERTIES LABELS "CORE;CBMC")

unit/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,11 @@ add_test(
6565
COMMAND $<TARGET_FILE:unit>
6666
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
6767
)
68+
69+
add_test(
70+
NAME unit-xfail
71+
COMMAND $<TARGET_FILE:unit> "[!shouldfail]"
72+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
73+
)
74+
6875
set_tests_properties(unit PROPERTIES LABELS "CORE;CBMC")

0 commit comments

Comments
 (0)