Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 99b9c8d

Browse files
committedJan 5, 2020
CMake: Use ADDTEST with always_skip / fail
1 parent ea0b4f2 commit 99b9c8d

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed
 

‎src/tests/CMakeLists.txt

+4-9
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,7 @@ add_subdirectory(ascii)
1010
add_subdirectory(io)
1111
add_subdirectory(optval)
1212

13-
add_executable(test_skip test_skip.f90)
14-
target_link_libraries(test_skip fortran_stdlib)
15-
add_test(NAME AlwaysSkip COMMAND $<TARGET_FILE:test_skip>)
16-
set_tests_properties(AlwaysSkip PROPERTIES SKIP_RETURN_CODE 77)
17-
18-
add_executable(test_fail test_fail.f90)
19-
target_link_libraries(test_fail fortran_stdlib)
20-
add_test(NAME AlwaysFail COMMAND $<TARGET_FILE:test_fail>)
21-
set_tests_properties(AlwaysFail PROPERTIES WILL_FAIL true)
13+
ADDTEST(always_skip)
14+
set_tests_properties(always_skip PROPERTIES SKIP_RETURN_CODE 77)
15+
ADDTEST(always_fail)
16+
set_tests_properties(always_fail PROPERTIES WILL_FAIL true)

‎src/tests/test_fail.f90 renamed to ‎src/tests/test_always_fail.f90

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
program AlwaysFail
1+
program test_always_fail
22

33
use stdlib_experimental_error, only : assert
44
implicit none

‎src/tests/test_skip.f90 renamed to ‎src/tests/test_always_skip.f90

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
program AlwaysSkip
1+
program test_always_skip
22

33
use stdlib_experimental_error, only : assert
44
implicit none

0 commit comments

Comments
 (0)
Please sign in to comment.