1. ```bash
% <path to llvm build>/bin/llvm-lit --version
lit 0.8.0dev
```
```bash
% mkdir venv
% virtualenv venv
% . venv/bin/activate
% pip install svn+https://llvm.org/svn/llvm-project/llvm/trunk/utils/lit
% lit --version
lit 0.8.0dev
```
2. ```bash
% git clone https://github.com/llvm/llvm-test-suite.git test-suite
```
3. ```bash
% mkdir test-suite-build
% cd test-suite-build
% cmake -DCMAKE_C_COMPILER=<path to llvm build>/bin/clang \
-C../test-suite/cmake/caches/O3.cmake \
../test-suite
```
4. ```text
% make
Scanning dependencies of target timeit-target
[ 0%] Building C object tools/CMakeFiles/timeit-target.dir/timeit.c.o
[ 0%] Linking C executable timeit-target
...
```
5. ```text
% llvm-lit -v -j 1 -o results.json .
-- Testing: 474 tests, 1 threads --
PASS: test-suite :: MultiSource/Applications/ALAC/decode/alacconvert-decode.test (1 of 474)
********** TEST 'test-suite :: MultiSource/Applications/ALAC/decode/alacconvert-decode.test' RESULTS **********
compile_time: 0.2192
exec_time: 0.0462
hash: "59620e187c6ac38b36382685ccd2b63b"
size: 83348
**********
PASS: test-suite :: MultiSource/Applications/ALAC/encode/alacconvert-encode.test (2 of 474)
...
```
6. ```bash
# Make sure pandas and scipy are installed. Prepend `sudo` if necessary.
% pip install pandas scipy
# Show a single result file:
% test-suite/utils/compare.py results.json
# Compare two result files:
% test-suite/utils/compare.py results_a.json results_b.json
```
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ```text
% test-suite/utils/compare.py baseline.json
Warning: 'test-suite :: External/SPEC/CINT2006/403.gcc/403.gcc.test' has No metrics!
Tests: 508
Metric: exec_time
Program baseline
INT2006/456.hmmer/456.hmmer 1222.90
INT2006/464.h264ref/464.h264ref 928.70
...
baseline
count 506.000000
mean 20.563098
std 111.423325
min 0.003400
25% 0.011200
50% 0.339450
75% 4.067200
max 1222.896800
```
- ```bash
% test-suite/utils/compare.py -m compile_time baseline.json
% test-suite/utils/compare.py -m size.__text baseline.json
```
- ```bash
% test-suite/utils/compare.py --filter-short baseline.json experiment.json
...
Program baseline experiment diff
SingleSour.../Benchmarks/Linpack/linpack-pc 5.16 4.30 -16.5%
MultiSourc...erolling-dbl/LoopRerolling-dbl 7.01 7.86 12.2%
SingleSour...UnitTests/Vectorizer/gcc-loops 3.89 3.54 -9.0%
...
```
- ```bash
% test-suite/utils/compare.py base0.json base1.json base2.json vs exp0.json exp1.json exp2.json
```
- -
-
-
- ```bash
% cmake -G Ninja -D CMAKE_C_COMPILER=path/to/clang \
-C ../test-suite/cmake/caches/target-arm64-iphoneos-internal.cmake \
-D CMAKE_BUILD_TYPE=Release \
-D TEST_SUITE_REMOTE_HOST=mydevice \
../test-suite
% ninja
% ninja rsync
% llvm-lit -j1 -o result.json .
```
-