Commit Graph

66 Commits (5bb3ede8904d2488c60b1d7539dff2edcce87062)

Author SHA1 Message Date
jeromecoutant 109524d83d NOT_SUPPORTED error was not supported any more in test_api.py script 2018-05-17 11:58:13 +02:00
Cruz Monrreal 83d7444331
Merge pull request #6886 from cmonr/additional-py3-fixes
Corrected iteritems py2/3 compatability in test_api.py
2018-05-15 10:08:28 -05:00
Cruz Monrreal II daa0f9bc35 Corrected iteritems py2/3 compatability in test_api.py 2018-05-11 13:17:48 -05:00
Andrew Leech badd753466 mbed test: add argument `--ignore` to allow passing in extra mbedignore args
In particular this allows ignoring a project main.cpp file when running unit tests
2018-05-09 10:02:02 +10:00
Cruz Monrreal 53d3c4344f
Merge pull request #6781 from theotherjimmy/refactor-notify
tools: Refactor notification API
2018-05-07 10:48:48 -05:00
Jimmy Brisson c186c3ce86 Use mocked notifier for individual tests
That way we separate the collection of notifications from everything else
2018-05-03 10:06:47 -05:00
Jimmy Brisson 0f7e900417 Pass app config to get config
This corrects a bug which would manifest as --app-config not having
much of an affect on test builds (not the first libary bulid)
2018-05-02 09:38:44 -05:00
Jimmy Brisson dc006d6aa3 Remove silent from test invocation
apparently I forgot earlier
2018-04-30 14:44:02 -05:00
Jimmy Brisson de91c93108 Use new notifier API in test infra 2018-04-26 09:32:43 -05:00
Cruz Monrreal II b286838ebf Updated python tools to be cimpliant with PEP 3113 2018-04-10 13:37:47 -05:00
Jimmy Brisson 1dd39fbe80 Python2+3: mbed test --compile 2018-02-05 11:07:37 -06:00
Jimmy Brisson cca4425af6 Python2+3: iteritems -> items 2018-02-05 11:04:36 -06:00
Jimmy Brisson 45bdd98a85 Python2+3: tests import correctly 2018-02-05 11:04:36 -06:00
Christopher Haster d82d9888d4 Added COMMON folder for tests
A COMMON folder allows code reuse across different test cases. This
avoids code duplication or code enterying the application space.

