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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate JUnit results in the Docker image #485

Merged
merged 11 commits into from
Aug 20, 2018
Merged

Generate JUnit results in the Docker image #485

merged 11 commits into from
Aug 20, 2018

Conversation

hawkowl
Copy link
Contributor

@hawkowl hawkowl commented Aug 16, 2018

No description provided.

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

lgtm really

@@ -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" ]
Copy link
Member

Choose a reason for hiding this comment

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

thank you 😄

@@ -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"
Copy link
Member

Choose a reason for hiding this comment

The 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.

Copy link
Member

Choose a reason for hiding this comment

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

One question though: why are the TAP results in /logs but the junit results in /logs/sytest ? shouldn't it be /logs/junit-results.xml or /logs/junit-results/results.xml or something?

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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)

@hawkowl hawkowl merged commit 8785bfa into develop Aug 20, 2018
@hawkowl hawkowl deleted the hawkowl/junit branch August 20, 2018 15:15
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