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 greentea-client dependency detection #93

Merged
merged 2 commits into from
Mar 4, 2016
Merged

Add greentea-client dependency detection #93

merged 2 commits into from
Mar 4, 2016

Conversation

stegut01
Copy link
Contributor

@stegut01 stegut01 commented Mar 4, 2016

Description

Added detection of greentea-client dependency. Print warning if greentea-client is not in dependencies and abort test.

Fixes issue #84

Example

Example shows console output if greentea-client is not specified.

$ mbedgt -VS
mbedgt:
        *****************************************************************************************
        * We've noticed that NO 'greentea-client' module is specified in                        *
        * dependency/testDependency section of this module's 'module.json' file.                *
        *                                                                                       *
        * This version of Greentea requires 'greentea-client' module.                           *
        * Please downgrade to Greentea before v0.2.0:                                           *
        *                                                                                       *
        * $ pip install "mbed-greentea<0.2.0" --upgrade                                         *
        *                                                                                       *
        * or port your tests to new Async model: https://github.com/ARMmbed/greentea/pull/78    *
        *****************************************************************************************

mbedgt: completed in 0.00 sec


# Check if greentea-client is in module.json of repo to test, otherwise abort
if not yotta_module.check_greentea_client():
gt_logger.gt_log("""
Copy link
Contributor

Choose a reason for hiding this comment

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

You need to more verbose:

gt_logger.gt_log("""
*****************************************************************************************
* We've noticed that 'greentea-client' module is specified in dependency/testDependency *
* section of this module's 'module.json' file.                                          *
*                                                                                       *
* This version of Greentea doesn't support 'greentea-client' module.                    *
* Please downgrade to Greentea before v0.2.0:                                           *
*                                                                                       *
* $ pip install mbed-greentea<0.2.0 --upgrade                                           *
*                                                                                       *
* or port your tests to new Async model: https://github.com/ARMmbed/greentea/pull/78    *
*****************************************************************************************
""")

@PrzemekWirkus
Copy link
Contributor

On Linux this works:

$ sudo pip install "mbed-greentea<0.2.0" -U

See quotes around greentea module name and version.

@PrzemekWirkus
Copy link
Contributor

Changed also on Windows:

$ pip install "mbed-greentea<0.2.0" --upgrade
...
$ mbedgt --version
0.1.20

$ mbedhtrun --version
0.1.24

+1

PrzemekWirkus added a commit that referenced this pull request Mar 4, 2016
Add greentea-client dependency detection
@PrzemekWirkus PrzemekWirkus merged commit 9260c42 into ARMmbed:master Mar 4, 2016
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