-
Notifications
You must be signed in to change notification settings - Fork 56
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate JUnit results in the Docker image #485
Changes from all commits
8d4dbaf
6ad55de
0c3b279
fa860dc
56d540b
fd6225c
fb3abef
86d86bf
3fbeb14
2f3882d
37f5e94
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ set -x | |
|
||
# Attempt to find a sytest to use. | ||
# If /test/run-tests.pl exists, it means that a SyTest checkout has been mounted into the Docker image. | ||
if [ -e "/test/run-tests.pl" ] | ||
if [ -e "./run-tests.pl" ] | ||
then | ||
# If the user has mounted in a SyTest checkout, use that. We can tell this by files being in the directory. | ||
echo "Using local sytests..." | ||
|
@@ -70,4 +70,8 @@ cp results.tap /logs/results.tap | |
cp server-0/homeserver.log /logs/homeserver-0.log | ||
cp server-1/homeserver.log /logs/homeserver-1.log | ||
|
||
# Write out JUnit for CircleCI | ||
mkdir -p /logs/sytest | ||
perl /tap-to-junit-xml.pl --puretap --input=/logs/results.tap --output=/logs/sytest/results.xml "SyTest" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not entirely sure this is the optimal approach, vs (for instance) getting Sytest to spit out JUnit directly, or using a TAP-to-cpan thing from CPAN rather than dumping a script into our repo, but in the interests of not spending days hacking on sytest, let's go with this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One question though: why are the TAP results in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @richvdh CircleCI accepts the different suites under subdirectories named after the suite, in case you have multiple test suites -- I don't know if it's a convention or not, but it makes CircleCI happier. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. unfortunately the script isn't distributed on cpan as far as I can tell (and I needed to make a very minor change to make it spit out test names, not numbers) |
||
|
||
exit $TEST_STATUS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you 😄