Skip to content

Commit 9e12401

Browse files
sawenzelclaude
andcommitted
Fix stale usage text and add missing harness to test/README.md
This brings the README's documentation of run_tests.sh up to date with the actual entrypoint instead of the old run_generator_tests.sh text. - The "More help" block pasted run_generator_tests.sh's usage output; replaced it with the real output of run_tests.sh --help. - Listed test/tests/resolve_tag.sh alongside the other offline harnesses. - Added a note to run the checkout's own test/run_tests.sh, not ${O2DPG_ROOT}/test/run_tests.sh, when the change under test is to a test script itself, since the latter resolves its sub-scripts next to itself and would test the released copy instead. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 74f3356 commit 9e12401

1 file changed

Lines changed: 19 additions & 15 deletions

File tree

test/README.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ If you are inside the source directory, you can simply run
5858
```bash
5959
${O2DPG_ROOT}/test/run_tests.sh [--fail-immediately] [--keep-artifacts] [SUBTEST...]
6060
```
61+
If the change you are testing is to a test script itself (`run_tests.sh` or
62+
any `run_*_tests.sh`), invoke the checkout's own entrypoint instead, e.g.
63+
`bash test/run_tests.sh` from inside the checkout: `run_tests.sh` finds its
64+
sub-scripts next to itself, so calling `${O2DPG_ROOT}/test/run_tests.sh`
65+
tests the *released* copy of the script you just edited, not your change,
66+
even with `O2DPG_TEST_REPO_DIR` pointed at the checkout.
6167

6268
### Running a subset
6369

@@ -68,12 +74,14 @@ some of them, name them:
6874
${O2DPG_ROOT}/test/run_tests.sh generator relval
6975
```
7076

71-
The offline harnesses under `test/tests/` check the entrypoint's selection and
72-
exit-code aggregation without needing an O2 environment:
77+
The offline harnesses under `test/tests/` check the entrypoint's selection,
78+
exit-code aggregation and O2PDPSuite tag resolution without needing an O2
79+
environment:
7380

7481
```bash
7582
bash test/tests/run_tests_selection.sh
7683
bash test/tests/exit_code_aggregation.sh
84+
bash test/tests/resolve_tag.sh
7785
```
7886

7987
### Keeping all test artifacts
@@ -91,26 +99,22 @@ ${O2DPG_ROOT}/test/run_tests.sh -h
9199
```
92100
which will give you
93101
```
94-
usage: run_tests.sh [--fail-immediately] [--keep-artifacts]
102+
103+
usage: run_tests.sh [--fail-immediately] [--keep-artifacts] [SUBTEST...]
104+
105+
SUBTEST : one or more of: generator workflow relval (default: all)
95106
96107
FLAGS:
97108
98-
--fail-immediately : abort as soon as the first tests fails
99-
--keep-artifacts : keep simulation and tests artifacts, by default everything but the logs is removed after each test
109+
--fail-immediately : stop after the first failing sub-test
110+
--keep-artifacts : keep simulation artifacts, not just the logs
100111
101112
ENVIRONMENT VARIABLES:
102113
103-
O2DPG_TEST_REPO_DIR : Point to the source repository you want to test.
104-
O2DPG_TEST_HASH_BASE : The base hash you want to use for comparison (optional)
105-
O2DPG_TEST_HASH_HEAD : The head hash you want to use for comparison (optional)
106-
107-
If O2DPG_TEST_HASH_BASE is not set, it will be looked for ALIBUILD_BASE_HASH.
108-
If also not set, this will be set to HEAD~1. However, if there are unstaged
109-
changes, it will be set to HEAD.
114+
O2DPG_TEST_REPO_DIR : the source repository to test
115+
O2DPG_TEST_HASH_BASE : base hash for the changed-file diff (optional)
116+
O2DPG_TEST_HASH_HEAD : head hash for the changed-file diff (optional)
110117
111-
If O2DPG_TEST_HASH_HEAD is not set, it will be looked for ALIBUILD_HEAD_HASH.
112-
If also not set, this will be set to HEAD. However, if there are unstaged
113-
changes, it will left blank.
114118
```
115119

116120
## When your change needs an unreleased O2

0 commit comments

Comments
 (0)