Commit Graph

131 Commits (165d2536fe0b24e6c3370866e91b34a497efed10)

Author SHA1 Message Date
sg- 018cdb928a Remove all references and use of code sourcery GCC in docs, build and export scripts 2016-02-10 23:27:33 -06:00
Mihail Stoyanov cc65d391ef Fixed python error when auto-detect option is not present 2015-09-28 15:09:54 +03:00
Brian Daniels 1d946c2160 Adding checks with mbedls throughout testing process 2015-09-23 11:21:11 -05:00
Brian Daniels b5191580fd Removed mbed-ls dependency from test framework 2015-07-22 16:40:42 -05:00
Przemek Wirkus af7630d525 Merge pull request #1139 from PrzemekWirkus/devel_interoperability
Tools: Interoperability test suite: Added simple interface chip tests / checks

I'm merging this pull request, we can add more interoperability tests in the future. For now we can use this is CI.
I'm expecting some issues with this but this is not essential functionality and we can always improve it in the future.
2015-07-06 10:29:25 +01:00
Brian Daniels abd4cbcf00 Changing return status of singletest.py if a build failure occurs 2015-06-19 11:53:38 -05:00
Brian Daniels 0d2effd024 Add option to consolidate waterfall loops into one test case in test report. Useful for CI. 2015-06-08 14:51:13 -05:00
Przemek Wirkus 7b0b9e8f32 Added JUNIT exporters to compliance testing functionality 2015-05-27 15:41:58 +01:00
Przemek Wirkus 70a21e9656 Refactored interoperability tests, added separate classes of tests and CLI 2015-05-27 15:40:22 +01:00
Przemek Wirkus f410b86b05 Updated app version to 1.5 - Biggest change: added support for multiple devices
of the same type.
2015-05-03 02:34:39 +01:00
Przemek Wirkus cc6be1a16e Added support for multiple targets of the same type (hardware platfrom) 2015-05-03 02:32:04 +01:00
rnestler ddd3e8859f workspace_tools: Use python2 in shebang
The scripts are not python3 compatible so we should explicitly call
python2.
2015-04-23 00:23:19 +02:00
Brian Daniels 2f4d668382 Renamed Jenkins specific options to general "Build" options 2015-04-17 09:39:26 -05:00
Brian Daniels cb4e13c1e3 Reorganized test_api.py to build all required libraries (RTOS, Ethernet, etc) for tests up front, before any tests are built 2015-04-13 17:07:21 -05:00
Przemek Wirkus 35bb258f0a singletest.py version updated to 1.4 2015-03-16 12:56:19 +00:00
Przemek Wirkus cf7f03254a Added to option --auto handler for -f <mcu> filter switch. Now using -f switch
will filter target platforms to test. Use comma to pass more MCU names to
filter.

```
$ singletest.py --auto -j 8 -O --config
MBEDLS: Detecting connected mbed-enabled devices...
MBEDLS: Detected NUCLEO_L053R8, port: COM35, mounted: E:
MBEDLS: Detected KL25Z, port: COM89, mounted: F:
MUTs configuration in auto-detected:
+-------+-------------+---------------+------+-------+
| index | peripherals | mcu           | disk | port  |
+-------+-------------+---------------+------+-------+
| 1     |             | NUCLEO_L053R8 | E:   | COM35 |
| 2     |             | KL25Z         | F:   | COM89 |
+-------+-------------+---------------+------+-------+

Test specification in auto-detected:
+---------------+-----+------+
| mcu           | ARM | uARM |
+---------------+-----+------+
| KL25Z         | Yes | -    |
| NUCLEO_L053R8 | -   | Yes  |
+---------------+-----+------+
```

Building original configuration (no filter):
```
$ singletest.py --auto -j 8 -O
MBEDLS: Detecting connected mbed-enabled devices...
MBEDLS: Detected NUCLEO_L053R8, port: COM35, mounted: E:
MBEDLS: Detected KL25Z, port: COM89, mounted: F:
Building library CMSIS (KL25Z, ARM)
Building library MBED (KL25Z, ARM)
Building project DETECT (KL25Z, ARM)
.
.
.
Building library CMSIS (NUCLEO_L053R8, uARM)
Building library MBED (NUCLEO_L053R8, uARM)
Building project DETECT (NUCLEO_L053R8, uARM)
.
.
.
Completed in 3.68 sec
```

```
$ singletest.py --auto -j 8 -O -f KL25Z --config
MBEDLS: Detecting connected mbed-enabled devices...
MBEDLS: Detected NUCLEO_L053R8, port: COM35, mounted: E:
MBEDLS: Detected KL25Z, port: COM89, mounted: F:
MUTs configuration in auto-detected:
+-------+-------------+-------+------+-------+
| index | peripherals | mcu   | disk | port  |
+-------+-------------+-------+------+-------+
| 2     |             | KL25Z | F:   | COM89 |
+-------+-------------+-------+------+-------+

Test specification in auto-detected:
+-------+-----+
| mcu   | ARM |
+-------+-----+
| KL25Z | Yes |
+-------+-----+
```

