Jenkinsfile: create junit.xml for integration tests#39724
Jenkinsfile: create junit.xml for integration tests#39724tiborvass merged 4 commits intomoby:masterfrom
Conversation
ff19427 to
8355b9e
Compare
hack/make/.integration-test-helpers
Outdated
There was a problem hiding this comment.
we already have gotestsum installed, let's use that: https://github.com/moby/moby/blob/4e83c90ae8362a8205e3728e8fcb655a713a0d87/hack/dockerfile/install/gotestsum.installer
ade2880 to
ad4196a
Compare
|
One flaky test failed, but otherwise this works; PTAL I'll squash commits if this looks good |
Jenkinsfile
Outdated
There was a problem hiding this comment.
oh; need to remove this one as well; was just there for testing, and no longer works for the "janky" stage, because it's overwritten
8a44863 to
cecca1d
Compare
|
@tiborvass @andrewhsu squashed and cleaned up commits; this should be ready to review / ready to go After this is merged, we'll need to do another round, and implement it for Windows |
|
Rebased this one, now that #39802 is merged; this should be ready for review/merge |
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
…ions
Without these options set, test2json does not include a `Time`
field in the generated JSON;
{"Action":"run","Test":"TestCgroupNamespacesBuild"}
{"Action":"output","Test":"TestCgroupNamespacesBuild","Output":"=== RUN TestCgroupNamespacesBuild\n"}
{"Action":"output","Test":"TestCgroupNamespacesBuild","Output":"--- PASS: TestCgroupNamespacesBuild (1.70s)\n"}
...
{"Action":"pass","Test":"TestCgroupNamespacesBuild"}
As a result, `gotestsum` was not able to calculate test-duration, and
reported `time="0.000000"` for all tests;
<testcase classname="amd64.integration.build" name="TestCgroupNamespacesBuild" time="0.000000"></testcase>
With this patch applied:
{"Time":"2019-08-23T22:42:41.644361357Z","Action":"run","Package":"amd64.integration.build","Test":"TestCgroupNamespacesBuild"}
{"Time":"2019-08-23T22:42:41.644367647Z","Action":"output","Package":"amd64.integration.build","Test":"TestCgroupNamespacesBuild","Output":"=== RUN TestCgroupNamespacesBuild\n"}
{"Time":"2019-08-23T22:42:44.926933252Z","Action":"output","Package":"amd64.integration.build","Test":"TestCgroupNamespacesBuild","Output":"--- PASS: TestCgroupNamespacesBuild (3.28s)\n"}
...
{"Time":"2019-08-23T22:42:44.927003836Z","Action":"pass","Package":"amd64.integration.build","Test":"TestCgroupNamespacesBuild","Elapsed":3.28}
Which now correctly reports the test's duration:
<testcase classname="amd64.integration.build" name="TestCgroupNamespacesBuild" time="3.280000"></testcase>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Generate more unique names, based on architecture and test-suite name. Clean up the path to this integration test to create a useful package name. "$dir" can be either absolute (/go/src/github.com/docker/docker/integration/foo) or relative (./integration/foo). To account for both, first we strip the absolute path, then any leading periods and slashes. For the package-name, we use periods as separator instead of slashes, to be more in-line with Java package names (which is what junit.xml was originally designed for). Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
c227fcf to
096516e
Compare
|
Disabled |
lets see how a failure shows up in jenkins
|
@thaJeztah ok you can revert the intentional failure and i'll approve. |
096516e to
d723643
Compare
|
@tiborvass done 👍 |
|
Next steps;
|
|
Also (TBD); I read that the junit.xml "standard" expects test durations to be including test setup/teardown. I think currently gotestsum uses the duration of the test itself (which is useful, but having timings including setup/teardown is useful as well) |
|
Looks like Windows RS1 nodes are running out of disk? https://ci.docker.com/public/blue/rest/organizations/jenkins/pipelines/moby/branches/PR-39724/runs/52/nodes/50/log/?start=0 |
|
^^ @StefanScherer (also wondering if that can be related to the change to use |
|
@thaJeztah I had a look at one of the agents. In normal situation the D:\CI-xx folder gets cleaned up. Maybe a Do we prune the host docker engine? I can see this problem 12 times in our logs, starting yesterday. Maybe the image size of the windowsservercore increased due to the latest Patch Tuesday 🤔 |
IIRC the script removes images (except for anything containing
Hm.. didn't think of that; wondering if we could check if it increased in size (would be possible if we know the digest of the previous versions) |
I noticed the folder structure is Might of course be that the |




based on top of / depends on:
Addresses parts of #39675