bazelbuild / bazel-integration-testing

Framework for integration tests that call Bazel
Apache License 2.0
32 stars 29 forks source link

Allow outputing logs of inner tests #34

Open ittaiz opened 6 years ago

ittaiz commented 6 years ago

The idea is that we allow outputing the logs inner tests so that the developer can see in which way the inner test failed and maybe also assert on it. Exists in logsOfInternalTests method https://github.com/bazelbuild/bazel-integration-testing/blob/master/javatests/build/bazel/tests/integration/BazelBaseTestCaseTest.java#L165

ittaiz commented 6 years ago

cc @maximn

hchauvin commented 6 years ago

Wouldn't it be better to use the Build Event Protocol to extract test outputs instead of attempting to parse stderr? This is what bazelci with Buildkite is doing, as is the IntelliJ plugin.

One way to do that right now is to pass a temporary file to "--build_event_binary_file" then to parse it (binary protocol buffer), see https://github.com/bazelbuild/intellij/blob/7801ae72aa44d4057f4ff88f9774efc1c81d791e/base/src/com/google/idea/blaze/base/command/buildresult/BuildEventProtocolOutputReader.java

ittaiz commented 6 years ago

Sounds like a better plan. Would welcome a PR :)

On Mon, 23 Apr 2018 at 20:11 Hadrien Chauvin notifications@github.com wrote:

Wouldn't it be better to use the Build Event Protocol to extract test outputs instead of attempting to parse stderr? This is what bazelci with Buildkite is doing, as is the IntelliJ plugin.

One way to do that right now is to pass a temporary file to "--build_event_binary_file" then to parse it (binary protocol buffer), see https://github.com/bazelbuild/intellij/blob/7801ae72aa44d4057f4ff88f9774efc1c81d791e/base/src/com/google/idea/blaze/base/command/buildresult/BuildEventProtocolOutputReader.java

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bazelbuild/bazel-integration-testing/issues/34#issuecomment-383651235, or mute the thread https://github.com/notifications/unsubscribe-auth/ABUIF_zEsGUyAHTlo0TvLFUEGYUM6Imlks5trgtEgaJpZM4S6Bgy .