Building original configuration (with applied filter):
```
$ singletest.py --auto -j 8 -O -f KL25Z
MBEDLS: Detecting connected mbed-enabled devices...
MBEDLS: Detected NUCLEO_L053R8, port: COM35, mounted: E:
MBEDLS: Detected KL25Z, port: COM89, mounted: F:
Building library CMSIS (KL25Z, ARM)
Building library MBED (KL25Z, ARM)
Building project DETECT (KL25Z, ARM)
.
.
.
Completed in 1.33 sec
```
2015-03-13 15:30:44 +00:00
Przemek Wirkus 4c45ed1cb1 Parallel functionality, marge conflicts resolved (v2)
Description
===========

Added thread model for function SingleTest::execute where for each target we
have separate thread.

Added new experimental feature. Currently we are only building in parallel
mbed SDK and libraries with dependencies.
Each MUT is flashed separately, but with this new feature we are able to
flash multiple boards at the same time and get results in parallel.

Test execution time is reduced by n where n is number of MUTs (MUT: mbed under
test).

using --parallel means that:
* separate thread will be spawned to build mbed SDK and dependencies (libraries)
    for each unique target with all declared toolchains.
    E.g:
            Thread(n==1):   LPC1768:        ARM, uARM, GCC_ARM
            Thread(n==2):   K64F:           ARM, GCC_ARM
            Thread(n==3):   NUCLEO_X:       uARM
    .
    .
    .
    Thread(4): for toolchain in NUCLEO_Z[toolchains]
               -> build mbed SDK
                            -> build libs
                             -> build project
                              -> run MUT testrunner
                                    return test results for NUCLEO_Z[toolchain]

Done:
1. Added option --parallel.
2. Decoupled execute function so it can be run in parallel with other execute
    functions.
3. Thread join via Queue, not Thread::Join() to avoid deadlocks or waits for
    particular thread to finish.
4. All builds are in parallel, but because each target and library for each
    toolchain have different directory we do not worry about building in
    parallel and compiler collisions.

Missing:
1. No sync for 'print' (TODO).
2. No sync on test result structures - not needed because we only append to
    them (?).

Experimental --parallel bugfix: self.test_suite_properties_ext dict was not
populated with target name.
2015-03-12 09:55:11 +00:00
Przemek Wirkus 50ef6207f0 Added new switch -p to force peripheral in autodetection mode (--auto) 2015-03-04 09:48:39 +00:00
Przemek Wirkus 4d5b8776d4 Bugfix for IOTSFW-345:
Adde missing check for optional auto_detect parameter in CLI options.

Test procedure:

* Check with mbed-ls installed:

$ singletest.py --auto -j 8
MBEDLS: Detecting connected mbed-enabled devices...
MBEDLS: Detected K64F, port: COM61, mounted: E:
Building library CMSIS (K64F, ARM)
Copy: startup_MK64F12.o
Copy: sys.o
Copy: cmsis_nvic.o
Copy: system_MK64F12.o

* Uninstall mbed-ls iools:

$ pip uninstall mbed-ls
Uninstalling mbed-ls:
  c:\python27\lib\site-packages\mbed_ls-0.1.4-py2.7.egg
  c:\python27\scripts\mbedls-script.py
  c:\python27\scripts\mbedls.exe
  c:\python27\scripts\mbedls.exe.manifest
Proceed (y/n)? y
  Successfully uninstalled mbed-ls

$ mbedls
'mbedls' is not recognized as an internal or external command,
operable program or batch file.

$ python
Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)] win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import mbed_lstools
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named mbed_lstools

* Check singletest.py work flow without mbed-ls:

$ singletest.py -i test_spec.json -M muts_all.json
Building library CMSIS (K64F, ARM)
Building library MBED (K64F, ARM)
Building project DETECT (K64F, ARM)
TargetTest::K64F::ARM::DTCT_1::Simple detect test [OK] in 0.50 of 10 sec
Building project DEV_NULL (K64F, ARM)
TargetTest::K64F::ARM::EXAMPLE_1::/dev/null [OK] in 3.49 of 20 sec
Building project HELLO (K64F, ARM)
TargetTest::K64F::ARM::MBED_10::Hello World [OK] in 0.38 of 5 sec
Building project TICKER (K64F, ARM)
TargetTest::K64F::ARM::MBED_11::Ticker Int [OK] in 11.35 of 15 sec
2015-02-19 11:16:45 +00:00
Przemek Wirkus 2882c4e961 Fixed bug in --config and --auto switches 2015-02-10 21:50:56 +00:00
Przemek Wirkus f38a53ba21 Added new switch --auto to force autodetection with mbed_lstools
Added switch --tc to force certain toolchains.

