From 354c02b686a4d81e3775b1658ffa7ce4a4cc0acb Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Sun, 22 Jan 2023 13:07:56 +0700 Subject: [PATCH] replace test configuration with regex match --- .github/workflows/test.yml | 8 +++++--- test/CMakeLists.txt | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5583744..26df2cf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,6 +33,7 @@ jobs: source-dir: test build-dir: output run-test: true + test-args: -R hello_world - name: Check if the default build directory does not exist run: test ! -d build && test ! -d test/build @@ -55,7 +56,7 @@ jobs: c-flags: ${{ matrix.compiler == 'msvc' && '/w /WX-' || '-Wno-unused-variable' }} cxx-flags: ${{ matrix.compiler == 'msvc' && '/w /WX-' || '-Wno-unused-variable' }} args: -D CHECK_SURPASS_WARNING=ON - test-args: -C test -E hello_world + test-args: -R test specified-compiler-usage: runs-on: ${{ matrix.os }}-latest @@ -76,7 +77,7 @@ jobs: c-compiler: clang cxx-compiler: clang++ args: -D CHECK_USING_CLANG=ON - test-args: -C test -E hello_world + test-args: -R test specified-generator-usage: runs-on: ${{ matrix.os }}-latest @@ -91,5 +92,6 @@ jobs: uses: ./ with: source-dir: test - generator: Ninja run-test: true + generator: Ninja + test-args: -R hello_world diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 93afcfd..9c512eb 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -28,5 +28,5 @@ foreach(LANG ${LANGS}) $<$:CHECK_USING_CLANG> $<$:CHECK_SURPASS_WARNING> ) - add_test(NAME test_${LANG} CONFIGURATIONS test COMMAND $) + add_test(NAME test_${LANG} COMMAND $) endforeach()