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 3838 # Note the current convention is to use the -S and -B options here to specify source
3939 # and build directories, but this is only available with CMake 3.13 and higher.
4040 # 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
4242
4343 - name : Build
4444 working-directory : ${{runner.workspace}}/build
5151 shell : bash
5252 # Execute tests defined by the CMake configuration.
5353 # 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
5555
5656
Original file line number Diff line number Diff line change @@ -79,11 +79,9 @@ if( BUILD_UNITTESTS )
7979include (ExternalProject)
8080ExternalProject_Add(gtest
8181 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
8483 INSTALL_COMMAND :
8584)
86-
8785enable_testing ()
8886add_subdirectory (test )
8987endif ()
Original file line number Diff line number Diff line change @@ -3,4 +3,11 @@ add_executable(scitokens-gtest main.cpp)
33add_dependencies (scitokens-gtest gtest)
44include_directories ("${PROJECT_SOURCE_DIR} /vendor/gtest/googletest/include" )
55
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