Skip to content
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

Add CTest support for mbed-drivers-ticker greentea test #14892

Merged
merged 8 commits into from
Aug 11, 2021

Conversation

rwalton-arm
Copy link
Contributor

@rwalton-arm rwalton-arm commented Jul 8, 2021

Summary of changes

This PR adds CTest support for greentea tests, and enables it for the
mbed-drivers-ticker test.

This PR makes the following changes:

  • Moves post-build functions out of root CMakeLists.txt to CMake module
  • Adds a BUILD_GREENTEA_TESTS option to enable greentea tests
  • Sets variables usually defined by external applications in root CMakeLists.txt
  • Enable CTest for the mbed-drivers-ticker test, using mbedhtrun to run the test
  • Adds an MBED_HTRUN_ARGUMENTS cache variable which is a list of options to forward to mbedhtrun

Checks have been added in mbed_greentea.cmake to keep the old flow working.
These checks should be removed once all tests are reworked.

Fixes #14852

Impact of changes

Migration actions required

Documentation

#14854

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)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[x] Tests / results supplied as part of this PR

Reviewers


@ciarmcom ciarmcom added the release-type: patch Indentifies a PR as containing just a patch label Jul 8, 2021
@ciarmcom ciarmcom requested a review from a team July 8, 2021 09:30
@ciarmcom
Copy link
Member

ciarmcom commented Jul 8, 2021

@rwalton-arm, thank you for your changes.
@ARMmbed/mbed-os-maintainers please review.

@rwalton-arm
Copy link
Contributor Author

rwalton-arm commented Jul 8, 2021

This isn't ready for review yet. Still draft PR.

Ready for review now.

Copy link
Contributor

@LDong-Arm LDong-Arm left a comment

Choose a reason for hiding this comment

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

@rwalton-arm Thanks, this looks and works really well! I just added some comments.

CMakeLists.txt Outdated Show resolved Hide resolved
tools/cmake/mbed_greentea.cmake Show resolved Hide resolved
tools/cmake/mbed_greentea.cmake Show resolved Hide resolved
tools/cmake/mbed_greentea.cmake Outdated Show resolved Hide resolved
Copy link
Contributor

@LDong-Arm LDong-Arm left a comment

Choose a reason for hiding this comment

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

I've added a few more comments

tools/cmake/mbed_greentea.cmake Outdated Show resolved Hide resolved
tools/cmake/mbed_greentea.cmake Outdated Show resolved Hide resolved
tools/cmake/mbed_greentea.cmake Outdated Show resolved Hide resolved
tools/cmake/mbed_greentea.cmake Outdated Show resolved Hide resolved
Copy link
Contributor

@LDong-Arm LDong-Arm left a comment

Choose a reason for hiding this comment

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

Verified on K64F, after rebasing the PR to have the greentea-client I/O fix.

@mergify mergify bot dismissed LDong-Arm’s stale review July 12, 2021 14:14

Pull request has been modified.

Copy link
Contributor

@LDong-Arm LDong-Arm left a comment

Choose a reason for hiding this comment

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

Thanks for the update, I just added one question.

tools/cmake/mbed_greentea.cmake Outdated Show resolved Hide resolved
tools/cmake/mbed_greentea.cmake Outdated Show resolved Hide resolved
@rwalton-arm rwalton-arm force-pushed the greentea_ctest branch 2 times, most recently from 8501ef1 to 9686d1d Compare July 13, 2021 08:26
LDong-Arm
LDong-Arm previously approved these changes Jul 13, 2021
@mergify mergify bot added needs: CI and removed needs: work labels Jul 13, 2021
0xc0170
0xc0170 previously approved these changes Jul 14, 2021
We weren't setting the "supported_application_profiles" correctly for
some baremetal supported targets. This didn't cause build failures with
mbed-cli 1 as it just seems to ignore this config parameter. In our CMake
build system we have added a hard dependency on the
supported_application_profiles; we fail the build if the profile we're
trying to build isn't in the list.
The github workflow to test building multiple executables was using the
soon to be deprecated docker image "mbedos/mbed-os-env:latest". This
commit points it at the new docker image on ghcr.io.
@mergify mergify bot dismissed Patater’s stale review August 11, 2021 09:16

Pull request has been modified.

@Patater
Copy link
Contributor

Patater commented Aug 11, 2021

CI restarted

@mbed-ci
Copy link

mbed-ci commented Aug 11, 2021

Jenkins CI Test : ❌ FAILED

Build Number: 4 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM
jenkins-ci/mbed-os-ci_cmake-example-ARM
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM
jenkins-ci/mbed-os-ci_build-example-GCC_ARM
jenkins-ci/mbed-os-ci_build-example-ARM

@Patater
Copy link
Contributor

Patater commented Aug 11, 2021

Jenkins CI Test : x FAILED

Build Number: 4 | lock Jenkins CI Job | globe_with_meridians Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests heavy_check_mark
jenkins-ci/mbed-os-ci_cmake-cloud-example-ARM heavy_check_mark
jenkins-ci/mbed-os-ci_build-cloud-example-ARM heavy_check_mark
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM heavy_check_mark
jenkins-ci/mbed-os-ci_cmake-cloud-example-GCC_ARM heavy_check_mark
jenkins-ci/mbed-os-ci_build-greentea-ARM heavy_check_mark
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM x
jenkins-ci/mbed-os-ci_cmake-example-ARM x
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM x
jenkins-ci/mbed-os-ci_build-example-GCC_ARM x
jenkins-ci/mbed-os-ci_build-example-ARM x

Don't panic. This was the aborted run.

@mbed-ci
Copy link

mbed-ci commented Aug 11, 2021

Jenkins CI Test : ✔️ SUCCESS

Build Number: 5 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️

@Patater Patater merged commit 159f832 into ARMmbed:master Aug 11, 2021
@mergify mergify bot removed the ready for merge label Aug 11, 2021
hazzlim added a commit to hazzlim/mbed-os that referenced this pull request Aug 11, 2021
Following approach defined in ARMmbed#14892 and ARMmbed#14902, events greentea tests
are ported to enable running with CTest.
hazzlim added a commit to hazzlim/mbed-os that referenced this pull request Aug 11, 2021
Following approach defined in ARMmbed#14892 and ARMmbed#14902, events greentea tests
are ported to enable running with CTest.
hazzlim added a commit to hazzlim/mbed-os that referenced this pull request Aug 11, 2021
Following approach defined in ARMmbed#14892 and ARMmbed#14902, events greentea tests
are ported to enable running with CTest.
hazzlim added a commit to hazzlim/mbed-os that referenced this pull request Aug 12, 2021
Following the approach defined in ARMmbed#14892 and ARMmbed#14902, events greentea
tests are ported to enable running with CTest.

events/equeue requires MBED_EXTENDED_TESTS.
events/queue and events/timing both require DEVICE_USTICKER.
hazzlim added a commit to hazzlim/mbed-os that referenced this pull request Aug 13, 2021
Following the approach defined in ARMmbed#14892 and ARMmbed#14902, events greentea
tests are ported to enable running with CTest.

events/queue and events/timing both require DEVICE_USTICKER.
hazzlim added a commit to hazzlim/mbed-os that referenced this pull request Aug 13, 2021
Following the approach defined in ARMmbed#14892 and ARMmbed#14902, events greentea
tests are ported to enable running with CTest.

events/queue and events/timing both require DEVICE_USTICKER.
hazzlim added a commit to hazzlim/mbed-os that referenced this pull request Aug 13, 2021
Following the approach defined in ARMmbed#14892 and ARMmbed#14902, events greentea
tests are ported to enable running with CTest.

events/queue and events/timing both require DEVICE_USTICKER.
hazzlim added a commit to hazzlim/mbed-os that referenced this pull request Aug 13, 2021
Following the approach defined in ARMmbed#14892 and ARMmbed#14902, events greentea
tests are ported to enable running with CTest.

events/queue and events/timing both require DEVICE_USTICKER.
hazzlim added a commit to hazzlim/mbed-os that referenced this pull request Aug 20, 2021
Following the approach defined in ARMmbed#14892 and ARMmbed#14902, events greentea
tests are ported to enable running with CTest.

events/queue and events/timing both require DEVICE_USTICKER.
hazzlim added a commit to hazzlim/mbed-os that referenced this pull request Aug 20, 2021
Following the approach defined in ARMmbed#14892 and ARMmbed#14902, events greentea
tests are ported to enable running with CTest.

events/queue and events/timing both require DEVICE_USTICKER.
@mbedmain mbedmain removed release-type: patch Indentifies a PR as containing just a patch Release-pending labels Aug 23, 2021
hazzlim added a commit to hazzlim/mbed-os that referenced this pull request Sep 18, 2021
Following the approach defined in ARMmbed#14892 and ARMmbed#14902, events greentea
tests are ported to enable running with CTest.

events/queue and events/timing both require DEVICE_USTICKER.
hazzlim added a commit to hazzlim/mbed-os that referenced this pull request Sep 27, 2021
Following the approach defined in ARMmbed#14892 and ARMmbed#14902, events greentea
tests are ported to enable running with CTest.

events/queue and events/timing both require DEVICE_USTICKER.
hazzlim added a commit to hazzlim/mbed-os that referenced this pull request Oct 2, 2021
Following the approach defined in ARMmbed#14892 and ARMmbed#14902, events greentea
tests are ported to enable running with CTest.

events/queue and events/timing both require DEVICE_USTICKER.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
10 participants