Commit Graph

41 Commits (d88852d15017691d89bb5f7bafa847552da7a5d6)

Author SHA1 Message Date
Sam Grove e9c556d356 Merge pull request #2757 from theotherjimmy/non-global-config
Refactor Target and Config away from global variables
2016-09-22 17:23:04 -05:00
Sarah Marsh 16913b93a6 New build tests.
*Changes*
- Parallel export
- mbed-os tests added
- specified release version (default to 5)
- default tests AND targets dependent on specified release version
2016-09-22 10:03:34 -05:00
Sam Grove 6fce892f05 Merge pull request #2614 from MarceloSalazar/uvision_default
Change default uvision exporter to uvision5
2016-09-22 00:46:18 -05:00
Jimmy Brisson d4f9820577 Refactor Target and Config away from global variables 2016-09-20 16:09:22 -05:00
Marcelo Salazar 64d33810fc Minor tweak on spaces 2016-09-16 10:11:07 +01:00
Bogdan Marinescu 8852b2edec Removed hidden argument to set_targets_json_location
The previous code used a variable that was internal to the Target class.
This commit removes the argument to `set_targets_json_location`
completely, which forces Target to use the default locatio internally.
2016-09-13 16:45:32 +03:00
Bogdan Marinescu d7899b4b2b Removed custom targets from config system
Custom targets were the origin of a number of issues with the mbed
tools, so it was decided that they need to be removed. This PR does just
that (and moves the "custom_targets" part of the config system tests
into a separate, per-test "targets.json" file to preserve the test
functionality).
2016-09-13 15:54:44 +03:00
Marcelo Salazar 1192744a06 Minor fix to match with master 2016-09-12 20:12:54 +01:00
Marcelo Salazar ca35755167 Change default uvision exporter to uvision5
uVision4 is no longer maintained by the Keil team (support was stopped
long time ago).

This is why we need to make the uvision exporter able to generate uVision5
projects by default (which is based on software packs).

Also, adding note that the uvision4 exporter is now deprecated and will be
removed in the future.
2016-09-12 19:46:33 +01:00
Conor Keegan ac51eb6638 Add unit tests for app_config 2016-09-10 15:29:19 +01:00
Sam Grove b71bfd6250 Merge pull request #2576 from theotherjimmy/example-regession
Add smoke test that builds example programs with mbed-cli
2016-09-09 17:59:55 -05:00
Jimmy Brisson 7e2ca0115b Update copyright 2016-09-06 14:24:04 -05:00
Sarah Marsh f6a15fd3c8 Refactor export subsystem
Makes several broad changes:
 - removes dead code that dealt with the online build system
 - replaces export function with a much simpler one that:
   - does not copy any sources
   - the zip file hits the disk
   - the mbed_config.h hits the disk
   - the project files hit the disk
   - nothing else hits the disk
 - exporters use Resource object scanned with a toolchain
 - progen exporters don't optionally build a project instead they have a
   build function that may be called afterwards
 - much of the code passes pylint (have a score of 9 or above):
   - project.py
   - project_api.py
   - export/__init__.py
   - export/exporters.py
   - test/export/build_test.py
