Skip to content

Commit

Permalink
Change test order to (hopefully) fix coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Aug 20, 2024
1 parent aba42a5 commit 83f4334
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/[email protected]
with:
Expand Down
3 changes: 1 addition & 2 deletions c/test_euler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 83f4334

Please sign in to comment.