- Timestamp:
-
09/10/18 06:21:55 (6 years ago)
- Author:
-
Maxul
- Comment:
-
Beautify command lines instructions.
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v2
|
v3
|
|
9 | 9 | This task consists of adding a benchmark test to the RTEMS POSIX Timing Test Suite. There are templates for each benchmark pattern we have identified. The task consists of identifying the correct pattern, instantiating it using the "mktest" script, and then filling that in with the appropriate calls. |
10 | 10 | For example: |
| 11 | {{{ |
11 | 12 | ~/rtems/testsuites/psxtmtests> |
12 | | |
| 13 | }}} |
13 | 14 | You'll need to specify the source (-s), the destination (-d), and the test number (-n). Change the location to match where you put rtems-testing. For example: |
14 | | |
| 15 | {{{ |
15 | 16 | ~/rtems/testsuites/psxtmtests> ~/rtems-testing/rtems-test-template/mktest \ |
16 | 17 | -s ~/rtems-testing/rtems-test-template/psxtmtest_unblocking_preempt \ |
17 | 18 | -d psxtmcond04 \ |
18 | 19 | -n 4 |
| 20 | }}} |
19 | 21 | === Adding the Test to the Build System === |
20 | 22 | |
… |
… |
|
23 | 25 | Changes to Makefile.am |
24 | 26 | rtems/testsuites/psxtmtests/Makefile.am |
| 27 | {{{ |
25 | 28 | SUBDIRS += psxtmthread01 |
26 | 29 | SUBDIRS += psxtmthread03 |
27 | 30 | SUBDIRS += psxtmcond04 # Add a SUBDIRS entry to the bottom |
28 | 31 | endif |
29 | | |
| 32 | }}} |
30 | 33 | Changes to configure.ac |
31 | 34 | rtems/testsuites/psxtmtests/configure.ac |
| 35 | {{{ |
32 | 36 | psxtmthread01/Makefile |
33 | 37 | psxtmthread03/Makefile |
… |
… |
|
35 | 39 | ]) |
36 | 40 | AC_OUTPUT |
37 | | |
| 41 | }}} |
38 | 42 | Now bootstrap it |
39 | | |
| 43 | {{{ |
40 | 44 | cd ~/rtems |
41 | 45 | ~/rtems> ./bootstrap |
42 | | |
| 46 | }}} |
43 | 47 | Now build... |
44 | | |
| 48 | {{{ |
45 | 49 | cd ../b-sis |
46 | 50 | ../rtems/configure --options --used --to --configure |
| 51 | }}} |
47 | 52 | === Finding an Example === |
48 | 53 | |
49 | 54 | Now that the test has been added to the build system, find working examples of the functions to call. One way to do that is to use grep -r. From the terminal, there may be characters that have to be "escaped" \. For example to create a test of pthread_cond_init() put the following in the command line: |
| 55 | {{{ |
50 | 56 | grep -r pthread\_cond\_init ~/rtems/testsuites/ |
| 57 | }}} |
51 | 58 | === !Simulator/Emulator === |
52 | 59 | |
… |
… |
|
58 | 65 | |
59 | 66 | After each change, clean the build directory, rebuild the source, and try again, depending on the simulator something like: |
60 | | |
| 67 | {{{ |
61 | 68 | ~/b-sis make clean |
62 | 69 | ~/b-sis ../rtems/configure --options --to --configure |
63 | 70 | ~/b-sis make |
64 | 71 | ~/b-sis sparc-rtems4.11-gdb `find . -name ticker.exe` |
65 | | |
| 72 | }}} |
66 | 73 | This is a particularly challenging task, so asking questions, and making suggestions for improving the directions on this task would be greatly appreciated. |
67 | 74 | === Posix Time Test Plan (for generating more GCI tasks) === |