Skip to content

Events directory restructuring #13333

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 3 commits into from
Jul 29, 2020
Merged

Conversation

gpsimenos
Copy link
Contributor

@gpsimenos gpsimenos commented Jul 22, 2020

Summary of changes

mbed-os/events directory restructured according to the internal proposal.

  • Public headers moved into mbed-os/events/include/events folder
  • Unity tests moved into mbed-os/events/tests/UNITTESTS folder
  • Greentea tests moved into mbed-os/events/tests/TESTS folder
  • 'Local' profiling tests moved into mbed-os/events/tests/unit folder
  • Duplicate 'local' unit tests removed
  • Include paths updated where necessary

This is one of a series of PRs aiming to clean up the mbed-os directory structure. The intention is to create a consistent tree among mbed components, following the below structure:

[component name]
├── mbed_lib.json                     // Each component comes with their own config that's appended to the App/System ├── config 
├── CMakeList.txt                     // This depends on the build system choices, part of another PREQ
├── README.md
├── include                           // The top-level include path
│   └── [component name]              // Public headers that can be accessed by the developers - `#include [component name]/*.h`
│       └── internal                  // Internal headers that implement or are included by a public header or are needed by other Mbed OS libraries - `#include [component name]/internal/*.h`
├── source                            // Source files and private headers, available only inside the component's source directory
└── tests
    ├── <framework>                   // <framework> test folder (for example CPPUTEST)
    │   └── <test suite one>          // Can be either source file or a directory
    ├── UNITTESTS                     // Unit tests (previously in UNITTESTS) folder using googletest framework (to be renamed to gtest at a later stage)
    │   └── <unit test suite one>     // Can be either source file or a directory
    └── TESTS                         // Greentea tests (previously in TESTS) folder (to be renamed to greentea at a later stage)
        └── <greentea test suite one> // Can be either source file or a directory
 
mbed-os
└── TESTS (to be renamed to greentea at a later stage)
    ├── integration   
    └── system

Impact of changes

'Local' unit tests (previously in events/source/tests) are duplicates of newer greentea tests and thus have been removed. The profiling tests (previously also in events/source/tests) have been moved to mbed-os/events/tests/unit. To run them, cd into the new location and run make prof.

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
(equeue main.cpp modified to remove MBED_EXTENDED_TESTS check)
mbed test -m K64F -t GCC_ARM --greentea -n events-tests-tests-events-timing,events-tests-tests-events-equeue,events-tests-tests-events-queue

Build successes:
  * K64F::GCC_ARM::EVENTS-TESTS-TESTS-EVENTS-EQUEUE
  * K64F::GCC_ARM::EVENTS-TESTS-TESTS-EVENTS-QUEUE
  * K64F::GCC_ARM::EVENTS-TESTS-TESTS-EVENTS-TIMING
  * K64F::GCC_ARM::MBED-BUILD

===================================================================

(equeue main.cpp modified to remove MBED_EXTENDED_TESTS check)
mbed test -m K64F -t GCC_ARM --greentea -n events-tests-tests-events-timing,events-tests-tests-events-equeue,events-tests-tests-events-queue --app-config TESTS/configs/baremetal.json

Build successes:
  * K64F::GCC_ARM::EVENTS-TESTS-TESTS-EVENTS-EQUEUE
  * K64F::GCC_ARM::EVENTS-TESTS-TESTS-EVENTS-QUEUE
  * K64F::GCC_ARM::EVENTS-TESTS-TESTS-EVENTS-TIMING
  * K64F::GCC_ARM::MBED-BUILD

===================================================================

mbed test --unittests --compile

. . .
[ 11%] Built target events-equeue.MbedOS
. . .
[ 62%] Built target events-equeue
. . .

Unit tests built successfully.

Reviewers

@evedon
@ashok-rao
@LDong-Arm


@mergify
Copy link

mergify bot commented Jul 22, 2020

This PR cannot be merged due to conflicts. Please rebase to resolve them.

@mergify mergify bot added the needs: work label Jul 22, 2020
@gpsimenos gpsimenos force-pushed the gp-events-restruct branch from 6687caa to cd19531 Compare July 22, 2020 12:41
@gpsimenos
Copy link
Contributor Author

Rebased.

evedon
evedon previously approved these changes Jul 22, 2020
@gpsimenos gpsimenos force-pushed the gp-events-restruct branch from cd19531 to 52e78ac Compare July 22, 2020 13:36
@mergify mergify bot dismissed evedon’s stale review July 22, 2020 13:36

Pull request has been modified.

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 22, 2020

Travis events job is still failing, please review

@ciarmcom ciarmcom added the release-type: patch Indentifies a PR as containing just a patch label Jul 22, 2020
@ciarmcom ciarmcom requested review from ashok-rao, evedon, LDong-Arm and a team July 22, 2020 15:00
@ciarmcom
Copy link
Member

@gpsimenos, thank you for your changes.
@evedon @ashok-rao @LDong-Arm @ARMmbed/mbed-os-wan @ARMmbed/mbed-os-core @ARMmbed/mbed-os-ipcore @ARMmbed/mbed-os-maintainers please review.

@mergify
Copy link

mergify bot commented Jul 23, 2020

This PR cannot be merged due to conflicts. Please rebase to resolve them.

@mergify mergify bot removed the needs: review label Jul 23, 2020
@gpsimenos gpsimenos force-pushed the gp-events-restruct branch from 712eed4 to 4824dad Compare July 24, 2020 08:15
@gpsimenos
Copy link
Contributor Author

Rebased.

evedon
evedon previously requested changes Jul 24, 2020
Copy link
Contributor

@evedon evedon left a comment

Choose a reason for hiding this comment

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

Profiling tests should be restored (so we might all well restore the two test files)

@gpsimenos gpsimenos force-pushed the gp-events-restruct branch from 4824dad to 3070ebc Compare July 27, 2020 07:52
@mergify mergify bot dismissed evedon’s stale review July 27, 2020 07:53

Pull request has been modified.

@gpsimenos
Copy link
Contributor Author

Rebased and restored profiling tests. Didn't restore unit tests as those have been ported to greentea.

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 27, 2020

I'll start CI once netsocket is in (fixing CI)

evedon
evedon previously approved these changes Jul 27, 2020
@evedon
Copy link
Contributor

evedon commented Jul 27, 2020

@gpsimenos PR approved but you still need to update "Impact of changes"

@mergify mergify bot added needs: work and removed needs: CI labels Jul 27, 2020
@mergify
Copy link

mergify bot commented Jul 27, 2020

This PR cannot be merged due to conflicts. Please rebase to resolve them.

@gpsimenos gpsimenos force-pushed the gp-events-restruct branch from 3070ebc to fe7ae8a Compare July 28, 2020 08:18
@gpsimenos
Copy link
Contributor Author

Rebased again.

@mergify mergify bot dismissed evedon’s stale review July 28, 2020 08:18

Pull request has been modified.

@gpsimenos
Copy link
Contributor Author

All comments have been addressed. Let's run CI.

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 29, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented Jul 29, 2020

Test run: SUCCESS

Summary: 7 of 7 test jobs passed
Build number : 1
Build artifacts

@0xc0170 0xc0170 merged commit f20f93a into ARMmbed:master Jul 29, 2020
@mergify mergify bot removed the ready for merge label Jul 29, 2020
@mbedmain mbedmain added release-version: 6.2.1 Release-pending and removed release-type: patch Indentifies a PR as containing just a patch Release-pending labels Aug 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants