-
Notifications
You must be signed in to change notification settings - Fork 4k
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
No convenience method to collect test report files #13991
Comments
Can you get the data from the Build Event Protocol? Check our CI script for a naive, unoptimized method how to parse the BEP JSON, get all the test logs and upload them to a server: https://github.com/bazelbuild/continuous-integration/blob/e23e1b90a3d8ce560835e7a5217241b0bbbf9b63/buildkite/bazelci.py#L2013-L2036 You can save the BEP as a JSON file to disk during the build via |
Will give it a shot, looks like this prints outputs of cached tests too which is good. Note: {
"id": {
"testResult": {
"label": "some_test_label",
"run": 1,
"shard": 1,
"attempt": 1,
"configuration": {
"id": "b1f1fcdd5d44b8c93dec65bb7fd1755bd865d799e6714b8fbcca6e57a91e57a0"
}
}
},
"testResult": {
"testActionOutput": [
{
"name": "test.log",
"uri": "file:///home/..../test.log"
},
{
"name": "test.xml",
"uri": "file:///home/...../test.xml"
}
],
"testAttemptDurationMillis": "400",
"cachedLocally": true,
"status": "PASSED",
"testAttemptStartMillisEpoch": "1632224453667",
"executionInfo": {}
}
} |
With remote cache in place reports are printed as
like so "testResult": {
"testActionOutput": [
{
"name": "test.log",
"uri": "bytestream://...."
},
{
"name": "test.xml",
"uri": "bytestream://....."
}
],
"testAttemptDurationMillis": "3",
"status": "PASSED",
"testAttemptStartMillisEpoch": "1632320781462",
"executionInfo": {
"strategy": "remote cache hit",
"cachedRemotely": true
}
}
|
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team ( |
This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please reach out to the triage team ( |
Description of the problem / feature request:
bazel test SOME_TESTS_EXPRESSION
does not print paths to test reports, they will be stored under$(bazel info bazel-testlogs)/PACKAGE_PATH../TEST_LABEL
. Which could be inconvenient for report collectionbaze ?query
flavor and some scriptingAs a workaround one could clear
bazel-testlogs
but that's not concurrent-command-friendly and feels hacky in general. Another option is changeoutput_base
per command but that may trigger other issues.Feature requests: what underlying problem are you trying to solve with this feature?
Run tests in CI in several packs and collect reports separately
What operating system are you running Bazel on?
What's the output of
bazel info release
?If
bazel info release
returns "development version" or "(@non-git)", tell us how you built Bazel.Have you found anything relevant by searching the web?
Any other information, logs, or outputs that you want to share?
bazel test --run_under='env XML_OUTPUT_FILE=/tmp/foobar.xml' .....
could be made to a workaround but has major disadvantage of affecting cache and otoh not moving files into location for cached tests (ifrun_under
wrapper creates random output location each time butrun_under
command itself is the same).The text was updated successfully, but these errors were encountered: