From 83f433413ce829c0c0ba6eedc17db24fbd84500f Mon Sep 17 00:00:00 2001 From: Olivia Appleton Date: Tue, 20 Aug 2024 00:39:49 -0500 Subject: [PATCH] Change test order to (hopefully) fix coverage --- .github/workflows/c.yml | 8 ++++---- c/test_euler.py | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/c.yml b/.github/workflows/c.yml index 2fe77dcd..691e4e79 100644 --- a/.github/workflows/c.yml +++ b/.github/workflows/c.yml @@ -55,6 +55,10 @@ jobs: compiler: msvc vcvarsall: true + - name: Run tests (native runner) + if: ${{ !contains(matrix.os, 'windows') }} + run: make c_native_test + - name: Run tests (ubuntu-latest) if: ${{ matrix.os == 'ubuntu-latest' }} run: make c_test COV=true COMPILER_OVERRIDE=${{ matrix.compiler }} NO_CLEANUP=true @@ -81,10 +85,6 @@ jobs: NO_OPTIONAL_TESTS: true COMPILER_OVERRIDE: clang - - name: Run tests (native runner) - if: ${{ !contains(matrix.os, 'windows') }} - run: make c_native_test - - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4.0.1 with: diff --git a/c/test_euler.py b/c/test_euler.py index 04b61fe7..63ab37c7 100644 --- a/c/test_euler.py +++ b/c/test_euler.py @@ -203,8 +203,7 @@ def test_compiler_macros(compiler): exename = EXE_TEMPLATE.format("test_compiler_macros", compiler) test_path = C_FOLDER.joinpath("src", "tests", "test_compiler_macros.c") check_call(templates[compiler].format(test_path, exename).split()) - buff = check_output([exename]) - flags = [bool(int(x)) for x in buff.split()] + flags = [bool(int(x)) for x in check_output([exename]).split()] expect_32 = (compiler == 'GCC' and GCC_NO_64) or (compiler == 'CL' and CL_NO_64) assert flags[0] == compiler.startswith("CL+") assert flags[1] == compiler.startswith("CLANG")