Skip to content

Commit

Permalink
Fix update of reference for all compilers:
Browse files Browse the repository at this point in the history
Since gcovr#686 the command `python3 -m nox -s 'docker_qa_compiler(all)' --reuse-existing-virtualenvs -- --update_reference` is working from newest to oldest version of compiler. Now the reuse of the test data doesn't work anymore.
Only the detection of the compiler shall use the newest one, all other commands shall start with oldest version first.
  • Loading branch information
Spacetown committed Nov 5, 2022
1 parent c83215a commit 9c6f3c7
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions noxfile.py
Expand Up @@ -29,15 +29,25 @@


GCC_VERSIONS = [
"gcc-11",
"gcc-10",
"gcc-9",
"gcc-8",
"gcc-6",
"gcc-5",
"clang-13",
"gcc-6",
"gcc-8",
"gcc-9",
"gcc-10",
"gcc-11",
"clang-10",
"clang-13",
]

GCC_VERSIONS_NEWEST_FIRST = [
"-".join(cc)
for cc in sorted(
[(*cc.split("-"),) for cc in GCC_VERSIONS],
key=lambda cc: (cc[0], int(cc[1])),
reverse=True,
)
]

DEFAULT_TEST_DIRECTORIES = ["doc", "gcovr"]
DEFAULT_LINT_ARGUMENTS = [
"setup.py",
Expand All @@ -58,7 +68,7 @@ def get_gcc_version_to_use():
return os.path.split(cc)[1]

# Find the first insalled compiler version we suport
for cc in GCC_VERSIONS:
for cc in GCC_VERSIONS_NEWEST_FIRST:
if shutil.which(cc):
return cc

Expand Down

0 comments on commit 9c6f3c7

Please sign in to comment.