Skip to content

Expand $TEST_UNDECLARED_OUTPUTS_DIR when running test from bazel#553

Merged
ob merged 1 commit into
masterfrom
nanwng/expand_test_undeclared_outputs_dir
May 18, 2023
Merged

Expand $TEST_UNDECLARED_OUTPUTS_DIR when running test from bazel#553
ob merged 1 commit into
masterfrom
nanwng/expand_test_undeclared_outputs_dir

Conversation

@nanwng
Copy link
Copy Markdown
Collaborator

@nanwng nanwng commented May 16, 2023

Currently when running bluepill from bazel, $TEST_UNDECLARED_OUTPUTS_DIR is not accessible from test runtime by passing with --test_env

Supporting it by expanding the variable in the shell script and passing it to the test plan.

So we can run something like bazel test Taget --config Debug --test_env SCREENSHOT_DIR=\$TEST_UNDECLARED_OUTPUTS_DIR/screenshots. Then the screenshot can be saved to the undeclared outputs dir and be packaged to the final bazel-testlog folder

ref: https://bazel.build/reference/test-encyclopedia#initial-conditions

@nanwng nanwng requested a review from a team as a code owner May 16, 2023 22:01
Signed-off-by: Nan Wang <nanwang1101@yahoo.com>
@nanwng nanwng force-pushed the nanwng/expand_test_undeclared_outputs_dir branch from dc05d21 to 9a907b2 Compare May 16, 2023 22:03
Comment thread bptestrunner/bluepill_batch_test_runner.template.sh
@ob ob merged commit 0ff8ffd into master May 18, 2023
@ob ob deleted the nanwng/expand_test_undeclared_outputs_dir branch May 18, 2023 00:46
nanwng added a commit that referenced this pull request May 24, 2023
Signed-off-by: Nan Wang <nanwang1101@yahoo.com>
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