Skip to content

Commit d05854d

Browse files
llvm][docs] Use default checkout location in test suite guide (#139264)
Step 2 tells you to checkout "llvm-test-suite" to "test-suite", but I don't see a particular reason to use a non-default path. If you're following the instructions exactly, it all works, but if you autopilot that step it is surprising later when things do not work. It's not hard for an individual to fix later, but we should suggest the least surprising thing where we can.
1 parent 28b7d66 commit d05854d

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

llvm/docs/TestSuiteGuide.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Quickstart
4141
2. Check out the `test-suite` module with:
4242

4343
```bash
44-
% git clone https://github.com/llvm/llvm-test-suite.git test-suite
44+
% git clone https://github.com/llvm/llvm-test-suite.git
4545
```
4646

4747
3. Create a build directory and use CMake to configure the suite. Use the
@@ -53,8 +53,8 @@ Quickstart
5353
% mkdir test-suite-build
5454
% cd test-suite-build
5555
% cmake -DCMAKE_C_COMPILER=<path to llvm build>/bin/clang \
56-
-C../test-suite/cmake/caches/O3.cmake \
57-
../test-suite
56+
-C../llvm-test-suite/cmake/caches/O3.cmake \
57+
../llvm-test-suite
5858
```
5959

6060
**NOTE!** if you are using your built clang, and you want to build and run the
@@ -102,9 +102,9 @@ MicroBenchmarks/XRay microbenchmarks, you need to add `compiler-rt` to your
102102
# Make sure pandas and scipy are installed. Prepend `sudo` if necessary.
103103
% pip install pandas scipy
104104
# Show a single result file:
105-
% test-suite/utils/compare.py results.json
105+
% llvm-test-suite/utils/compare.py results.json
106106
# Compare two result files:
107-
% test-suite/utils/compare.py results_a.json results_b.json
107+
% llvm-test-suite/utils/compare.py results_a.json results_b.json
108108
```
109109

110110

@@ -287,7 +287,7 @@ benchmarks. CMake can print a list of them:
287287

288288
Generate build files for the ninja build tool.
289289

290-
- `-Ctest-suite/cmake/caches/<cachefile.cmake>`
290+
- `-Cllvm-test-suite/cmake/caches/<cachefile.cmake>`
291291

292292
Use a CMake cache. The test-suite comes with several CMake caches which
293293
predefine common or tricky build configurations.
@@ -304,7 +304,7 @@ Example usage:
304304
- Basic Usage:
305305

306306
```text
307-
% test-suite/utils/compare.py baseline.json
307+
% llvm-test-suite/utils/compare.py baseline.json
308308
Warning: 'test-suite :: External/SPEC/CINT2006/403.gcc/403.gcc.test' has No metrics!
309309
Tests: 508
310310
Metric: exec_time
@@ -328,14 +328,14 @@ Example usage:
328328
- Show compile_time or text segment size metrics:
329329

330330
```bash
331-
% test-suite/utils/compare.py -m compile_time baseline.json
332-
% test-suite/utils/compare.py -m size.__text baseline.json
331+
% llvm-test-suite/utils/compare.py -m compile_time baseline.json
332+
% llvm-test-suite/utils/compare.py -m size.__text baseline.json
333333
```
334334

335335
- Compare two result files and filter short running tests:
336336

337337
```bash
338-
% test-suite/utils/compare.py --filter-short baseline.json experiment.json
338+
% llvm-test-suite/utils/compare.py --filter-short baseline.json experiment.json
339339
...
340340
Program baseline experiment diff
341341

@@ -349,7 +349,7 @@ Example usage:
349349
runtime each:
350350

351351
```bash
352-
% test-suite/utils/compare.py base0.json base1.json base2.json vs exp0.json exp1.json exp2.json
352+
% llvm-test-suite/utils/compare.py base0.json base1.json base2.json vs exp0.json exp1.json exp2.json
353353
```
354354

355355
### Continuous Tracking with LNT
@@ -365,11 +365,11 @@ External Suites
365365

366366
External suites such as SPEC can be enabled by either
367367

368-
- placing (or linking) them into the `test-suite/test-suite-externals/xxx` directory (example: `test-suite/test-suite-externals/speccpu2000`)
368+
- placing (or linking) them into the `llvm-test-suite/test-suite-externals/xxx` directory (example: `llvm-test-suite/test-suite-externals/speccpu2000`)
369369
- using a configuration option such as `-D TEST_SUITE_SPEC2000_ROOT=path/to/speccpu2000`
370370

371371
You can find further information in the respective README files such as
372-
`test-suite/External/SPEC/README`.
372+
`llvm-test-suite/External/SPEC/README`.
373373

374374
For the SPEC benchmarks you can switch between the `test`, `train` and
375375
`ref` input datasets via the `TEST_SUITE_RUN_TYPE` configuration option.
@@ -398,7 +398,7 @@ picked up automatically if placed into a subdirectory of the test-suite or when
398398
setting the `TEST_SUITE_SUBDIRS` variable:
399399

400400
```bash
401-
% cmake -DTEST_SUITE_SUBDIRS=path/to/my/benchmark-suite ../test-suite
401+
% cmake -DTEST_SUITE_SUBDIRS=path/to/my/benchmark-suite ../llvm-test-suite
402402
```
403403

404404

@@ -416,7 +416,7 @@ Example:
416416
% cmake -DTEST_SUITE_PROFILE_GENERATE=ON \
417417
-DTEST_SUITE_USE_IR_PGO=ON \
418418
-DTEST_SUITE_RUN_TYPE=train \
419-
../test-suite
419+
../llvm-test-suite
420420
% make
421421
% llvm-lit .
422422
# Use the profile data for compilation and actual benchmark run:
@@ -446,7 +446,7 @@ information can be found here:
446446
- [https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html](https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html)
447447

448448
Cross compilation from macOS to iOS is possible with the
449-
`test-suite/cmake/caches/target-target-*-iphoneos-internal.cmake` CMake cache
449+
`llvm-test-suite/cmake/caches/target-target-*-iphoneos-internal.cmake` CMake cache
450450
files; this requires an internal iOS SDK.
451451

452452
### Running
@@ -464,10 +464,10 @@ There are two ways to run the tests in a cross compilation setting:
464464

465465
```bash
466466
% cmake -G Ninja -D CMAKE_C_COMPILER=path/to/clang \
467-
-C ../test-suite/cmake/caches/target-arm64-iphoneos-internal.cmake \
467+
-C ../llvm-test-suite/cmake/caches/target-arm64-iphoneos-internal.cmake \
468468
-D CMAKE_BUILD_TYPE=Release \
469469
-D TEST_SUITE_REMOTE_HOST=mydevice \
470-
../test-suite
470+
../llvm-test-suite
471471
% ninja
472472
% ninja rsync
473473
% llvm-lit -j1 -o result.json .

0 commit comments

Comments
 (0)