Skip to content

Print the command when a greentea test is being run. Also fix mbedhtrun not being on PATH causing all tests to pass! #51

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

Merged
merged 2 commits into from
Sep 20, 2022

Conversation

multiplemonomials
Copy link
Collaborator

Summary of changes

  • Print the command when a host test is being run. This makes it easier to understand what the test runner is doing behind the scenes. It looks like:
Executing: mbedhtrun --skip-flashing -f testshield-spi.bin -p COM3 -m NUCLEO_L452RE_P --baud-rate=115200
  • While developing this, I noticed that one could get a free pass on all tests if mbedhtrun was not in your PATH. Apparently failing to find an executable does not count as a "command error" in CMake?? I changed how it invokes mbedhtrun to fix this.

Impact of changes

Migration actions required

Documentation

Working on testing documentation rn


Pull request type

[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[X] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers

@JohnK1987
@jay-sridharan


…un not being on PATH causing all tests to pass!
@JohnK1987
Copy link
Member

It seems be ok.

I tried it and expected command was printed in console output.

2: Executing: mbedhtrun --skip-flashing -p COM3 -e C:/Users/User/MbedCE_GreenTea/mbed-os/hal/tests/TESTS/mbed_hal/common_tickers/../../host_tests -m NUCLEO_F767ZI --baud-rate=9600

BR, Jan

@multiplemonomials
Copy link
Collaborator Author

Sweet! Can you leave an approving review so I can merge? You have to go to the files changed tab, click Review changes, and submit an approval.
image

@multiplemonomials multiplemonomials merged commit f317dbc into master Sep 20, 2022
@multiplemonomials multiplemonomials deleted the dev/print-test-command branch September 20, 2022 04:38
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