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

[Exporters][morph export-build] Adds build tests for make exporters and suppresses TargetNotSupported traceback #3134

Closed
wants to merge 1 commit into from

Conversation

sarahmarshy
Copy link
Contributor

@sarahmarshy sarahmarshy commented Oct 25, 2016

Description

Add export build tests for the new make exporters. In addition, I am suppressing the traceback for targets unsupported by IDEs. I am also suppressing the duplicate file warnings generated by the zip export.

Status

READY

Todos

Steps to test or reproduce

python build_test.py -m whatever -i make_gcc_arm,make_iar,make_armc5

Traceback change:
Previously:

$ mbed export -m rz_a1h -i uvision
WARNING: MBED_ARM_PATH set as environment variable but doesn't exist
C:\Python27\lib\site-packages\fuzzywuzzy-0.11.1-py2.7.egg\fuzzywuzzy\fuzz.py:35: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning
Scan: ..
Scan: FEATURE_BLE
Scan: FEATURE_COMMON_PAL
Scan: FEATURE_LWIP
Scan: FEATURE_UVISOR
Scan: FEATURE_LOWPAN_BORDER_ROUTER
Scan: FEATURE_LOWPAN_HOST
Scan: FEATURE_LOWPAN_ROUTER
Scan: FEATURE_NANOSTACK
Scan: FEATURE_NANOSTACK_FULL
Scan: FEATURE_THREAD_BORDER_ROUTER
Scan: FEATURE_THREAD_END_DEVICE
Scan: FEATURE_THREAD_ROUTER
Scan: FEATURE_STORAGE
Traceback (most recent call last):
  File "C:\repos\mbed-os-example-blinky\mbed-os\tools\project.py", line 248, in <module>
    main()
  File "C:\repos\mbed-os-example-blinky\mbed-os\tools\project.py", line 242, in main
    zip_proj=zip_proj, build_profile=profile)
  File "C:\repos\mbed-os-example-blinky\mbed-os\tools\project.py", line 94, in export
    build_profile=build_profile, silent=silent)
  File "C:\repos\mbed-os-example-blinky\mbed-os\tools\project_api.py", line 229, in export_project
    macros=macros)
  File "C:\repos\mbed-os-example-blinky\mbed-os\tools\project_api.py", line 90, in generate_project_files
    exporter.generate()
  File "C:\repos\mbed-os-example-blinky\mbed-os\tools\export\uvision\__init__.py", line 197, in generate
    'device': DeviceUvision(self.target),
  File "C:\repos\mbed-os-example-blinky\mbed-os\tools\export\uvision\__init__.py", line 23, in __init__
    DeviceCMSIS.__init__(self, target)
  File "C:\repos\mbed-os-example-blinky\mbed-os\tools\export\cmsis\__init__.py", line 48, in __init__
    raise TargetNotSupportedException("Target not in CMSIS packs")
tools.export.exporters.TargetNotSupportedException: Target not in CMSIS packs
[mbed] ERROR: "python" returned error code 1.
[mbed] ERROR: Command "python -u C:\repos\mbed-os-example-blinky\mbed-os\tools\project.py -i uvision -m rz_a1h --source .." in "C:\repos\mbed-os-example-blinky\mbed-os"

Now:

$ mbed export -m rz_a1h -i uvision
WARNING: MBED_ARM_PATH set as environment variable but doesn't exist
C:\Python27\lib\site-packages\fuzzywuzzy-0.11.1-py2.7.egg\fuzzywuzzy\fuzz.py:35: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning
Scan: ..
Scan: FEATURE_BLE
Scan: FEATURE_COMMON_PAL
Scan: FEATURE_LWIP
Scan: FEATURE_UVISOR
Scan: FEATURE_LOWPAN_BORDER_ROUTER
Scan: FEATURE_LOWPAN_HOST
Scan: FEATURE_LOWPAN_ROUTER
Scan: FEATURE_NANOSTACK
Scan: FEATURE_NANOSTACK_FULL
Scan: FEATURE_THREAD_BORDER_ROUTER
Scan: FEATURE_THREAD_END_DEVICE
Scan: FEATURE_THREAD_ROUTER
Scan: FEATURE_STORAGE
Your target is not supported for the selected IDE.

Fixes trace back for unsupported targets.
@bridadan
Copy link
Contributor

@sarahmarshy Potentially dumb question, but how come the exporters still Scan the whole project before printing Your target is not supported for the selected IDE.? Does it need data from the scan before it can determine if the target is supported? This question is probably more intrinsic to the way the exporters are structured vs your changes specifically.

@sarahmarshy
Copy link
Contributor Author

sarahmarshy commented Oct 26, 2016

This is a vestige of downloading the CMSIS packs during export (meaning support could not be determined until the packs had been downloaded/parsed) and could probably be removed.

@sarahmarshy sarahmarshy reopened this Oct 26, 2016
@0xc0170
Copy link
Contributor

0xc0170 commented Oct 26, 2016

Please review

Copy link
Contributor

@bridadan bridadan left a comment

Choose a reason for hiding this comment

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

Changes look ok to me. We can get this merged before I add this to CI. That way we don't interfere with other PR runs.

@bridadan
Copy link
Contributor

/morph export-build

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph export-build

@bridadan
Copy link
Contributor

@sarahmarshy has superseded this PR with #3172. @0xc0170 This can be closed.

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