Skip to content

tests: fix binary test passing when failed and llvm-cov deprecated flag#165

Merged
artiepoole merged 4 commits intomainfrom
artie/hotfix-integration-tests
Mar 30, 2026
Merged

tests: fix binary test passing when failed and llvm-cov deprecated flag#165
artiepoole merged 4 commits intomainfrom
artie/hotfix-integration-tests

Conversation

@artiepoole
Copy link
Copy Markdown
Collaborator

@artiepoole artiepoole commented Mar 27, 2026

adds error propagation up two levels from coverage test up to device script up to the tf job's _run command
fixes use of empty env var RUSTFLAGS

solves [#164](#164)

Signed-off-by: Artie Poole <stuart.poole@canonical.com>
@artiepoole artiepoole changed the title tests: fix binary tests since llvm-cov changes tests: fix binary test passing when failed and llvm-cov deprecated flag Mar 27, 2026
@artiepoole artiepoole marked this pull request as ready for review March 27, 2026 12:43
@artiepoole
Copy link
Copy Markdown
Collaborator Author

Marking ready to run the tests

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates CI/Testflinger coverage scripts to keep llvm-cov env setup compatible with newer cargo-llvm-cov flags and to ensure the binary-device test job fails when the underlying test command fails.

Changes:

  • Switch cargo llvm-cov show-env invocation from --export-prefix to --sh.
  • In the Testflinger binary device script, enable pipefail and propagate the real test exit status even when piping through tee.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tests/coverage_test.sh Updates llvm-cov environment setup flag to a non-deprecated shell output mode.
.github/testflinger-assets/test_binary_device_script.sh Fixes pipeline exit-code masking by capturing PIPESTATUS[0] and exiting with the test’s status.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

sets pipefail flag and catches sub-script return state
disable -e only around coverage pipeline

Signed-off-by: Artie Poole <stuart.poole@canonical.com>
@artiepoole artiepoole force-pushed the artie/hotfix-integration-tests branch from 6841b36 to d0ce10a Compare March 27, 2026 12:55
@artiepoole
Copy link
Copy Markdown
Collaborator Author

Integrated copilot's suggestion of using +e/-e around the sub-script call

Signed-off-by: Artie Poole <stuart.poole@canonical.com>
@artiepoole
Copy link
Copy Markdown
Collaborator Author

The result of _run was not being propagated out. Trying to catch that in the TF script now

@artiepoole
Copy link
Copy Markdown
Collaborator Author

Thank worked. Patching the :- now

Signed-off-by: Artie Poole <stuart.poole@canonical.com>
@artiepoole
Copy link
Copy Markdown
Collaborator Author

Copy link
Copy Markdown
Collaborator

@talhaHavadar talhaHavadar left a comment

Choose a reason for hiding this comment

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

just had a minor comment regarding journaling

@artiepoole artiepoole enabled auto-merge (squash) March 30, 2026 07:07
@artiepoole artiepoole merged commit 28dec56 into main Mar 30, 2026
12 of 16 checks passed
@artiepoole artiepoole deleted the artie/hotfix-integration-tests branch March 30, 2026 07:07
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.

tests: github shows green when coverage_test.sh fails tests: llvm-cov flag is changing name

5 participants