File tree 3 files changed +29
-2
lines changed
3 files changed +29
-2
lines changed Original file line number Diff line number Diff line change 67
67
- name : CMake build examples
68
68
run : cmake --build demos/build
69
69
70
+ - name : Run tests
71
+ run : ctest --test-dir demos/build
72
+
70
73
- name : Create package
71
74
if : github.event.action == 'published'
72
75
run : cpack --config build/CPackConfig.cmake
@@ -122,7 +125,7 @@ jobs:
122
125
with :
123
126
version : " 2.0"
124
127
125
- - uses : actions/checkout@v2
128
+ - uses : actions/checkout@v4
126
129
127
130
- name : Configure
128
131
run : cmake -Bbuild --toolchain cmake/dos.cmake
Original file line number Diff line number Diff line change
1
+ if (NOT EXISTS "${in} " )
2
+ message (FATAL_ERROR "Input file ${in} does not exist" )
3
+ endif ()
4
+
5
+ execute_process (COMMAND "${exe} "
6
+ #INPUT_FILE "${in}"
7
+ COMMAND_ERROR_IS_FATAL ANY
8
+ )
Original file line number Diff line number Diff line change 7
7
8
8
project (PDcursesDemos LANGUAGES C)
9
9
10
+ enable_testing ()
11
+
10
12
find_package (PDCurses CONFIG REQUIRED)
11
13
12
14
foreach (f IN ITEMS testcurs ozdemo xmas firework ptest rain worm)
@@ -17,5 +19,19 @@ endforeach()
17
19
add_executable (tuidemo tui.c tuidemo.c)
18
20
target_link_libraries (tuidemo PRIVATE CURSES::CURSES)
19
21
20
- # --- auto-ignore build directory
21
22
file (GENERATE OUTPUT .gitignore CONTENT "*" )
23
+
24
+ set (CI $ENV{CI} )
25
+
26
+ file (GENERATE OUTPUT q.txt CONTENT "q" )
27
+
28
+ foreach (t IN ITEMS rain ptest)
29
+
30
+ add_test (NAME ${t}
31
+ COMMAND ${CMAKE_COMMAND} -Dexe=$<TARGET_FILE:${t} > -Din=${CMAKE_CURRENT_BINARY_DIR} /q.txt
32
+ -P ${CMAKE_CURRENT_SOURCE_DIR} /../cmake/test_run.cmake)
33
+
34
+ set_property (TEST ${t} PROPERTY DISABLED $<OR :$<BOOL :${WIN32} >,${CI} >)
35
+ set_property (TEST ${t} PROPERTY TIMEOUT 7)
36
+
37
+ endforeach ()
You can’t perform that action at this time.
0 commit comments