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

Bring mbed_host_tests (htrun) into standlone greentea python library #302

Merged
merged 7 commits into from
Jun 4, 2021

Conversation

rajkan01
Copy link
Contributor

mbed-host-tests is responsible for the mbedhtrun CLI module and it is maintaining and development happens from mbed-os-tools but making greentea library standalone as part of that mbed-host-tests moved from tools repo into this standalone greentea repo

@rajkan01 rajkan01 force-pushed the host-tests branch 4 times, most recently from 8ab6bdb to dbb6709 Compare May 24, 2021 22:01
@rwalton-arm
Copy link
Contributor

Are we planning to ship multiple python packages from this repository? I would suggest we don't do that, and use a one-to-one mapping of repository to python package. This is because it is much easier to set up auto versioning and release CI when the repo contains a single python package. It also helps with maintainability as the repo isn't as bloated.

@rajkan01 rajkan01 changed the title Bring mbed_host_tests (htrun) into standlone greentea python library (Work in progress) Bring mbed_host_tests (htrun) into standlone greentea python library May 25, 2021
@rajkan01 rajkan01 force-pushed the host-tests branch 5 times, most recently from 5536647 to 0d012dc Compare May 25, 2021 16:19
@rajkan01
Copy link
Contributor Author

rajkan01 commented May 27, 2021

This PR is ready for review as changes are split into multiple commits

- Move host-tests from mbed-o-tools into greentea repo
@rajkan01 rajkan01 force-pushed the host-tests branch 4 times, most recently from 742d872 to f91283b Compare May 27, 2021 11:30
src/htrun/__init__.py Outdated Show resolved Hide resolved
src/htrun/htrun.py Outdated Show resolved Hide resolved
src/htrun/__init__.py Show resolved Hide resolved
src/htrun/detect/__init__.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
src/htrun/.coveragerc Show resolved Hide resolved
requirements.txt Show resolved Hide resolved
src/htrun/README.md Show resolved Hide resolved
rajkan01 added 5 commits May 31, 2021 05:19
- Add required __init__.py module (copied from
mbed-os-tools/packages/mbed-host-tests)
- Rename hotst-tests to htrun (host-tests runner) as it is a
  framework to run a test on the host side.
- Update header section to 2021 year
- Update import from htrun instead of mbed-os-tools
- Added setup.py to create a single greentea python package
  for building, distributing, and installing Greentea standalone python library using the DistUtils.
- Combined Greentea CLI and htrun (host-tests runner) into a
  single setup script (setup.py) as going further `pip install greentea` does the installation of both CLI and htrun

Note:
still, Requirements.txt requires to keep mbed-host-tests until we upload new greentea source distro into pippy
setup.py Outdated Show resolved Hide resolved
src/htrun/__init__.py Outdated Show resolved Hide resolved
src/htrun/host_tests_runner/host_test.py Outdated Show resolved Hide resolved
src/htrun/host_tests_runner/target_base.py Outdated Show resolved Hide resolved
test/__init__.py Show resolved Hide resolved
Note:
Unfortunately found that some of the unused code and needs a further cleanup
Copy link
Contributor

@rwalton-arm rwalton-arm left a comment

Choose a reason for hiding this comment

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

Looks OK to me. Would be good for someone else to also take a look at this, as there are a lot of changes. @ARMmbed/mbed-os-core

@rajkan01
Copy link
Contributor Author

rajkan01 commented Jun 3, 2021

@LDong-Arm @rwalton-arm reviewed this PR and approved it, it would be great if you can also review this PR

Copy link

@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.

Looks good to me as an initial PR to import the code.

@rajkan01 Just out of curiosity, what commands/functionalities have you tried? And as the tests are also imported, did you get a chance to run them? (Could be tested when we add automated testing.)

@rajkan01
Copy link
Contributor Author

rajkan01 commented Jun 3, 2021

@LDong-Arm Thanks for reviewing and I tried this command htrun -d /media/arm/FRDM-K64FD -p /dev/ttyACM0 -f ~/projects/mbed/examples/mbed-os-example-blinky/cmake_build/K64F/develop/GCC_ARM/mbed-os-example-blinky.bin -C 4 -c shell -m k64f to make sure it able to run and flash blinky binary

@adbridge adbridge merged commit 159ca29 into ARMmbed:master Jun 4, 2021
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.

4 participants