Skip to content

Conversation

@ser-io
Copy link
Member

@ser-io ser-io commented Jan 8, 2026

Bug: b/474339886

@ser-io ser-io force-pushed the run-flaky-tests-special-runner branch 6 times, most recently from 0130b26 to e34a067 Compare January 9, 2026 19:39
@ser-io ser-io requested a review from 3405691582 January 9, 2026 19:40
@ser-io ser-io changed the title Run HO e2e flaky tests in special runner. Attemps HO e2e flaky test 3 times. Jan 9, 2026
@ser-io ser-io force-pushed the run-flaky-tests-special-runner branch 2 times, most recently from 5cf0d7e to 8bd1b36 Compare January 9, 2026 19:51
@ser-io ser-io changed the title Attemps HO e2e flaky test 3 times. Attemp HO e2e flaky tests multiple times. Jan 9, 2026
sudo podman info
sudo podman load --quiet -i android-cuttlefish-e2etest.tar && rm android-cuttlefish-e2etest.tar
mkdir -p -m 777 /tmp/cw_bazel
# Run flaky tests.
Copy link
Collaborator

Choose a reason for hiding this comment

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

General comment. At some point, we should consider pulling all this logic out and putting it elsewhere. Maybe we can create a special container for running tests in that does all of this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Agree.

echo "${targets}"
targets=( $(echo ${targets}) )
readonly ATTEMPTS=3
for t in "${targets[@]}"; do
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why can't we do, say, for t in ${targets}; do? (I don't know what the output of targets looks like, though.)

I think you may not even need to strip the carriage return like that, if you do?

Copy link
Member Author

Choose a reason for hiding this comment

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

Output for bazel query --noshow_progress 'attr(flaky, 1, orchestration/...)' | grep -e "^\/\/" | sort is the following:

//orchestration/bugreport_test:bugreport_test_test
//orchestration/snapshot_test:snapshot_test_test

which is then converted to an array of strings hence the need to use ${targets[@]} in order to iterate through each item.

sudo podman run --name tester -d --privileged --pids-limit=8192 -v /tmp/cw_bazel:/tmp/cw_bazel -v .:/src/workspace -w /src/workspace/e2etests android-cuttlefish-e2etest:latest
if [[ ${i} -lt ${ATTEMPTS} ]]
then
sudo podman exec --user=testrunner -it tester bazel --output_user_root=/tmp/cw_bazel/output test --sandbox_writable_path=/home/testrunner --flaky_test_attempts=1 ${t} && break || continue
Copy link
Collaborator

Choose a reason for hiding this comment

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

Run this, capture $?, then test that. This means you don't duplicate the entire podman command string.

Copy link
Member Author

Choose a reason for hiding this comment

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

Discussed offline. Removed the duplicated command. PTAL

@ser-io ser-io force-pushed the run-flaky-tests-special-runner branch from 8bd1b36 to bdf39e3 Compare January 13, 2026 20:51
@ser-io ser-io requested a review from 3405691582 January 13, 2026 21:09
- Use brand new containers for every execution.
- Run the executions in special runner.

Bug: b/474339886
@ser-io ser-io force-pushed the run-flaky-tests-special-runner branch from bdf39e3 to 7b85518 Compare January 13, 2026 21:19
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