35 Commits

Author SHA1 Message Date
Chris Johns
384acf1bcb tester/console: Fix restart regx check
The fix to the TFTP timeout has a simple bug.

Updates #4959
2023-12-14 17:07:04 +11:00
Chris Johns
a22b396a32 tester/tftp: Add a session timeout
- Fix listener done state

- Finish open with the state as finished

Closes #4959
2023-11-08 08:34:14 +11:00
Muhammad Sulthan Mazaya
bd2d3d5523 rtemstoolkit: Fix shlex.split to use posix mode and add unit test for pipe operation
Turns out subprocess.Popen operates on posix mode. Also, there is an
issue with previous implementation of pipe command that is fixed by
Chris. Now, it can also accepts command in form of a string. The unit
test for that is added via this patch.
2023-06-21 14:30:48 +10:00
Muhammad Sulthan Mazaya
60e793a17c tester/rt: use shlex.split to split command args
The regular split-by-space function used to split command arguments
creates compatibility issues with many shell command syntaxes. A
specific example is the handling of string arguments, as shown below:

%define renode_args -e start_opts -e "s %{bsp_resc_script}"

Thus, it is changed to use shlex.split instead. It splits
the command arguments using shell-like syntax. More about shlex
module here: https://docs.python.org/3/library/shlex.html
2023-06-21 09:09:06 +10:00
Karel Gardas
43843b85fe tester/gdb: allow kill on the test end
Sponsored-By:	Precidata
2022-05-29 19:47:05 +02:00
Chris Johns
59880c0933 tester/wait: Add a wait directive to the tester
- Lets you test with stand alone TFTP or other services
2021-09-21 17:41:15 +10:00
Chris Johns
dac7ef233a tester/tftp: Fix recovery of timed out TFTP sessions
- Add support to retry the tftp session if the target has not
  started

- Add target handlers for the test directives to allow recovery
  on error
2021-09-19 08:31:58 +10:00
Chris Johns
9d880d78b2 tester: Count tester header errors
- Remove the hard tester error and count the header errors.
2021-09-09 18:33:54 +10:00
Chris Johns
87262b429d Move all python commands to use env python
- If you host does not provide a python command consult the User
  manual for ways you can run the python commands.

- Full package paths are being used to avoid namespace pollution and
  crosstalk.
2020-09-26 10:49:27 +10:00
Chris Johns
cd8fa2fe74 tester: Add support for test-too-long
- A test that loops generating output did not timeout. Monitor the
  the session time and set a maximum test period.
2020-09-08 16:15:43 +10:00
Chris Johns
4f5485eb51 rtems-test: target_exe_filter fails when there is no filter
Closes #4006
2020-06-17 08:43:00 +10:00
Chris Johns
7f85a65b9d tester: Ignore the execute return code for some commands
Some simulators like psim-run return a non-zero error code. Allow
a BSP configuration to ignore the return code.
2019-02-08 05:41:03 +11:00
Chris Johns
e6bf128eea rtemstoolkit/config: Unlock when printing to avoid blocking. 2019-02-08 05:41:03 +11:00
Chris Johns
a4fbd167eb tester: Fix the handling of the version and tools recs when running parallel jobs 2018-11-27 11:23:36 +11:00
Chris Johns
e058db0281 python: Provide support to select a valid python version.
- Update imports after wrapping the code.
- Fix python3 issues.
- Fix config path issues for in repo and install runs.

Closes #3537
2018-11-08 18:13:45 +11:00
Chris Johns
30218f5ca5 tester: Add reporting the RTEMS version, build and tools.
Update #3217.
2017-11-11 16:21:52 +11:00
Chris Johns
42e39d2644 tester: Fix the output so the report end analysis works. 2017-11-03 18:20:31 +11:00
Chris Johns
c68beb8181 tester: Add the rtems-run command. 2017-11-03 17:59:53 +11:00
Chris Johns
bf58911519 tester: Refactor to use INI format files for BSP configurations.
- Add support for user condfigurations files with the --user-config.
- Add support for a $HOME/.rtemstesterrc for a user configuration.

Closes #3204.
2017-10-24 22:21:35 +11:00
Chris Johns
5251361066 tester: Add an executable file name filter.
The exe filter lets a BSP change the executable file to something
that can be downloaded to the target. For example U-Boot requires the image
format. The tester can now be configured to on-demand generate a specific
image for the target as the tester runs.
2017-10-23 15:22:34 +11:00
Chris Johns
f1e8fd49dd tester: Add pretest and posttest target commands with @ARCH@, @BSP@ and @EXE@ substitution. 2017-10-21 17:04:53 +11:00
Chris Johns
af6a54d7c8 tester: Use a target ON command before the first test. 2017-10-21 16:20:04 +11:00
Chris Johns
fce29b0c1f tester: Change the capture console prompt to avoid email reply processing in clients. 2017-10-12 06:13:13 +11:00
Chris Johns
662e1f7d9a tester: Add a tester off to turn the target off when finished.
Turning the target off stops it sitting asking for a download if you have
more than one target in a test set up. Any target can jump in and
nick the download.
2017-10-10 13:30:31 +11:00
Chris Johns
9580804ae5 Add a target start and target reset to manage boards that do not boot cleanly.
Rename the reset regex as start regex to detect a board has started.
Add a reset regex to detect if a board has failed to boot cleanly and
needs to be reset.

The Microzed I have can fail to boot. The PHY does not initalise.
I do not know if it is the board, the design or u-boot.
2017-10-07 18:57:24 +11:00
Chris Johns
0737b4603b tester: Add a target reset regular expression to detect a reset. 2017-10-05 14:21:01 +11:00
Chris Johns
3c7cd05593 tester: Fix the TFTP ok to kill deadlock. 2017-09-21 21:34:34 +10:00
Chris Johns
3a867a4919 Add TFTP as a back end option for testing. Add telnet as a console option.
TFTP runs a local TFTP server on port 69 or another specified port and
serves each test for any requested file.

Telnet is now a console option.
2017-09-21 18:26:20 +10:00
Chris Johns
15a3e06518 tester: Add support for expected-fail, user-input, and benchmarks.
Count the errors for the states listed and add running totals.

Kill the test process if the test state is user-input or benchmark.
2017-04-04 13:32:03 +10:00
Chris Johns
b0fa2ae998 Update rtems-tool to support Python 2 and 3.
Add solaris and netbsd.

Close #2619.
2016-03-03 16:53:39 +11:00
Sebastian Huber
04a52040ae Python 3 compatibility 2015-11-12 11:15:23 +01:00
Chris Johns
60937e1775 test: Strengthen the timeout handling by killing the process. 2014-06-01 14:43:03 +10:00
Chris Johns
c04a84917a tester: Correctly handle contro-c.
Add support to kill running tests if the user presses control-c.
2014-05-31 20:03:05 +10:00
Chris Johns
a116962a43 tester: The process returns an exit code not an errno. 2014-03-26 16:45:06 +11:00
Chris Johns
50fdf12244 rt: Add the rtems-tester. 2014-02-15 06:30:06 +11:00