Integration test readme: Add example of how to run a single test

Also minor cleanup of gen_tests.py
This commit is contained in:
Alastair Robertson 2023-01-25 08:26:47 -08:00 committed by Alastair Robertson
parent 425bb3fc24
commit 7c1b4c2a43
2 changed files with 11 additions and 9 deletions

View File

@ -12,14 +12,16 @@ additional options to aid debugging:
- `--preserve` Do not clean up files generated by OID after tests are finished
- `--force` Run tests that have been marked as "skipped"
1. Run a number of the integration tests in parallel:
```ctest --test-dir build/test/integration -j$(nproc) [--tests-regex <regex>]```
e.g.
```sh
build/test/integration/integration_test_runner --gtest_filter=OidIntegration.primitives_int --verbose
```
1. Run along with all tests with either of:
```
make test-devel
make test-static
```
1. Run a number of the integration tests in parallel:
```sh
ctest --test-dir build/test/integration -j$(nproc) [--tests-regex <regex>]
```
## Adding tests

View File

@ -238,7 +238,7 @@ def add_oid_integration_test(f, config, case_name, case):
f.write(
f"\n"
f'TEST_F(OidIntegration, {config["suite"]}_{case_name}) {{\n'
f"TEST_F(OidIntegration, {case_str}) {{\n"
f"{generate_skip(case, 'oid')}"
f' std::string configOptions = R"--(\n'
f"{config_extra}\n"
@ -309,7 +309,7 @@ def add_oil_integration_test(f, config, case_name, case):
f.write(
f"\n"
f'TEST_F(OilIntegration, {config["suite"]}_{case_name}) {{\n'
f"TEST_F(OilIntegration, {case_str}) {{\n"
f"{generate_skip(case, 'oil')}"
f" ba::io_context ctx;\n"
f" auto target = runOilTarget({{\n"