From 7c1b4c2a43052596cbe07d9943607b391e7bf4a8 Mon Sep 17 00:00:00 2001 From: Alastair Robertson Date: Wed, 25 Jan 2023 08:26:47 -0800 Subject: [PATCH] Integration test readme: Add example of how to run a single test Also minor cleanup of gen_tests.py --- test/integration/README.md | 16 +++++++++------- test/integration/gen_tests.py | 4 ++-- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/test/integration/README.md b/test/integration/README.md index 88a0785..1d2b2f5 100644 --- a/test/integration/README.md +++ b/test/integration/README.md @@ -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 ]``` + 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 ] + ``` ## Adding tests diff --git a/test/integration/gen_tests.py b/test/integration/gen_tests.py index 2bbcf84..2dd398e 100644 --- a/test/integration/gen_tests.py +++ b/test/integration/gen_tests.py @@ -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"