Skip to content

Conversation

@aemerson
Copy link
Contributor

The --build-dir option now works with all build modes, not just
--test-prebuilt. It can be used to specify a custom build directory
location, overriding the default sandbox/build or timestamped directory.

Copy link
Contributor Author

aemerson commented Oct 21, 2025

@aemerson aemerson marked this pull request as ready for review October 21, 2025 06:05
@aemerson aemerson force-pushed the users/amara/generalize-build-dir branch 2 times, most recently from a1fe462 to ff82019 Compare October 21, 2025 22:17
Copy link
Member

@ldionne ldionne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this simplification. I think that after this, we can actually remove --timestamp/--no-timestamp, which only seems to be used for testing. When we run tests, we use --no-timestamp so that we can then refer to the build directory as %t.SANDBOX/build, but it would be cleaner to pass --build-dir %t.build instead.

This adds support for separating build and test phases, and running
benchmarks from multiple builds in an interleaved fashion to control
for environmental factors (ambient temperature, general system load etc).

New options:
* --build-only: Build tests without running them
* --test-prebuilt: Run tests from pre-built directory
* --build-dir: Specify build directory (used with --test-prebuilt)
* --exec-interleaved-builds: Comma-separated list of builds to interleave

Usage:

1. Build two compiler versions:
   lnt runtest test-suite --build-only \
     --sandbox /tmp/sandbox-a \
     --cc /path/to/clang-a \
     --test-suite ~/llvm-test-suite \
     ...

   lnt runtest test-suite --build-only \
     --sandbox /tmp/sandbox-b \
     --cc /path/to/clang-b \
     --test-suite ~/llvm-test-suite \
     ...

2. Run with interleaved execution:
   lnt runtest test-suite \
     --sandbox /tmp/results \
     --exec-interleaved-builds /tmp/sandbox-a/build,/tmp/sandbox-b/build \
     --exec-multisample 3

   This runs tests in the pattern:
   - Sample 0: build-a -> build-b
   - Sample 1: build-a -> build-b
   - Sample 2: build-a -> build-b

   Temporal interleaving controls for environmental changes that could
   bias results toward one build.

Or, test single build:
   lnt runtest test-suite --test-prebuilt \
     --build-dir /tmp/sandbox-a/build \
     --exec-multisample 5

Reports are written to each build directory (report.json,
test-results.xunit.xml, test-results.csv).
The --build-dir option now works with all build modes, not just
--test-prebuilt. It can be used to specify a custom build directory
location, overriding the default sandbox/build or timestamped directory.
@aemerson aemerson force-pushed the users/amara/interleaved-builds branch from 064aefe to 17ed608 Compare October 25, 2025 04:48
@aemerson aemerson force-pushed the users/amara/generalize-build-dir branch from ff82019 to 8d74447 Compare October 25, 2025 04:48
Base automatically changed from users/amara/interleaved-builds to main October 25, 2025 04:54
@aemerson aemerson closed this Oct 25, 2025
@aemerson
Copy link
Contributor Author

This was folded into #107 so this PR isn't needed anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants