Skip to content

Conversation

@LDong-Arm
Copy link
Contributor

@LDong-Arm LDong-Arm commented Aug 14, 2020

Summary of changes

As per the directory restructure plan, we get rid of features/frameworks by relocating libraries inside. This PR moves the following libraries used by Greentea tests into TESTS/COMMON:

  • greentea-client
  • utest
  • unity

For each library, headers are moved into a newly created include/.

This also fixes styles for greentea-client and utest as they are parts of mbed-os, owned by Arm. Ignore styling for unity which is large an external library.

Note: COMMON is a magic keyword of the build system to make components available all Greentea test cases. Without it, test cases will fail to find those libraries during compilation.

Other (non-test) frameworks libraries are covered by #13430

Impact of changes

None.

Migration actions required

None.

Documentation

None.


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

@ARMmbed/mbed-os-core @rajkan01 @jamesbeyond


@LDong-Arm LDong-Arm force-pushed the refactor_greentea_libraries branch from 3803519 to 84e7532 Compare August 14, 2020 11:11
@LDong-Arm
Copy link
Contributor Author

LDong-Arm commented Aug 14, 2020

Wait, I still need to change the internal structures of the test libraries. Done.

@ciarmcom ciarmcom added the release-type: patch Indentifies a PR as containing just a patch label Aug 14, 2020
@ciarmcom ciarmcom requested review from a team, jamesbeyond and rajkan01 August 14, 2020 11:30
@ciarmcom
Copy link
Member

@LDong-Arm, thank you for your changes.
@rajkan01 @jamesbeyond @ARMmbed/mbed-os-maintainers please review.

@LDong-Arm
Copy link
Contributor Author

LDong-Arm commented Aug 14, 2020

@0xc0170 @rajkan01 This PR has lots of style fixes, because greentea-client and utest are parts of mbed-os, owned by Arm. We somehow had their parent directory in .astyleignore before, now it's time to get styles right.

So please review by commits, thanks.

Copy link
Contributor

@rajkan01 rajkan01 left a comment

Choose a reason for hiding this comment

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

LGTM

@LDong-Arm
Copy link
Contributor Author

@adbridge @0xc0170 This should be ready for CI too, thanks

Copy link
Contributor

@adbridge adbridge left a comment

Choose a reason for hiding this comment

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

For future reference, it's bad practice to make formatting changes alongside the real purpose of the PR. They should really be done separately.

@mergify mergify bot added needs: CI and removed needs: work labels Aug 20, 2020
@adbridge
Copy link
Contributor

CI started

@mergify mergify bot added needs: work and removed needs: CI labels Aug 20, 2020
@mbed-ci
Copy link

mbed-ci commented Aug 20, 2020

Jenkins CI Test : ❌ FAILED

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

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-ARM
jenkins-ci/mbed-os-ci_build-GCC_ARM

Copy link
Contributor

@jamesbeyond jamesbeyond left a comment

Choose a reason for hiding this comment

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

the movings of
features/framwworks/utest/TESTS/unit_tests/case_setup_failure/main.cpp -> TESTS/COMMON/utest/TESTS/unit_tests/case_setup_failure/main.cpp
Not looking right for me

before moving they are in one level of TESTS folder, now they are in 2 level of TESTS

@jamesbeyond
Copy link
Contributor

jamesbeyond commented Aug 20, 2020

furthermore, I am not fully convinced that TESTS/COMMON is the right place to move. There are 2 separate things in here. Test Suites and Test Frameworks. in future the componentization model, I assume they will be separate components. As a test suite, you can put where ever you like. just like you move the suite into each individual module of TESTS folder. but framework should be in a fixed location. So maybe we should find a better suitable place for greentea and it related stuff.

@LDong-Arm
Copy link
Contributor Author

Moving Greentea-related libraries into the top-level TESTS/ is in accordance to our restructuring documentation, but PSA requires it (link) too. CI failed because the PSA example (and any non-test apps) can't find anything in TESTS.

Also, having TESTS/ somewhere inside the top-level TESTS/ is a problem as @jamesbeyond noted - very good catch. Our build system can't find the nested TESTS/.

And it's not possible to have both tests and TESTS - many systems (e.g. Windows, macOS) don't distinguish them. I guess we need to revise our proposal and find a different place for Greentea libraries... @evedon

@LDong-Arm
Copy link
Contributor Author

Closing this PR as it's proven not feasible - CI is catching it for us. We need another PR once we've decided on a different directory for the test framework.

@LDong-Arm LDong-Arm closed this Aug 20, 2020
@mergify mergify bot removed needs: work release-type: patch Indentifies a PR as containing just a patch labels Aug 20, 2020
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.

6 participants