File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 38
38
# Note the current convention is to use the -S and -B options here to specify source
39
39
# and build directories, but this is only available with CMake 3.13 and higher.
40
40
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
41
- run : cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
41
+ run : cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_UNITTESTS=yes
42
42
43
43
- name : Build
44
44
working-directory : ${{runner.workspace}}/build
51
51
shell : bash
52
52
# Execute tests defined by the CMake configuration.
53
53
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
54
- run : ctest -C $BUILD_TYPE
54
+ run : ctest -C $BUILD_TYPE --verbose
55
55
56
56
Original file line number Diff line number Diff line change @@ -79,11 +79,9 @@ if( BUILD_UNITTESTS )
79
79
include (ExternalProject )
80
80
ExternalProject_Add (gtest
81
81
PREFIX external/gtest
82
- SOURCE_DIR ${PROJECT_SOURCE_DIR} /vendor/gtest
83
- BUILD_BYPRODUCTS ${CMAKE_BINARY_DIR} /external/gtest/src/gtest-build/lib/libgtest.a
82
+ URL file ://${PROJECT_SOURCE_DIR}/vendor/gtest
84
83
INSTALL_COMMAND :
85
84
)
86
-
87
85
enable_testing ()
88
86
add_subdirectory (test )
89
87
endif ()
Original file line number Diff line number Diff line change @@ -3,4 +3,11 @@ add_executable(scitokens-gtest main.cpp)
3
3
add_dependencies (scitokens-gtest gtest )
4
4
include_directories ("${PROJECT_SOURCE_DIR} /vendor/gtest/googletest/include" )
5
5
6
- target_link_libraries (scitokens-gtest SciTokens "${CMAKE_BINARY_DIR} /external/gtest/src/gtest-build/lib/libgtest.a" )
6
+ target_link_libraries (scitokens-gtest SciTokens "${CMAKE_BINARY_DIR} /external/gtest/src/gtest-build/lib/libgtest.a" -lpthread )
7
+
8
+ add_test (
9
+ NAME
10
+ unit
11
+ COMMAND
12
+ ${CMAKE_BINARY_DIR} /${CMAKE_INSTALL_BINDIR}/test/scitokens-gtest
13
+ )
You can’t perform that action at this time.
0 commit comments