The COMMON folder is uppercase to match naming conventions in Mbed OS.
2018-01-09 16:11:14 -06:00
Jenny Plunkett b3e8dec8ea Updated get_test_config function returns comment 2017-11-13 15:01:11 -06:00
Jimmy Brisson da78647c1d Merge pull request #5077 from dhwalters423/dhwalters423-add-detect-info
Added interface version information to mbed detect command.
2017-10-05 11:11:33 -05:00
Sarah Marsh 6a44ceb094 Add copyright headers and use mbed error to skip tests without network config files 2017-09-20 18:31:06 -05:00
Sarah Marsh 4161e5c48d Move test config keys out of targets.json
Change TestConfig class methods to module methods
2017-09-20 18:30:08 -05:00
Sarah Marsh ba6eb98b5c Use only one flag for test configuration file
Tools will figure out if user passed in a custom path (to indicate configration file for module) or whether they used a keyword (to indicate they'd like to use an mbed OS configuration)
2017-09-20 18:29:37 -05:00
Sarah Marsh e982eed4ad Add option to add a configuration file for modules 2017-09-20 18:27:59 -05:00
Sarah Marsh 8c0bc781d9 Allow tools to use networkinterface configs in tests 2017-09-20 18:27:59 -05:00
David Walters e4b55dd6a0 Removed get_mounted_details_txt from test_api.py
Fixed minor typos in test_api.py
Added get_interface_version to detect_targets
2017-09-15 10:15:24 +01:00
David Walters d43a847667 Added additional DAPLink version info for `mbed detect` command` 2017-09-11 16:54:32 +01:00
Jimmy Brisson 5bcd97a2bc Merge pull request #4984 from theotherjimmy/unify-unit-tests
Unify mbed OS tools testing style with what's used in mbed-ls, htrun, greentea
2017-09-06 14:26:14 -05:00
Martin Kojtal b99e6b5f7a Pass stats depth to singletest correctly
Fixes #4930
2017-08-31 10:41:20 -05:00
Jimmy Brisson a2bcae0b7a Rework test_api testing and fix a bug
Bug was found by the new tests
2017-08-28 15:40:35 -05:00
Marcelo Salazar 7053ef9412 memap enhancements with depth level configurable
Removed heap/stack from report
Add --stats-depth option to mbed compile
Fix minor issues identified in review
Fix bug when parsing armcc libs
Fix code style
Fix minor issues on existing tests
Fix memap for automated TESTS
Fix stats-depth parameter for tests
2017-08-06 10:30:04 +01:00
Jimmy Brisson b2901098cd Update test_api call to prepare_toolchain
An earlier patch in this series changed the API for
`build_api.prepare_toolchain`. This commit updates the `find_test`
function to call `prepare_toolchain` correctly.
2017-03-06 18:37:46 -06:00
Jimmy Brisson 83e843bd8c Fix access before variable defined bug in test_api
The worker_result variable was not guaranteed to have a `'result'` or
`'reason'` key and accessing them before testing for them could result
in an error when they are not provided. This patch changes the checks to
prevent check for their existence before accessing them.
2017-02-08 13:56:43 -06:00
Brian Daniels 3baeb8a8a7 Preventing app_config from clobbering CLI macros 2017-01-03 13:27:12 -05:00
Brian Daniels 57e693de86 Passing toolchain path info to subprocesses.
Since the toolchain path info lives as a global variable, its not
propigating to the subprocesses that are created to compile the tests in
parallel. This change manually passes these global variables and then
reassigns them.
2016-11-17 12:20:34 -08:00
Sam Grove 9d8ec61df5 Merge pull request #3258 from sarahmarshy/build_test_err
Prevent process pool inside of process pool when building tests
2016-11-14 21:54:24 -06:00
ARM 9f39132d3b Prevent process pool inside of process pool when building tests 2016-11-10 14:41:19 -07:00
Brian Daniels e3ff8da6f0 Test spec baud_rate now set based on mbed config 2016-11-10 15:21:18 -06:00
Brian Daniels 0e4b841cb3 Removing need for memap to printed through toolchains 2016-10-11 18:24:01 -05:00
Brian Daniels 655c37715c Handling output of parallelized test building.
This makes use of the reports generated by the building of tests to
prevent output from interleaving when the build is parallelized. This
required some changes to memap to return a generated string from
the 'generate_output' function. I also had an option to stop the prints
from memap to prevent text from interleaving
2016-10-11 15:34:20 -05:00
Brian Daniels 87103abd56 Making building and linking tests fully parallel.
This uses similar code that is used withing the toolchains to parallelize
the linking process of all the tests accross all the available CPUs. It
also respects the `-j` parameter if you wish to limit the number of cores
used.
2016-10-11 13:24:50 -05:00
Brian Daniels e0b0ad05cb Adding build profiles configuration to build_release.py and singletest.py 2016-09-30 16:54:34 -05:00
Sam Grove b3522fe9d4 Merge pull request #2855 from bridadan/handle-exceptions-better
[Tools] Handling Exceptions better when building tests
2016-09-30 15:23:08 -05:00
Jimmy Brisson d88852d150 Replace -o with profiles 2016-09-29 10:20:05 -05:00
Brian Daniels cadcc80371 Handling Exceptions better when building tests
Previously, when building tests with test.py, if an exception occurred, the
error message would be masked by the function 'build_tests'. This commit
handles NotSupportedExceptions and ToolExceptions, but lets all other
Exceptions propigate up to the caller function. In most cases, this is the
CLI scripts, which will print a traceback. This will allow us to better
debug the python tools if errors occur.
2016-09-28 14:13:23 -05:00
Conor Keegan 7c72a22508 Add test command switch for app config file 2016-09-10 15:29:19 +01:00
Sam Grove da5a19f149 Merge pull request #2630 from sarahmarshy/patch-4
Test names not dependent on disk location of root
2016-09-10 07:25:04 -05:00
sarahmarshy ac11d94724 Test names not dependent on disk location of root
#2613 should be merged first 
Using test_api, I found that the test names were dependent on where mbed-os (if that is the root) is stored on disk if you provide anything other than '.' as the root directory. 
This would change names like: 
```
repos-mbed-os-example-blinky-mbed-os-features-storage-feature_storage-tests-cfstore-example3
```
to
```
features-storage-feature_storage-tests-cfstore-example3
```
2016-09-06 10:23:32 -05:00
Brian Daniels 8b9a6dc19d Correctly providing directories to build_apis
The shared `prepare_toolchain` and `scan_resources` functions in build_api
expect a list, not a string. This is different from the
toolchain.scan_resources function. Now the functions are being used
correctly within the `find_tests` function in test_api
2016-09-02 11:32:11 -05:00
Sam Grove 64928b02df Merge pull request #2244 from bridadan/test-discovery-refactor
Test discovery refactor
2016-07-26 15:45:41 -05:00
Sam Grove f9d38bff37 Merge pull request #2062 from bridadan/shorten-test-binary-name
Changing name of test binaries to just test case folder name.
2016-07-26 00:24:08 -05:00
Brian Daniels 1618e608e7 Test discovery now uses build and toolchain logic
Previously, test discovery throught test.py used its own logic to find
tests. This was mostly a subset of the rules used during the build
process. It respected .mbedignore files, but it did not respect TARGET_,
TOOLCHAIN_, and FEATURES_ directories. This change now uses the same logic
used during building to respect these folders. Tests under these folders
that are not being pulled in for the given target will be ignored.
2016-07-25 14:43:52 -05:00
Mihail Stoyanov 74b7f9e923 mbed Online Build System support:
* added/improved global chroot support
* added RESPONSE_FILES flag to support optional response files (on linux the cmd param length is 2 megabytes). Default True
* added unified handling for archive and link response file (similar to includes)
* added COMPILE_C_AS_CPP flag to support compiling of c files as cpp. Default False
* added mbedToolchain.init() for post __init__ hooks
* added caching to mbedToolchain.need_update() to reduce IO hits
* added support to identify compiler warning/error column (supports ARMCC, GCC and IAR). Errors/warnings now report file@line,col
* added global TOOLCHAIN_PATHS which allows overriding/changing of the toolchain paths. Also simplified ARM-related paths
* added target.json to mbed library release (by @0xc0170)* migrated compile_worker() to utils.py for lightweight thread initialization
* improved run_cmd() performance by removing unnecessary check about the command being executed (should be checked once in the relevant toolchain instead)
* removed remnants of Goanna support (should be reimplemented as hooks to compile/link/archive instead)
* fixes for Python 2.7 compatibility (by @0xc0170)
* fixes for Exporters (by @0xc0170)
2016-07-19 11:14:42 +01:00
Jimmy Brisson 0ec8199c55 Revert "Revert "Generalize flag handling""
This reverts commit 33cec194c6.
2016-07-07 15:29:36 -05:00