diff --git a/.github/workflows/C_Integration.yml b/.github/workflows/C_Integration.yml index a707390..7256257 100644 --- a/.github/workflows/C_Integration.yml +++ b/.github/workflows/C_Integration.yml @@ -32,7 +32,7 @@ jobs: # Note the current convention is to use the -S and -B options here to specify source # and build directories, but this is only available with CMake 3.13 and higher. # The CMake binaries on the Github Actions machines are (as of this writing) 3.12 - run: cmake $GITHUB_WORKSPACE/src/unittests -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCODE_COVERAGE=ON -DENABLE_COVERAGE=ON + run: cmake $GITHUB_WORKSPACE/test -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCODE_COVERAGE=ON -DENABLE_COVERAGE=ON - name: Build working-directory: ${{runner.workspace}}/build @@ -53,9 +53,9 @@ jobs: run: | find ${{runner.workspace}}/build -iname '*.gcno' -exec cp {} ./ \; find ${{runner.workspace}}/build -iname '*.gcda' -exec cp {} ./ \; - gcov -o . ./tests/race_test.cpp --object-directory ./ + gcov -o . ./test/common_tests --object-directory ./ lcov --directory . --capture --output-file coverage.info - lcov --remove coverage.info '/usr/*' '*/tests/*' --output-file coverage.info + lcov --remove coverage.info '/usr/*' '*/test/*' --output-file coverage.info lcov --list coverage.info bash <(curl -s https://codecov.io/bash) -X gcov -f coverage.info || echo "Failed to upload to Codecov" diff --git a/src/unittests/CMakeLists.txt b/test/CMakeLists.txt similarity index 77% rename from src/unittests/CMakeLists.txt rename to test/CMakeLists.txt index 1d48499..3356187 100644 --- a/src/unittests/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -17,12 +17,10 @@ enable_testing() # Locate GTest package find_package(GTest REQUIRED) include_directories(${GTEST_INCLUDE_DIRS}) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/.. +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../src ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/../../bin/include - ${CMAKE_CURRENT_SOURCE_DIR}/../common - ${CMAKE_CURRENT_SOURCE_DIR}/../detector - ${CMAKE_CURRENT_SOURCE_DIR}/../detector/commutativity) + ${CMAKE_CURRENT_SOURCE_DIR}/../bin/include + ${CMAKE_CURRENT_SOURCE_DIR}/../src/detector/commutativity) add_compile_options(-g -O0 -Wall -fprofile-arcs -ftest-coverage -fpermissive) set(CMAKE_CXX_OUTPUT_EXTENSION_REPLACE ON) diff --git a/src/unittests/Common_Defs_gtest.cc b/test/Common_Defs_gtest.cc similarity index 100% rename from src/unittests/Common_Defs_gtest.cc rename to test/Common_Defs_gtest.cc