Skip to content

CI: refactoring#4812

Merged
ethomson merged 6 commits into
masterfrom
ethomson/ci-refactor
Sep 29, 2018
Merged

CI: refactoring#4812
ethomson merged 6 commits into
masterfrom
ethomson/ci-refactor

Conversation

@ethomson

Copy link
Copy Markdown
Member

When I introduced #4723, @pks-t asked why we were stopping on the first failure instead of continuing to run all the tests and simply report the errors. Now that our CI run is faster, I've changed our CI to continue and simply report an error at the end.

In addition, I've reverted the CMake changes to enable XML output. It was a gross hack, and we can instead append -r during the CI test runs. This is still a bit of a hack, but a less gross one. 😉

Our CI test system invokes ctest with the name of the given tests it
wishes to invoke.  ctest (with the `-R` flag) treats this name as a
regular expression.  Provide anchors in the regular expression to avoid
matching additional tests in this search.
This reverts commit a2d73f5.
Using clar to propagate the XML settings was a mistake.
Add the clar flags to produce JUnit-style XML output before invocation.
Introduce SKIP_*_TEST variables for Windows builds to match POSIX
builds.
@ethomson ethomson force-pushed the ethomson/ci-refactor branch 3 times, most recently from 154dfac to 44383dc Compare September 18, 2018 04:16
pks-t
pks-t previously requested changes Sep 28, 2018

@pks-t pks-t left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, except for the one hardcoded path 👍

Comment thread ci/test.sh
# here as well. But it allows us to wrap our test harness with a leak checker like valgrind.
run_test() {
TEST_CMD=$(ctest -N -V -R $1 | sed -n 's/^[0-9]*: Test command: //p')
TEST_CMD=$(ctest -N -V -R "^${1}$" | sed -n 's/^[0-9]*: Test command: //p')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohhh, I love this. It has bothered me too many times

Comment thread ci/test.ps1 Outdated
$TestName = $args[0]

$TestCommand = (ctest -N -V -R "^$TestName$") -join "`n" -replace "(?ms).*\n^[0-9]*: Test command: ","" -replace "\n.*",""
$TestCommand = "C:\LibGit2\libgit2-2\build\Debug\libgit2_clar.exe -sa"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't look intended? You first set TestCommand to some magic voodoo and then overwrite it with a hard-coded path. I guess the second line was for debugging purposes?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I guess you accidentally squashed the fix into the wrong commit. Feel free to fix it up if you want to, I'm happy to have this merged either way.

@pks-t pks-t dismissed their stale review September 28, 2018 09:27

Complaint was fixed in a later commit

Similar to the way we parse the ctest output on POSIX systems, do the
same on Windows.  This allows us to append the `-r` flag to clar after
we've identified the command to run.
Don't stop on test failures; run all the tests, even when a test fails.
@ethomson ethomson force-pushed the ethomson/ci-refactor branch from 44383dc to 429c7f1 Compare September 29, 2018 17:11
@ethomson

Copy link
Copy Markdown
Member Author

Thanks, I did fixup the wrong commit. I've updated this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants