Skip to content

Commit df119b6

Browse files
add detail on run-xv6-command
1 parent 2413f5b commit df119b6

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tester/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ The files needed to describe a test number `n` are:
2020
- `n.pre` (optional): Code to run before the test, to set something up
2121
- `n.post` (optional): Code to run after the test, to clean something up
2222

23+
There is also a single file called `pre` which gets run once at the
24+
beginning of testing; this is often used to do a more complex build
25+
of a code base, for example. To prevent repeated time-wasting pre-test
26+
activity, suppress this with the `-s` flag (as described below).
27+
2328
In most cases, a wrapper script is used to call `run-tests.sh` to do the
2429
necessary work.
2530

@@ -29,4 +34,13 @@ The options for `run-tests.sh` include:
2934
* `-t n` (run only test `n`)
3035
* `-c` (continue even after a test fails)
3136
* `-d` (run tests not from `tests/` directory but from this directory instead)
37+
* `-s` (suppress running the one-time set of commands in `pre` file)
38+
39+
There is also another script used in testing of `xv6' projects, called
40+
`run-xv6-command`. This is an `expect` script which launches the qemu
41+
emulator and runs the relevant testing command in the xv6 environment
42+
before automatically terminating the test. It is used by the `run-tests.sh`
43+
script as described above and thus not generally called by users directly.
44+
45+
3246

0 commit comments

Comments
 (0)