DATE:
AUTHOR:
The Launchable Product Team
CLI Predictive Test Selection

Run Launchable subsets using CTest more easily

DATE:
AUTHOR: The Launchable Product Team

CTest has a limitation on regex size that can be passed into an execution command. Sometimes this prevents running a subset of tests.

To improve this, the CLI can now split the subset output into multiple expressions, allowing you to run tests with multiple ctest invocations.

There are now two new options: --output-regex-files and --output-regex-files-dir.

The --output-regex-files option instructs the CLI to write the regular expression for the subset tests into several files in the directory specified in --output-regex-files-dir.

You can then pass each file into ctest to run:

for file in subset/subset_*; do
  ctest -T test --no-compress-output -R "$(cat "$file")"
done

See https://docs.launchableinc.com/resources/integrations/ctest for more info.

Powered by LaunchNotes