Switch --auto and -tc works well with switch --config so do not hesitate to
check your configuration before running your test suite.
2015-02-10 21:19:01 +00:00
Przemek Wirkus bcfbc3575d Added -f (filter) to configuration switch --config
We can now use --config -f <mcu> to filter only targets we are interested in
2015-01-30 08:38:15 +00:00
Przemek Wirkus 197a1afe5e Unlocked --db switch. Added Wiki page entry to explain how to use MySQL DB with test suite 2014-11-21 13:57:19 +00:00
Przemek Wirkus 858196ffff When users are using 'build only flag' (switch -O) and test do not have specified peripherals (muts.json file is just empty dictionary) we can allow test building by default. This supposed to be Yotta related improvement. 2014-11-12 18:02:07 +00:00
Przemek Wirkus ad70273249 Removed opts.db_url from optional params list in singletest constructor 2014-10-20 11:38:51 +01:00
Przemek Wirkus b3c342bf7c Unlocked option -f (--filter) to filter result by first column 2014-10-20 10:51:02 +01:00
Przemek Wirkus 7935e0f5ea Removed exit(-1) when checking for missing modules. Instead now it will be prompted to used when singletest starts 2014-10-16 14:34:37 +01:00
Przemek Wirkus 12a9051aba Removed few minor pyFlakes warnings 2014-10-15 16:33:30 +01:00
Przemek Wirkus 51223ef6d1 Refactoring of report exporter to support HTML and JUNIT. TODO: add support for TEXT output.
Added JUtnit exporter
2014-10-15 11:33:30 +01:00
Przemek Wirkus 0100aa5732 Removed usused imports 2014-10-15 11:33:26 +01:00
Przemek Wirkus ccac8f8339 Midified way singletest script is checking for installed modules required by test suite 2014-10-15 11:33:22 +01:00
Przemek Wirkus 9fe239dcad Added HTML reporting feature, switch --report-html FILENAME to singletest.py so now users can export test results to external HTML file. This feature can be used to display HTML reports on CI dashboards 2014-09-25 17:42:08 +01:00
Przemek Wirkus b031920624 Added clean build switch --clean to singletest script 2014-09-18 11:17:57 +01:00
Przemek Wirkus 63ee01bdd9 Modified host tests to use serial.realine() function to avoid extra timeouts during tests (test will work faster and will be more reliable) 2014-09-15 17:44:30 +01:00
Przemek Wirkus 39e75c042f Changed test suite version to 1.2
Added simple test to check C strings conversions
2014-09-02 17:34:08 +01:00
Przemek Wirkus 52f929f4e0 Feature: Added waterfall test option: if used defines --loops or --global-loops and -W (--waterfall) option; testing of particular test will be tested until test pass (OK result) 2014-09-02 11:43:08 +01:00
Przemek Wirkus 01b0ed20f7 Added test output to test_entry in database so users can browse between results and see console output 2014-09-01 08:43:45 +01:00
Przemek Wirkus 35fd4ad7d9 Database: added new factory and verbose database detection functions
Added separate file to store test suite DB access interface

Added new functionality to database interface: database name, connection status, hostname + uname functionality

Added option --db to singletest.py so users can define database connection url for database access

Added database configuration check with switch --config. Now users can combine switch --db and --config to check database conenctivity
2014-09-01 08:43:25 +01:00
Przemek Wirkus 61f028f050 Fixed commit issues regarding logging mechanism - missed during previous commits 2014-08-13 10:27:10 +01:00
Przemek Wirkus 698fe930e6 Changed functions' docstring format a little to mach singletest, test api and test webapi files 2014-08-13 10:26:58 +01:00
Przemek Wirkus 17c0132d56 Added parts of functionality related to extra reset types, global timeout increments and image configuration file modifications 2014-08-13 10:26:50 +01:00
Przemek Wirkus c1ebcb498b Simple indent for function call parameters 2014-08-13 10:26:46 +01:00
Przemek Wirkus 5947838b2b BUgfix: jobs (-j) value was not properly set in SingletestRunner class parameters 2014-08-13 10:26:41 +01:00
Przemek Wirkus c3c0be5443 Added extra reset option - not yet implemented. Only switches added to test suite CLI and host_test.py optparse 2014-08-07 11:48:47 +01:00
Przemek Wirkus 7bc89f6323 Refactoring: Continue refactoring for separate CLI and webservice API / functionalities in test suite. Separated by subclassing: 'one responsibility per class' 2014-08-05 09:32:44 +01:00
Przemek Wirkus 72fafcf269 Few pyLint and pyFlakes defects fixed 2014-08-04 16:16:47 +01:00
Przemek Wirkus eed8d68789 Refactoring: moved optParse options frm singletest.py CLI script to test_api to group common options in one place. Added new file test_webapi.py to store there web services API and related functions 2014-08-04 15:57:59 +01:00
Przemek Wirkus 13c6c4f13e Refactoring: created test_api.py and moved test code and classes to separate test api file. Prepareing to add MPS2 reset functionality 2014-08-04 14:29:46 +01:00
Przemek Wirkus dcf1ef2130 Added 'firefox' as one of the ways to copy binary to target device (other options are cp, copy, xcopy, shutil.copy() 2014-08-04 14:29:44 +01:00
Przemek Wirkus 5b07b38554 Added script major / minor version 2014-08-04 14:29:39 +01:00