Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: refactoring #4812

Merged
merged 6 commits into from Sep 29, 2018
Merged

CI: refactoring #4812

merged 6 commits into from Sep 29, 2018

Conversation

ethomson
Copy link
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
Copy link
Member

@pks-t pks-t left a comment

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 馃憤

@@ -41,7 +41,7 @@ die() {
# test configuration in a single place (tests/CMakeLists.txt) instead of running clar
# 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
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

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
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
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
Copy link
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.

None yet

2 participants