Skip to content

Commit 00d2f36

Browse files
author
Amanda Butler
authored
Merge pull request #881 from donatieng/patch-1
Update built_in_tests.md
2 parents 636a4e1 + d4c2151 commit 00d2f36

File tree

1 file changed

+14
-19
lines changed

1 file changed

+14
-19
lines changed

docs/porting/porting_full_process/built_in_tests.md

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
## Testing your port
22

3-
It's important to test your port at the end of each module porting, rather than only once when you've imported all modules. There are three testing methods:
3+
It's important to test your port at the end of each module porting, rather than only once when you've imported all modules. There are two testing methods:
44

5-
1. Using the Mbed OS built-in tests with [*Greentea*](../tools/greentea-testing-applications.html).
6-
1. Using the Mbed OS built-in tests with *manual testing*.
5+
1. Running the Mbed OS built-in tests with [*Greentea*](../tools/greentea-testing-applications.html).
6+
1. Manually running the Mbed OS built-in tests.
77

88
## Testing with the Greentea framework
99

@@ -15,18 +15,19 @@ Read the following page to understand how tests are structured:
1515

1616
To run the Mbed OS built-in tests, you need to have ported and verified at least these HAL modules:
1717

18-
- DAPLink or compatible interface firmware.
19-
20-
<span class="notes">If DAPLink is still under development, please [use manual tests](../porting/manual-testing.html).</span>
2118
- Low power ticker.
2219
- Serial port (synchronous transfer). To verify that it works, load a test binary with `printf()`. Verify debug messages can be seen on your serial terminal program.
2320
- Microsecond ticker.
2421

22+
23+
You'll also need to have ported DAPLink or compatible interface firmware to your interface chip.
24+
<span class="notes">If DAPLink is still under development, you can still [run tests manually](../porting/manual-testing.html).</span>
25+
2526
#### mbedls
2627

27-
The board under test needs to be supported in mbedls for automated tests to work.
28+
The platform under test needs to be supported in mbedls for automated tests to work.
2829

29-
If an updated mbedls pip package hasn't been released yet, you need to direct pip to use your local directory (which includes the code changes to support the new board):
30+
If an updated mbedls pip package including support for your platform hasn't been released yet, you need to direct pip to use your local directory (which includes the code changes to support the new platform):
3031

3132
1. Clone [https://github.com/ARMmbed/mbed-ls](https://github.com/ARMmbed/mbed-ls).
3233
1. [Add your target to the platform database](https://github.com/ARMmbed/mbed-ls#adding-platform-support)
@@ -58,6 +59,7 @@ Here is an example of a successful run:
5859
5960
<!-- Needs to be updated with output from mbed-cli (mbed test) -->
6061
```
62+
mbed test --run -n tests-concurrent-gpio
6163
mbedgt: greentea test automation tool ver. 1.4.0
6264
mbedgt: using multiple test specifications from current directory!
6365
using 'BUILD/tests/CC3220SF/GCC_ARM/test_spec.json'
@@ -114,7 +116,7 @@ mbedgt: completed in 20.24 sec
114116
115117
## Manual testing
116118
117-
You may want to run manual tests, for example if DAPLink is still under development. You will need to export your tests from Greentea and import them to your IDE. For example:
119+
You may want to run tests manually, for example if DAPLink is still under development. You will need to export your tests from Greentea and import them to your IDE. For example:
118120
119121
1. Find the test directory:
120122
@@ -143,7 +145,7 @@ You may want to run manual tests, for example if DAPLink is still under developm
143145
mbed export -i <exporter> -m <new_target>
144146
```
145147
146-
1. Open the project with pyOCD (using the same configuration you used [when you initially set up pyOCD](#creating-GDB-pyOCD-debug-configuration).
148+
1. Flash the program with pyOCD (using the same configuration you used [when you initially set up pyOCD](#creating-GDB-pyOCD-debug-configuration).
147149
148150
1. Run the program:
149151
@@ -160,17 +162,10 @@ Whether you're using Greentea or performing manual tests, the procedure for usin
160162
161163
To build and run the Mbed OS tests:
162164
163-
1. In your `mbed-os-example-blinky` clone, rename `main.cpp` to `main.txt`:
164-
165-
```
166-
mv main.cpp main.txt
167-
```
168-
169165
1. Build the tests:
170166
171-
<!-- any reason why we're doing a clean build here everytime? I'd really recommend dropping this one, build times will be very high -->
172167
```
173-
mbed test -m <new_target> -t gcc_arm --compile -c
168+
mbed test -m <new_target> -t gcc_arm --compile
174169
```
175170
176171
If you see some build errors, it means that some HAL modules required to run the tests are missing and need porting.
@@ -205,7 +200,7 @@ To build and run the Mbed OS tests:
205200
- The `common_tickers` test image is at `mbed-os-example-blinky/BUILD/tests/<new_target>/gcc_arm/mbed-os/TESTS/mbed_hal/common_tickers`.
206201
- The `common_tickers_freq` test image is at `mbed-os-example-blinky/BUILD/tests/<new_target>/gcc_arm/mbed-os/TESTS/mbed_hal/common_tickers_freq.`
207202
208-
1. You need to flash the test image to the board. You can use either pyOCD or the Eclipe IDE. You may also be able to use IAR and Keil (if they already support the new target).
203+
1. You need to flash the test image to the board. You can use pyOCD (from the command line or IDE), or you could use IAR and Keil (if they already support the new target).
209204
210205
The easiest method is using the pyOCD flash tool:
211206

0 commit comments

Comments
 (0)