Color Oled(SSD1331) connect to STMicroelectronics Nucleo-F466

Dependencies:   ssd1331

Committer:
kadonotakashi
Date:
Thu Oct 11 02:27:46 2018 +0000
Revision:
3:f3764f852aa8
Parent:
0:8fdf9a60065b
Nucreo 446 + SSD1331 test version;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
kadonotakashi 0:8fdf9a60065b 1 ## Running Icetea tests located under mbed-os
kadonotakashi 0:8fdf9a60065b 2
kadonotakashi 0:8fdf9a60065b 3 ### Structure
kadonotakashi 0:8fdf9a60065b 4
kadonotakashi 0:8fdf9a60065b 5 Mbed OS has a folder called `TEST_APPS` that contains everything related to Icetea testing.
kadonotakashi 0:8fdf9a60065b 6
kadonotakashi 0:8fdf9a60065b 7 There are currently three folders:
kadonotakashi 0:8fdf9a60065b 8
kadonotakashi 0:8fdf9a60065b 9 - `device` - contains all the different test applications you can flash to your board.
kadonotakashi 0:8fdf9a60065b 10 - `icetea_plugins` - contains plugins that are being used by some of the testcases, needed for the test execution.
kadonotakashi 0:8fdf9a60065b 11 - `testcases` - contains Icetea testcases written in Python.
kadonotakashi 0:8fdf9a60065b 12
kadonotakashi 0:8fdf9a60065b 13 The testcases depend on test applications.
kadonotakashi 0:8fdf9a60065b 14
kadonotakashi 0:8fdf9a60065b 15 ### Preparing your work environment
kadonotakashi 0:8fdf9a60065b 16
kadonotakashi 0:8fdf9a60065b 17 #### Prerequisites
kadonotakashi 0:8fdf9a60065b 18
kadonotakashi 0:8fdf9a60065b 19 You need Icetea and version 1.8.0 or higher of Mbed CLI installed.
kadonotakashi 0:8fdf9a60065b 20
kadonotakashi 0:8fdf9a60065b 21 #### Selecting the network interface to use
kadonotakashi 0:8fdf9a60065b 22
kadonotakashi 0:8fdf9a60065b 23 Depending on the device, there might be a default network interface type defined in `mbed-os/targets/targets.json`, which you can use to locate a default test-config file.
kadonotakashi 0:8fdf9a60065b 24
kadonotakashi 0:8fdf9a60065b 25 If the default network interface type is not defined or you want to use a different interface than the default, you need to provide a test-config file to the mbed test with `--test-config` option.
kadonotakashi 0:8fdf9a60065b 26
kadonotakashi 0:8fdf9a60065b 27 The test-config file contains the necessary information for the test application. There are some test-config files located under `mbed-os/tools/test_configs`.
kadonotakashi 0:8fdf9a60065b 28
kadonotakashi 0:8fdf9a60065b 29 Devices that have their network drivers residing inside `mbed-os` can use generic `test_configs`, such as `HeapBlockDeviceAndEthernetInterface.json` and `HeapBlockDeviceAndWifiInterface.json`. Otherwise, you need to use a device-specific test-config.
kadonotakashi 0:8fdf9a60065b 30
kadonotakashi 0:8fdf9a60065b 31 ### Running the tests
kadonotakashi 0:8fdf9a60065b 32
kadonotakashi 0:8fdf9a60065b 33 Now that you have selected the interface, you can run the Icetea tests from the `mbed-os` root on your command-line by running the following command:
kadonotakashi 0:8fdf9a60065b 34
kadonotakashi 0:8fdf9a60065b 35 `mbed test -m <target> -t <toolchain> --icetea`
kadonotakashi 0:8fdf9a60065b 36
kadonotakashi 0:8fdf9a60065b 37 This command compiles the OS, compiles the test applications, creates a test suite and then starts running the tests.
kadonotakashi 0:8fdf9a60065b 38
kadonotakashi 0:8fdf9a60065b 39 If you only want to run some specific tests, you can use the `-n` option. You can choose multiple tests by separating them with a comma (`,`):
kadonotakashi 0:8fdf9a60065b 40
kadonotakashi 0:8fdf9a60065b 41 `mbed test -m <target> -t <toolchain> --icetea -n test1,test2`
kadonotakashi 0:8fdf9a60065b 42
kadonotakashi 0:8fdf9a60065b 43 #### Running the tests with a specific test-config
kadonotakashi 0:8fdf9a60065b 44
kadonotakashi 0:8fdf9a60065b 45 Some devices may offer multiple network interfaces to operate with. For example, `UBLOX_EVK_ODIN_W2` offers ethernet and Wi-Fi capabilities.
kadonotakashi 0:8fdf9a60065b 46
kadonotakashi 0:8fdf9a60065b 47 The tests can be run for either one of those using already existing test-config -files.
kadonotakashi 0:8fdf9a60065b 48
kadonotakashi 0:8fdf9a60065b 49 To run the tests with the Wi-Fi interface:
kadonotakashi 0:8fdf9a60065b 50
kadonotakashi 0:8fdf9a60065b 51 `mbed test -m UBLOX_EVK_ODIN_W2 -t <toolchain> --icetea --test-config tools/test_configs/HeapBlockDeviceAndWifiInterface.json`
kadonotakashi 0:8fdf9a60065b 52
kadonotakashi 0:8fdf9a60065b 53 To run the tests with the ethernet interface:
kadonotakashi 0:8fdf9a60065b 54
kadonotakashi 0:8fdf9a60065b 55 `mbed test -m UBLOX_EVK_ODIN_W2 -t <toolchain> --icetea --test-config tools/test_configs/HeapBlockDeviceAndEthernetInterface.json`
kadonotakashi 0:8fdf9a60065b 56
kadonotakashi 0:8fdf9a60065b 57 #### Providing Wi-Fi access point information
kadonotakashi 0:8fdf9a60065b 58
kadonotakashi 0:8fdf9a60065b 59 If you are using the Wi-Fi interface for running the tests, you need to also provide information about the used access point.
kadonotakashi 0:8fdf9a60065b 60
kadonotakashi 0:8fdf9a60065b 61 The information can be provided in the used test-config file.
kadonotakashi 0:8fdf9a60065b 62
kadonotakashi 0:8fdf9a60065b 63 Example of access point information:
kadonotakashi 0:8fdf9a60065b 64
kadonotakashi 0:8fdf9a60065b 65 ```
kadonotakashi 0:8fdf9a60065b 66 "target_overrides": {
kadonotakashi 0:8fdf9a60065b 67 "*": {
kadonotakashi 0:8fdf9a60065b 68 "target.network-default-interface-type": "WIFI",
kadonotakashi 0:8fdf9a60065b 69 "nsapi.default-wifi-ssid": "\"ssid\"",
kadonotakashi 0:8fdf9a60065b 70 "nsapi.default-wifi-password": "\"password\"",
kadonotakashi 0:8fdf9a60065b 71 "nsapi.default-wifi-security": "WPA_WPA2"
kadonotakashi 0:8fdf9a60065b 72 }
kadonotakashi 0:8fdf9a60065b 73 }
kadonotakashi 0:8fdf9a60065b 74 ```
kadonotakashi 0:8fdf9a60065b 75
kadonotakashi 0:8fdf9a60065b 76 ### Test results
kadonotakashi 0:8fdf9a60065b 77
kadonotakashi 0:8fdf9a60065b 78 Icetea prints the results from the test run to the command-line, and the final result looks similar to this:
kadonotakashi 0:8fdf9a60065b 79
kadonotakashi 0:8fdf9a60065b 80 ```
kadonotakashi 0:8fdf9a60065b 81 +--------------------------------+---------+-------------+-------------+-----------+----------+
kadonotakashi 0:8fdf9a60065b 82 | Testcase | Verdict | Fail Reason | Skip Reason | platforms | duration |
kadonotakashi 0:8fdf9a60065b 83 +--------------------------------+---------+-------------+-------------+-----------+----------+
kadonotakashi 0:8fdf9a60065b 84 | test_cmdline | pass | | | K64F | 8.555 |
kadonotakashi 0:8fdf9a60065b 85 | UDPSOCKET_BIND_PORT | pass | | | K64F | 19.614 |
kadonotakashi 0:8fdf9a60065b 86 | TCPSOCKET_BIND_PORT | pass | | | K64F | 15.852 |
kadonotakashi 0:8fdf9a60065b 87 | TCPSERVER_ACCEPT | pass | | | K64F | 41.629 |
kadonotakashi 0:8fdf9a60065b 88 | TCPSOCKET_ECHOTEST_BURST_SHORT | pass | | | K64F | 19.926 |
kadonotakashi 0:8fdf9a60065b 89 +--------------------------------+---------+-------------+-------------+-----------+----------+
kadonotakashi 0:8fdf9a60065b 90 +---------------+----------------+
kadonotakashi 0:8fdf9a60065b 91 | Summary | |
kadonotakashi 0:8fdf9a60065b 92 +---------------+----------------+
kadonotakashi 0:8fdf9a60065b 93 | Final Verdict | PASS |
kadonotakashi 0:8fdf9a60065b 94 | count | 5 |
kadonotakashi 0:8fdf9a60065b 95 | passrate | 100.00 % |
kadonotakashi 0:8fdf9a60065b 96 | pass | 5 |
kadonotakashi 0:8fdf9a60065b 97 | Duration | 0:01:45.576000 |
kadonotakashi 0:8fdf9a60065b 98 +---------------+----------------+
kadonotakashi 0:8fdf9a60065b 99 ```
kadonotakashi 0:8fdf9a60065b 100
kadonotakashi 0:8fdf9a60065b 101 You can also find the results from the tests in the `mbed-os/log` folder.
kadonotakashi 0:8fdf9a60065b 102
kadonotakashi 0:8fdf9a60065b 103 You probably want to add the log folder to your `.mbedignore` file to prevent issues with build commands becoming too long over the time.