2016-09-06 14:24:00 -05:00
Jimmy Brisson 3437829af1 return the number of failures from the script 2016-09-01 16:01:12 -05:00
Jimmy Brisson f983292a6b Separate the import and compile steps for better integration with Jenkins 2016-08-31 15:17:29 -05:00
Jimmy Brisson ac5c685389 Use mbed-os 5 example instead of the mbed 2 one 2016-08-31 14:25:59 -05:00
Jimmy Brisson 41ec0af7aa Update Docstring 2016-08-31 13:54:41 -05:00
Jimmy Brisson 64e71e2f3a Use IPV6 feature for filtering mesh, client, and sockets 2016-08-31 13:40:34 -05:00
Jimmy Brisson 4b1dcd398c Allow filtering by target as well as by features 2016-08-31 13:40:03 -05:00
Jimmy Brisson 1f0afebbbc Allow command-line filtering of toolchains 2016-08-31 13:24:59 -05:00
Jimmy Brisson f7a1d1f749 Move to feature filter for target and toolchain detection; print passed tests 2016-08-29 14:38:16 -05:00
Jimmy Brisson 78028a9ceb Move example tests to their own folder 2016-08-29 14:01:57 -05:00
Jimmy Brisson 95ee4f6370 Use json for the example to target mapping and print failures 2016-08-29 13:46:39 -05:00
Jimmy Brisson eb11561c1f Add smoke test that builds example programs with mbed-cli 2016-08-29 11:26:37 -05:00
Vincent Coubard fe322adc9c Make selection of c library used consistent.
* rename "default_build" property into "default_lib"
* rename "standard" value for "default_build" into "std".
2016-08-23 16:04:56 +01:00
Jimmy Brisson dabd7b8d53 Made linting a recommendation and raised the bar for printing 2016-08-16 13:29:43 -05:00
Jimmy Brisson 3f9bedbdd9 Add pylint testing to Travis 2016-08-16 13:29:43 -05:00
Christopher Haster b45ec0ed76 [tools] Added specific config test for uvisor
Unlike other libraries, uvisor is currently integrated into the build
system, with special cases based on its addition as a feature. This
suggests we should also have tests for these special cases.
2016-07-29 12:31:54 -05:00
Christopher Haster 63f9b03e35 [tools] Added test for removing features 2016-07-27 18:01:33 -05:00
Sam Grove 1880daef0d Merge pull request #2215 from geky/tools-cumulative-overrides
[tools] Modified config to aggregate cumulative overrides against targets
2016-07-22 16:16:41 -05:00
Christopher Haster a5ea143c77 Updated config tests to match change in error message 2016-07-22 00:35:13 -05:00
Sam Grove b10276cbef Merge pull request #2173 from theotherjimmy/abstract-base-class
[toolchains]Abstractify the mbedToolchain base class.
2016-07-21 22:10:49 -05:00
Sarah Marsh b969fa5bb1 IDE build tests with progen 2016-07-15 13:25:35 -05:00
Jimmy Brisson f6b8cf05b0 Add a test that exercises the abstract base class checking
The test simply tries to instantiate each class exposed as part of the
TOOLCHAIN_CLASSES map. This is a test that each toolchain class
implements the required API, as the mbedToolchain will not allow the
instantiation of a subclass without a part of that API.
2016-07-15 10:10:40 -05:00
Bogdan Marinescu 9704edfca7 Fix add_py_targets and tests
Previously, add_py_targets assumed that it is not an error to add an
existing target if that target was previously added using
add_py_targets. This was done to aid testing, but it was weird, error
prone and broke with the latest changes to the caching mechanism. With
this commit:

- it is always an error to add a target that was previously added, which
  is much more consistent.
- tests for the configuration mechanism use the newly added
  'set_targets_json_location' function to clear the internal caches in
  targets.py (and thus all previously added custom targets). As a side
  effect, this commit also tests the 'set_targets_json_location'
  function itself.
2016-07-12 14:42:21 +03:00
Bogdan Marinescu 20583ba172 Fix K64F-based config tests
PR #1974 added a new configuration parameter to K64F, which in turn made
some tests break, because they found an unexpected configuration
parameter. Fixed by defining a special target for the tests
(test_target) that can be used independently of the actual mbed targets.
2016-06-21 19:58:03 +03:00
Bogdan Marinescu ab0a5a53c2 Configuration in header files - step 1
The current implementation of the configuration system "compiles" the
configuration parameters to macros defined on the command line. This
works, but has a few limitations:

- it can bring back the maximum command line length issues in Windows.
- depending on the type of the configuration parameter, it might require
  special quoting of its value in the command line.
- various 3rd party IDE/tools seem to have some limitations regarding
  the total length of the macros that can be defined.

This commit is the first step in replacing the current mechanism with
one that generates configuration in header files that will be
automatically included, instead of command line macro definitions. The
commit only adds the method for generating the header file, it doesn't
actually change the way config is used yet (that will happen in step 2),
thus it is backwards compatible. The logic of the configuration system
itself is unchanged (in fact, the whole change (not only this commit) is
supposed to be completely transparent for the users of the configuration
system).

The commit also fixes an issue in tools/get_config.py that appeared as a
result of a recent PR: the signature of "get_config" in
tools/build_api.py changed, but tools/get_config.py was not updated.
2016-06-16 00:23:04 +03:00
Christopher Haster 0d9d4639cd [build tools] Added proper namespace for features
per @bogdanm
2016-06-15 10:34:32 -05:00
Christopher Haster f45dc15aa8 [build tools] Added test for configurations set from same level as feature 2016-06-15 08:38:20 -05:00
Christopher Haster 6da324fa3f [build tools] Added test coverage for config features feature 2016-06-15 08:38:20 -05:00
Mihail Stoyanov 0034ffb716 Add tests to the config system. Add GCC flags to support uVisor 2016-06-12 19:04:41 +01:00