From 81930acd88c60992449cd29417fa29ef6ca480a5 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Thu, 23 Aug 2018 22:34:14 +0000 Subject: cmake: Explicitely specify benchmark data Explicitely declare what files are used as inputs for the benchmarks. This changes the benchmarks to: - Symlink (or copy) the related input files next to the binary into the build folder. - Set the working directory of the benchmark to be the folder of the executable. - Having the data next to the binary also reduces the amount of absolute paths in the test files. - Contains some smaller cleanups for SPEC95/2000/2006 files while adapting to the new data copying style. With this change in place you do not need the test-suite source repository anymore to run the benchmarks. This is an important step towards having a test-suite that can be cross-compiled on a host, then copied onto a device and ran there without having a shared filesystem like NFS setup. Differential Revision: https://reviews.llvm.org/D50209 git-svn-id: https://llvm.org/svn/llvm-project/test-suite/trunk@340582 91177308-0d34-0410-b5e6-96231b3b80d8 --- External/HMMER/CMakeLists.txt | 12 +++- External/Nurbs/CMakeLists.txt | 6 +- External/Povray/CMakeLists.txt | 13 ++-- External/SPEC/CFP2000/177.mesa/CMakeLists.txt | 19 ++---- External/SPEC/CFP2000/179.art/CMakeLists.txt | 22 +++---- External/SPEC/CFP2000/183.equake/CMakeLists.txt | 14 ++-- External/SPEC/CFP2000/188.ammp/CMakeLists.txt | 14 ++-- External/SPEC/CFP2000/CMakeLists.txt | 1 - External/SPEC/CFP2006/433.milc/CMakeLists.txt | 17 ++--- External/SPEC/CFP2006/444.namd/CMakeLists.txt | 17 +++-- External/SPEC/CFP2006/447.dealII/CMakeLists.txt | 32 ++++----- External/SPEC/CFP2006/450.soplex/CMakeLists.txt | 33 ++++------ External/SPEC/CFP2006/453.povray/CMakeLists.txt | 25 +++++--- External/SPEC/CFP2006/470.lbm/CMakeLists.txt | 13 ++-- External/SPEC/CFP2006/482.sphinx3/CMakeLists.txt | 42 ++++++------ External/SPEC/CINT2000/164.gzip/CMakeLists.txt | 14 ++-- External/SPEC/CINT2000/175.vpr/CMakeLists.txt | 40 +++++------- External/SPEC/CINT2000/176.gcc/CMakeLists.txt | 13 ++-- External/SPEC/CINT2000/181.mcf/CMakeLists.txt | 19 +++--- External/SPEC/CINT2000/186.crafty/CMakeLists.txt | 14 ++-- External/SPEC/CINT2000/197.parser/CMakeLists.txt | 12 ++-- External/SPEC/CINT2000/252.eon/CMakeLists.txt | 29 +++++---- External/SPEC/CINT2000/253.perlbmk/CMakeLists.txt | 75 +++++++++------------- External/SPEC/CINT2000/254.gap/CMakeLists.txt | 17 +++-- External/SPEC/CINT2000/255.vortex/CMakeLists.txt | 15 ++--- External/SPEC/CINT2000/256.bzip2/CMakeLists.txt | 13 ++-- External/SPEC/CINT2000/300.twolf/CMakeLists.txt | 16 ++--- External/SPEC/CINT2000/CMakeLists.txt | 1 - .../SPEC/CINT2006/400.perlbench/CMakeLists.txt | 44 ++++--------- External/SPEC/CINT2006/401.bzip2/CMakeLists.txt | 36 +++++------ External/SPEC/CINT2006/403.gcc/CMakeLists.txt | 13 ++-- External/SPEC/CINT2006/429.mcf/CMakeLists.txt | 19 +++--- External/SPEC/CINT2006/445.gobmk/CMakeLists.txt | 12 ++-- External/SPEC/CINT2006/456.hmmer/CMakeLists.txt | 27 +++----- External/SPEC/CINT2006/458.sjeng/CMakeLists.txt | 13 ++-- .../SPEC/CINT2006/462.libquantum/CMakeLists.txt | 16 ++--- External/SPEC/CINT2006/464.h264ref/CMakeLists.txt | 24 ++++--- External/SPEC/CINT2006/471.omnetpp/CMakeLists.txt | 23 +++---- External/SPEC/CINT2006/473.astar/CMakeLists.txt | 14 ++-- .../SPEC/CINT2006/483.xalancbmk/CMakeLists.txt | 11 ++-- External/SPEC/CINT95/099.go/CMakeLists.txt | 10 +-- External/SPEC/CINT95/124.m88ksim/CMakeLists.txt | 13 ++-- External/SPEC/CINT95/126.gcc/CMakeLists.txt | 13 ++-- External/SPEC/CINT95/129.compress/CMakeLists.txt | 12 ++-- External/SPEC/CINT95/130.li/CMakeLists.txt | 10 +-- External/SPEC/CINT95/132.ijpeg/CMakeLists.txt | 10 +-- External/SPEC/CINT95/134.perl/CMakeLists.txt | 12 ++-- External/SPEC/CINT95/147.vortex/CMakeLists.txt | 17 ++--- External/SPEC/SpecCPU2000.cmake | 8 +++ External/SPEC/SpecCPU2006.cmake | 9 ++- External/SPEC/SpecCPU95.cmake | 9 ++- External/skidmarks10/CMakeLists.txt | 6 +- .../Applications/ALAC/decode/CMakeLists.txt | 3 +- .../Applications/ALAC/encode/CMakeLists.txt | 3 +- MultiSource/Applications/Burg/CMakeLists.txt | 3 +- MultiSource/Applications/ClamAV/CMakeLists.txt | 35 +++++----- MultiSource/Applications/JM/ldecod/CMakeLists.txt | 4 +- MultiSource/Applications/JM/lencod/CMakeLists.txt | 11 +++- MultiSource/Applications/SIBsim4/CMakeLists.txt | 6 +- MultiSource/Applications/SPASS/CMakeLists.txt | 6 +- MultiSource/Applications/d/CMakeLists.txt | 3 +- MultiSource/Applications/hbd/CMakeLists.txt | 3 +- MultiSource/Applications/hexxagon/CMakeLists.txt | 3 +- MultiSource/Applications/kimwitu++/CMakeLists.txt | 4 +- .../Applications/lambda-0.1.3/CMakeLists.txt | 4 +- MultiSource/Applications/lemon/CMakeLists.txt | 4 +- MultiSource/Applications/lua/CMakeLists.txt | 1 - MultiSource/Applications/minisat/CMakeLists.txt | 8 ++- MultiSource/Applications/obsequi/CMakeLists.txt | 3 +- MultiSource/Applications/oggenc/CMakeLists.txt | 3 +- MultiSource/Applications/siod/CMakeLists.txt | 3 +- MultiSource/Applications/spiff/CMakeLists.txt | 3 +- MultiSource/Applications/sqlite3/CMakeLists.txt | 4 +- MultiSource/Applications/treecc/CMakeLists.txt | 3 +- MultiSource/Applications/viterbi/CMakeLists.txt | 3 +- .../Benchmarks/ASC_Sequoia/IRSmk/CMakeLists.txt | 3 +- .../Benchmarks/BitBench/drop3/CMakeLists.txt | 3 +- .../Benchmarks/BitBench/five11/CMakeLists.txt | 3 +- .../Benchmarks/BitBench/uudecode/CMakeLists.txt | 3 +- .../Benchmarks/BitBench/uuencode/CMakeLists.txt | 3 +- .../DOE-ProxyApps-C++/PENNANT/CMakeLists.txt | 3 +- .../DOE-ProxyApps-C/Pathfinder/CMakeLists.txt | 3 +- .../DOE-ProxyApps-C/SimpleMOC/CMakeLists.txt | 3 +- .../Benchmarks/Fhourstones-3.1/CMakeLists.txt | 6 +- MultiSource/Benchmarks/Fhourstones/CMakeLists.txt | 3 +- .../Benchmarks/FreeBench/analyzer/CMakeLists.txt | 6 +- .../Benchmarks/FreeBench/distray/CMakeLists.txt | 6 +- .../Benchmarks/FreeBench/fourinarow/CMakeLists.txt | 6 +- .../Benchmarks/FreeBench/mason/CMakeLists.txt | 6 +- .../Benchmarks/FreeBench/neural/CMakeLists.txt | 6 +- .../Benchmarks/FreeBench/pcompress2/CMakeLists.txt | 12 +--- .../Benchmarks/FreeBench/pifft/CMakeLists.txt | 6 +- .../Benchmarks/MallocBench/espresso/CMakeLists.txt | 3 +- .../Benchmarks/MallocBench/gawk/CMakeLists.txt | 3 +- .../Benchmarks/MallocBench/gs/CMakeLists.txt | 30 ++++++++- .../Benchmarks/MallocBench/make/CMakeLists.txt | 3 +- .../Benchmarks/MallocBench/p2c/CMakeLists.txt | 3 +- .../Benchmarks/MallocBench/perl/CMakeLists.txt | 3 +- .../Benchmarks/McCat/01-qbsort/CMakeLists.txt | 3 +- .../Benchmarks/McCat/03-testtrie/CMakeLists.txt | 3 +- .../Benchmarks/McCat/04-bisect/CMakeLists.txt | 3 +- MultiSource/Benchmarks/McCat/09-vor/CMakeLists.txt | 3 +- .../Benchmarks/McCat/15-trie/CMakeLists.txt | 3 +- .../Benchmarks/McCat/17-bintr/CMakeLists.txt | 3 +- MultiSource/Benchmarks/McCat/18-imp/CMakeLists.txt | 3 +- .../MiBench/automotive-susan/CMakeLists.txt | 3 +- .../MiBench/consumer-jpeg/CMakeLists.txt | 3 +- .../MiBench/consumer-lame/CMakeLists.txt | 3 +- .../MiBench/consumer-typeset/CMakeLists.txt | 3 +- .../MiBench/network-dijkstra/CMakeLists.txt | 3 +- .../MiBench/network-patricia/CMakeLists.txt | 3 +- .../MiBench/office-ispell/CMakeLists.txt | 3 +- .../MiBench/security-rijndael/CMakeLists.txt | 3 +- .../Benchmarks/MiBench/security-sha/CMakeLists.txt | 3 +- .../MiBench/telecomm-CRC32/CMakeLists.txt | 3 +- .../MiBench/telecomm-adpcm/CMakeLists.txt | 3 +- .../Benchmarks/MiBench/telecomm-gsm/CMakeLists.txt | 3 +- MultiSource/Benchmarks/PAQ8p/CMakeLists.txt | 8 ++- .../Benchmarks/Prolangs-C++/employ/CMakeLists.txt | 3 +- .../Benchmarks/Prolangs-C/agrep/CMakeLists.txt | 3 +- .../Benchmarks/Prolangs-C/bison/CMakeLists.txt | 3 +- .../Benchmarks/Prolangs-C/cdecl/CMakeLists.txt | 3 +- .../Benchmarks/Prolangs-C/gnugo/CMakeLists.txt | 3 +- .../Prolangs-C/unix-smail/CMakeLists.txt | 3 +- .../Benchmarks/Ptrdist/anagram/CMakeLists.txt | 3 +- MultiSource/Benchmarks/Ptrdist/bc/CMakeLists.txt | 3 +- MultiSource/Benchmarks/Ptrdist/ks/CMakeLists.txt | 3 +- .../Benchmarks/Ptrdist/yacr2/CMakeLists.txt | 3 +- .../Benchmarks/Rodinia/hotspot/CMakeLists.txt | 1 - MultiSource/Benchmarks/Rodinia/srad/CMakeLists.txt | 1 - .../Trimaran/netbench-url/CMakeLists.txt | 7 +- .../Benchmarks/VersaBench/8b10b/CMakeLists.txt | 5 +- .../Benchmarks/VersaBench/dbms/CMakeLists.txt | 7 +- MultiSource/Benchmarks/mafft/CMakeLists.txt | 4 +- .../mediabench/adpcm/rawcaudio/CMakeLists.txt | 5 +- .../mediabench/adpcm/rawdaudio/CMakeLists.txt | 5 +- .../mediabench/g721/g721encode/CMakeLists.txt | 5 +- .../Benchmarks/mediabench/gsm/toast/CMakeLists.txt | 5 +- .../mediabench/jpeg/jpeg-6a/CMakeLists.txt | 5 +- .../mediabench/mpeg2/mpeg2dec/CMakeLists.txt | 5 +- MultiSource/Benchmarks/nbench/CMakeLists.txt | 9 +-- MultiSource/Benchmarks/sim/CMakeLists.txt | 5 +- cmake/modules/CopyDir.cmake | 14 ++++ cmake/modules/SingleMultiSource.cmake | 5 +- cmake/modules/TestSuite.cmake | 29 +++++++++ 145 files changed, 756 insertions(+), 644 deletions(-) diff --git a/External/HMMER/CMakeLists.txt b/External/HMMER/CMakeLists.txt index 040f78ba..f05632b8 100644 --- a/External/HMMER/CMakeLists.txt +++ b/External/HMMER/CMakeLists.txt @@ -12,11 +12,19 @@ if(TEST_SUITE_HMMER_ROOT) add_definitions(-DSSE2) endif() + llvm_test_prepare(WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + cp -f globin.hmm run.hmm + ) if(LARGE_PROBLEM_SIZE) - llvm_test_run(--fixed 400 --cpu 1 --num 200000 --seed 1158818515 ${TEST_SUITE_HMMER_ROOT}/globin.hmm) + llvm_test_run(WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + --fixed 400 --cpu 1 --num 200000 --seed 1158818515 run.hmm + ) else() - llvm_test_run(--fixed 400 --cpu 1 --num 80000 --seed 1158818515 ${TEST_SUITE_HMMER_ROOT}/globin.hmm) + llvm_test_run(WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + --fixed 400 --cpu 1 --num 80000 --seed 1158818515 run.hmm + ) endif() FILE(GLOB SOURCES ${TEST_SUITE_HMMER_ROOT}/*.c) llvm_test_executable(hmmcalibrate ${SOURCES}) + llvm_test_data(hmmcalibrate SOURCE_DIR ${TEST_SUITE_HMMER_ROOT} globin.hmm) endif() diff --git a/External/Nurbs/CMakeLists.txt b/External/Nurbs/CMakeLists.txt index 8ca48b59..0a902821 100644 --- a/External/Nurbs/CMakeLists.txt +++ b/External/Nurbs/CMakeLists.txt @@ -10,13 +10,13 @@ if(ARCH STREQUAL "x86") endif() llvm_test_run(/k all timed /t 500 /vsteps 192 /usteps 192 /vcp 20 /ucp 20) - llvm_test_verify(${FPCMP} - %o - ${CMAKE_CURRENT_SOURCE_DIR}/nurbs.reference_output + llvm_test_verify(WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} %o nurbs.reference_output ) file(GLOB SOURCES ${TEST_SUITE_NURBS_ROOT}/*.cpp) llvm_test_executable(nurbs ${SOURCES}) + llvm_test_data(nurbs nurbs.reference_output) file(COPY lit.local.cfg DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") endif() diff --git a/External/Povray/CMakeLists.txt b/External/Povray/CMakeLists.txt index 027cc4f8..6a9ccc89 100644 --- a/External/Povray/CMakeLists.txt +++ b/External/Povray/CMakeLists.txt @@ -21,17 +21,18 @@ if(TEST_SUITE_POVRAY_ROOT) ) list(APPEND LDFLAGS -lz -lm) - llvm_test_run( - -I${TEST_SUITE_POVRAY_ROOT}/scenes/advanced/chess2.pov - -L${TEST_SUITE_POVRAY_ROOT}/include + llvm_test_run(WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + -Iscenes/advanced/chess2.pov + -Linclude -GA/dev/null -O- ) - llvm_test_verify(${FPCMP} - %o - ${CMAKE_CURRENT_SOURCE_DIR}/povray.reference_output + llvm_test_verify(WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} %o povray.reference_output ) llvm_test_executable(povray ${Source}) + llvm_test_data(povray povray.reference_output) + llvm_test_data(povray SOURCE_DIR ${TEST_SUITE_POVRAY_ROOT} scenes include) file(COPY lit.local.cfg DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") endif() diff --git a/External/SPEC/CFP2000/177.mesa/CMakeLists.txt b/External/SPEC/CFP2000/177.mesa/CMakeLists.txt index bf0f71be..5de036bb 100644 --- a/External/SPEC/CFP2000/177.mesa/CMakeLists.txt +++ b/External/SPEC/CFP2000/177.mesa/CMakeLists.txt @@ -67,14 +67,11 @@ macro(test_input run_type frames) WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input -frames ${frames} -meshfile mesa.in -ppmfile mesa.ppm ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - ${BENCHMARK_DIR}/data/${run_type}/output/mesa.log - ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/mesa.log + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} data/${run_type}/output/mesa.log data/${run_type}/input/mesa.log ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - -a 6.0 - ${BENCHMARK_DIR}/data/${run_type}/output/mesa.ppm - ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/mesa.ppm + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} -a 6.0 data/${run_type}/output/mesa.ppm data/${run_type}/input/mesa.ppm ) endmacro() @@ -82,9 +79,5 @@ test_input(test 10) test_input(train 500) test_input(ref 1000) -llvm_test_executable(${PROG} ${Source}) - -# The benchmark writes the output where the input files are, so we have to -# copy the data over. -include(CopyDir) -llvm_copy_dir(177.mesa ${CMAKE_CURRENT_BINARY_DIR}/data ${BENCHMARK_DIR}/data) +llvm_test_executable(177.mesa ${Source}) +llvm_test_data_spec(177.mesa MUST_COPY data) diff --git a/External/SPEC/CFP2000/179.art/CMakeLists.txt b/External/SPEC/CFP2000/179.art/CMakeLists.txt index 32163dfc..cb901fcb 100644 --- a/External/SPEC/CFP2000/179.art/CMakeLists.txt +++ b/External/SPEC/CFP2000/179.art/CMakeLists.txt @@ -1,15 +1,14 @@ macro(test_input run_type output) - llvm_test_run(RUN_TYPE ${run_type} ${ARGN} > "${CMAKE_CURRENT_BINARY_DIR}/${output}") - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - -r 0.01 - "${BENCHMARK_DIR}/data/${run_type}/output/${output}" - "${CMAKE_CURRENT_BINARY_DIR}/${output}" + llvm_test_run(RUN_TYPE ${run_type} + ${ARGN} > ${CMAKE_CURRENT_BINARY_DIR}/${output} + ) + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} -r 0.01 data/${run_type}/output/${output} ${output} ) endmacro() -set(DATADIR ${BENCHMARK_DIR}/data) test_input(test test.out - WORKDIR ${DATADIR}/test/input + WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/test/input -scanfile c756hel.in -trainfile1 a10.img -stride 2 @@ -20,7 +19,7 @@ test_input(test test.out -objects 1 ) test_input(train train.out - WORKDIR ${DATADIR}/train/input + WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/train/input -scanfile c756hel.in -trainfile1 a10.img -stride 2 @@ -31,7 +30,7 @@ test_input(train train.out -objects 3 ) test_input(ref ref.1.out - WORKDIR ${DATADIR}/ref/input + WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/ref/input -scanfile c756hel.in -trainfile1 a10.img -trainfile2 hc.img @@ -43,7 +42,7 @@ test_input(ref ref.1.out -objects 10 ) test_input(ref ref.2.out - WORKDIR ${DATADIR}/ref/input + WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/ref/input -scanfile c756hel.in -trainfile1 a10.img -trainfile2 hc.img @@ -55,4 +54,5 @@ test_input(ref ref.2.out -objects 10 ) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(179.art ${Source}) +llvm_test_data_spec_default(179.art) diff --git a/External/SPEC/CFP2000/183.equake/CMakeLists.txt b/External/SPEC/CFP2000/183.equake/CMakeLists.txt index b29ce307..45b32f12 100644 --- a/External/SPEC/CFP2000/183.equake/CMakeLists.txt +++ b/External/SPEC/CFP2000/183.equake/CMakeLists.txt @@ -1,12 +1,9 @@ macro(test_input run_type) - llvm_test_run(RUN_TYPE ${run_type} - < "${BENCHMARK_DIR}/data/${run_type}/input/inp.in" - > "${CMAKE_CURRENT_BINARY_DIR}/inp.out" + llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + < data/${run_type}/input/inp.in > inp.out ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - -r 0.00001 - "${BENCHMARK_DIR}/data/${run_type}/output/inp.out" - "${CMAKE_CURRENT_BINARY_DIR}/inp.out" + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} -r 0.00001 data/${run_type}/output/inp.out inp.out ) endmacro() @@ -14,4 +11,5 @@ test_input(test) test_input(train) test_input(ref) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(183.equake ${Source}) +llvm_test_data_spec_default(183.equake) diff --git a/External/SPEC/CFP2000/188.ammp/CMakeLists.txt b/External/SPEC/CFP2000/188.ammp/CMakeLists.txt index 3a8a0291..b18eef48 100644 --- a/External/SPEC/CFP2000/188.ammp/CMakeLists.txt +++ b/External/SPEC/CFP2000/188.ammp/CMakeLists.txt @@ -1,13 +1,10 @@ macro(test_input run_type) llvm_test_run(RUN_TYPE ${run_type} - WORKDIR ${BENCHMARK_DIR}/data/${run_type}/input - < ${BENCHMARK_DIR}/data/${run_type}/input/ammp.in - > "${CMAKE_CURRENT_BINARY_DIR}/ammp.out" + WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input + < ammp.in > ${CMAKE_CURRENT_BINARY_DIR}/ammp.out ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - -r 0.003 -a 0.0001 - "${BENCHMARK_DIR}/data/${run_type}/output/ammp.out" - "${CMAKE_CURRENT_BINARY_DIR}/ammp.out" + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} -r 0.003 -a 0.0001 data/${run_type}/output/ammp.out ammp.out ) endmacro() @@ -15,4 +12,5 @@ test_input(test) test_input(train) test_input(ref) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(188.ammp ${Source}) +llvm_test_data_spec_default(188.ammp) diff --git a/External/SPEC/CFP2000/CMakeLists.txt b/External/SPEC/CFP2000/CMakeLists.txt index d96ca3e1..9782021c 100644 --- a/External/SPEC/CFP2000/CMakeLists.txt +++ b/External/SPEC/CFP2000/CMakeLists.txt @@ -4,7 +4,6 @@ if(TEST_SUITE_SPEC2000_ROOT) macro(cfp2000_subdir BENCHMARK) set(BENCHMARK_DIR ${TEST_SUITE_SPEC2000_ROOT}/benchspec/CFP2000/${BENCHMARK}) - set(PROG ${BENCHMARK}) file(GLOB Source ${BENCHMARK_DIR}/src/*.c ${BENCHMARK_DIR}/src/*.cpp) add_subdirectory(${BENCHMARK}) endmacro() diff --git a/External/SPEC/CFP2006/433.milc/CMakeLists.txt b/External/SPEC/CFP2006/433.milc/CMakeLists.txt index df5e9867..3d53db84 100644 --- a/External/SPEC/CFP2006/433.milc/CMakeLists.txt +++ b/External/SPEC/CFP2006/433.milc/CMakeLists.txt @@ -4,14 +4,14 @@ include_directories(${BENCHMARK_DIR}/src) add_definitions(-DFN -DFAST -DCONGRAD_TMP_VECTORS -DDSLASH_TMP_LINKS) macro(test_input run_type) - llvm_test_run(RUN_TYPE ${run_type} - < ${BENCHMARK_DIR}/data/${run_type}/input/su3imp.in - > ${CMAKE_CURRENT_BINARY_DIR}/su3imp.out + llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + < data/${run_type}/input/su3imp.in + > su3imp.out ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - -r 0.0001 -a 0.0000002 - ${BENCHMARK_DIR}/data/${run_type}/output/su3imp.out - ${CMAKE_CURRENT_BINARY_DIR}/su3imp.out + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} -r 0.0001 -a 0.0000002 + data/${run_type}/output/su3imp.out + su3imp.out ) endmacro() @@ -19,4 +19,5 @@ test_input(test) test_input(train) test_input(ref) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(433.milc ${Source}) +llvm_test_data_spec_default(433.milc) diff --git a/External/SPEC/CFP2006/444.namd/CMakeLists.txt b/External/SPEC/CFP2006/444.namd/CMakeLists.txt index 61d0165a..e834f3fc 100644 --- a/External/SPEC/CFP2006/444.namd/CMakeLists.txt +++ b/External/SPEC/CFP2006/444.namd/CMakeLists.txt @@ -17,16 +17,14 @@ foreach(FILENAME ${SourceNames}) endforeach() macro(test_input run_type iters) - llvm_test_run(RUN_TYPE ${run_type} - --input ${BENCHMARK_DIR}/data/all/input/namd.input + llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + --input data/all/input/namd.input --iterations ${iters} - --output ${CMAKE_CURRENT_BINARY_DIR}/namd.out - > ${CMAKE_CURRENT_BINARY_DIR}/namd.stdout + --output namd.out + > namd.stdout ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - -a 0.00001 - ${BENCHMARK_DIR}/data/${run_type}/output/namd.out - ${CMAKE_CURRENT_BINARY_DIR}/namd.out + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} -a 0.00001 data/${run_type}/output/namd.out namd.out ) endmacro() @@ -34,4 +32,5 @@ test_input(test 1) test_input(train 1) test_input(ref 38) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(444.namd ${Source}) +llvm_test_data_spec_default(444.namd) diff --git a/External/SPEC/CFP2006/447.dealII/CMakeLists.txt b/External/SPEC/CFP2006/447.dealII/CMakeLists.txt index 00bd711b..f78b0150 100644 --- a/External/SPEC/CFP2006/447.dealII/CMakeLists.txt +++ b/External/SPEC/CFP2006/447.dealII/CMakeLists.txt @@ -6,28 +6,27 @@ list(APPEND CXXFLAGS -std=gnu++98) macro(verify_n run_type dir n) # Note that the official SPEC fp tolarence is only "-a .0000001", however this # has proven to only work reliably for x86 targets/libm. - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - -a 1e-5 -r 1e-5 - ${BENCHMARK_DIR}/data/${dir}/output/grid-${n}.eps - ${CMAKE_CURRENT_BINARY_DIR}/grid-${n}.eps + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} -a 1e-5 -r 1e-5 + data/${dir}/output/grid-${n}.eps + grid-${n}.eps ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - -a 1e-5 -r 1e-5 - ${BENCHMARK_DIR}/data/${dir}/output/solution-${n}.gmv - ${CMAKE_CURRENT_BINARY_DIR}/solution-${n}.gmv + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} -a 1e-5 -r 1e-5 + data/${dir}/output/solution-${n}.gmv + solution-${n}.gmv ) endmacro() macro(test_input run_type size) - llvm_test_run(RUN_TYPE ${run_type} + llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} ${size} - > ${CMAKE_CURRENT_BINARY_DIR}/log - WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + > log ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - -a 1e-5 -r 1e-5 - ${BENCHMARK_DIR}/data/${run_type}/output/log - ${CMAKE_CURRENT_BINARY_DIR}/log + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} -a 1e-5 -r 1e-5 + data/${run_type}/output/log + log ) foreach(i RANGE 0 8) verify_n(${run_type} all ${i}) @@ -43,4 +42,5 @@ test_input(test 8) test_input(train 10) test_input(ref 23) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(447.dealII ${Source}) +llvm_test_data_spec_default(447.dealII) diff --git a/External/SPEC/CFP2006/450.soplex/CMakeLists.txt b/External/SPEC/CFP2006/450.soplex/CMakeLists.txt index ffd415a5..b1b80a03 100644 --- a/External/SPEC/CFP2006/450.soplex/CMakeLists.txt +++ b/External/SPEC/CFP2006/450.soplex/CMakeLists.txt @@ -3,19 +3,18 @@ list(APPEND CXXFLAGS -std=gnu++98) macro(test_input run_type input outname stdout_reltol info_reltol) llvm_test_run(RUN_TYPE ${run_type} - ${ARGN} ${input} - > ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/${outname} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input + ${ARGN} ${input} > ${outname} ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - -r ${stdout_reltol} -a 1.0e-5 - ${BENCHMARK_DIR}/data/${run_type}/output/${outname} - ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/${outname} + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} -r ${stdout_reltol} -a 1.0e-5 + data/${run_type}/output/${outname} + data/${run_type}/input/${outname} ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - -r ${info_reltol} -a 20 - ${BENCHMARK_DIR}/data/${run_type}/output/${input}.info - ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/${input}.info + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} -r ${info_reltol} -a 20 + data/${run_type}/output/${input}.info + data/${run_type}/input/${input}.info ) endmacro() @@ -25,15 +24,5 @@ test_input(train pds-20.mps pds-20.mps.out 0.02 0.0001 -s1 -e -m5000) test_input(ref ref.mps ref.out 0.02 0.0001 -m3500) test_input(ref pds-50.mps pds-50.mps.out 0.02 0.0001 -s1 -e -m45000) -llvm_test_executable(${PROG} ${Source}) - -include(CopyDir) -macro(prepare_data run_type) - llvm_copy_dir(450.soplex - ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input - ${BENCHMARK_DIR}/data/${run_type}/input - ) -endmacro() -prepare_data(test) -prepare_data(train) -prepare_data(ref) +llvm_test_executable(450.soplex ${Source}) +llvm_test_data_spec(450.soplex MUST_COPY data) diff --git a/External/SPEC/CFP2006/453.povray/CMakeLists.txt b/External/SPEC/CFP2006/453.povray/CMakeLists.txt index f1de9a19..4b7c30ca 100644 --- a/External/SPEC/CFP2006/453.povray/CMakeLists.txt +++ b/External/SPEC/CFP2006/453.povray/CMakeLists.txt @@ -2,17 +2,18 @@ list(APPEND LDFLAGS -lm) macro(test_input run_type stdout_reltol) llvm_test_run(RUN_TYPE ${run_type} - SPEC-benchmark-${run_type}.ini WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input + SPEC-benchmark-${run_type}.ini ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - -r ${stdout_reltol} - ${BENCHMARK_DIR}/data/${run_type}/output/SPEC-benchmark.log - ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/SPEC-benchmark.log + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} -r ${stdout_reltol} + data/${run_type}/output/SPEC-benchmark.log + data/${run_type}/input/SPEC-benchmark.log ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - ${BENCHMARK_DIR}/data/${run_type}/output/SPEC-benchmark.tga - ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/SPEC-benchmark.tga + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} + data/${run_type}/output/SPEC-benchmark.tga + data/${run_type}/input/SPEC-benchmark.tga ) endmacro() @@ -20,9 +21,13 @@ test_input(test 0.0002) test_input(train 0.00005) test_input(ref 0.00005) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(453.povray ${Source}) +llvm_test_data_spec(453.povray + data/test/output + data/train/output + data/ref/output +) -include(CopyDir) llvm_copy_dir(453.povray ${CMAKE_CURRENT_BINARY_DIR}/data/test/input ${BENCHMARK_DIR}/data/test/input ${BENCHMARK_DIR}/data/all/input diff --git a/External/SPEC/CFP2006/470.lbm/CMakeLists.txt b/External/SPEC/CFP2006/470.lbm/CMakeLists.txt index 9a9a7cb8..4fc07529 100644 --- a/External/SPEC/CFP2006/470.lbm/CMakeLists.txt +++ b/External/SPEC/CFP2006/470.lbm/CMakeLists.txt @@ -4,14 +4,14 @@ list(APPEND LDFLAGS -lm) macro(test_input run_type) llvm_test_run(RUN_TYPE ${run_type} + WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input ${ARGN} > ${CMAKE_CURRENT_BINARY_DIR}/lbm.out - WORKDIR ${BENCHMARK_DIR}/data/${run_type}/input ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - -a 0.0000001 - ${BENCHMARK_DIR}/data/${run_type}/output/lbm.out - ${CMAKE_CURRENT_BINARY_DIR}/lbm.out + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} -a 0.0000001 + data/${run_type}/output/lbm.out + lbm.out ) endmacro() @@ -19,4 +19,5 @@ test_input(test 20 reference.dat 0 1 100_100_130_cf_a.of) test_input(train 300 reference.dat 0 1 100_100_130_cf_b.of) test_input(ref 3000 reference.dat 0 0 100_100_130_ldc.of) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(470.lbm ${Source}) +llvm_test_data_spec_default(470.lbm) diff --git a/External/SPEC/CFP2006/482.sphinx3/CMakeLists.txt b/External/SPEC/CFP2006/482.sphinx3/CMakeLists.txt index b2fdb541..909298ce 100644 --- a/External/SPEC/CFP2006/482.sphinx3/CMakeLists.txt +++ b/External/SPEC/CFP2006/482.sphinx3/CMakeLists.txt @@ -5,24 +5,24 @@ list(APPEND CFLAGS -fsigned-char) macro(test_input run_type) llvm_test_run(RUN_TYPE ${run_type} + WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input ctlfile . args.an4 > ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/an4.log - WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - -r .0004 - ${BENCHMARK_DIR}/data/${run_type}/output/considered.out - ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/considered.out + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} -r .0004 + data/${run_type}/output/considered.out + data/${run_type}/input/considered.out ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - -r 1e-6 - ${BENCHMARK_DIR}/data/${run_type}/output/total_considered.out - ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/total_considered.out + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} -r 1e-6 + data/${run_type}/output/total_considered.out + data/${run_type}/input/total_considered.out ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - -r .001 - ${BENCHMARK_DIR}/data/${run_type}/output/an4.log - ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/an4.log + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} -r .001 + data/${run_type}/output/an4.log + data/${run_type}/input/an4.log ) endmacro() @@ -37,16 +37,15 @@ foreach(s ${Source}) set_source_files_properties(${s} PROPERTIES COMPILE_DEFINITIONS __FILE__="${basename}") endforeach() -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(482.sphinx3 ${Source}) -include(CopyDir) macro(prepare_data run_type) set(DESTDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input) - llvm_copy_dir(${PROG} ${DESTDIR}/model + llvm_copy_dir(482.sphinx3 ${DESTDIR}/model ${BENCHMARK_DIR}/data/all/input/model ) - llvm_copy(${PROG} ${DESTDIR} ${BENCHMARK_DIR}/data/${run_type}/input/args.an4) - llvm_copy(${PROG} ${DESTDIR} ${BENCHMARK_DIR}/data/${run_type}/input/beams.dat) + llvm_copy(482.sphinx3 ${DESTDIR} ${BENCHMARK_DIR}/data/${run_type}/input/args.an4) + llvm_copy(482.sphinx3 ${DESTDIR} ${BENCHMARK_DIR}/data/${run_type}/input/beams.dat) # Create ctlfile and copy .raw files depending on endianess if(IS_BIGENDIAN) file(GLOB files "${BENCHMARK_DIR}/data/${run_type}/input/*.be.raw") @@ -58,7 +57,7 @@ macro(prepare_data run_type) foreach(f ${files}) get_filename_component(basename ${f} NAME) string(REGEX REPLACE ".(be|le).raw$" "" basename "${basename}") - llvm_copy(${PROG} ${DESTDIR}/${basename}.raw ${f}) + llvm_copy(482.sphinx3 ${DESTDIR}/${basename}.raw ${f}) # Determine file size... file(READ ${f} content HEX) string(LENGTH ${content} content_length) @@ -72,6 +71,11 @@ endmacro() prepare_data(test) prepare_data(train) prepare_data(ref) +llvm_test_data_spec(482.sphinx3 MUST_COPY + data/test/output + data/train/output + data/ref/output +) # Data comes with *.test files which should not be read by lit. file(GENERATE diff --git a/External/SPEC/CINT2000/164.gzip/CMakeLists.txt b/External/SPEC/CINT2000/164.gzip/CMakeLists.txt index e5ce16d2..ec452da0 100644 --- a/External/SPEC/CINT2000/164.gzip/CMakeLists.txt +++ b/External/SPEC/CINT2000/164.gzip/CMakeLists.txt @@ -1,12 +1,9 @@ macro(test_input run_type filename size) - llvm_test_run(RUN_TYPE ${run_type} - ${BENCHMARK_DIR}/data/${run_type}/input/${filename} - ${size} - > ${CMAKE_CURRENT_BINARY_DIR}/${filename}.out + llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + data/${run_type}/input/${filename} ${size} > ${filename}.out ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - ${BENCHMARK_DIR}/data/${run_type}/output/${filename}.out - ${CMAKE_CURRENT_BINARY_DIR}/${filename}.out + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} data/${run_type}/output/${filename}.out ${filename}.out ) endmacro() @@ -18,4 +15,5 @@ test_input(ref input.graphic 60) test_input(ref input.random 60) test_input(ref input.program 60) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(164.gzip ${Source}) +llvm_test_data_spec_default(164.gzip) diff --git a/External/SPEC/CINT2000/175.vpr/CMakeLists.txt b/External/SPEC/CINT2000/175.vpr/CMakeLists.txt index 1b735455..f45aa722 100644 --- a/External/SPEC/CINT2000/175.vpr/CMakeLists.txt +++ b/External/SPEC/CINT2000/175.vpr/CMakeLists.txt @@ -2,19 +2,19 @@ list(APPEND CPPFLAGS -DNO_GRAPHICSS) list(APPEND LDFLAGS -lm) macro(test_input run_type costs_tolerance) - set(COSTS_OUT ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/costs.out) # The benchmark keeps appending to costs.out, so we have to make sure there # is none from previous runs - llvm_test_prepare(RUN_TYPE ${run_type} rm -f ${COSTS_OUT}) + llvm_test_prepare(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + rm -f data/${run_type}/input/costs.out + ) llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input net.in arch.in place.out dum.out -nodisp -place_only -init_t 5 -exit_t 0.005 -alpha_t 0.9412 -inner_num 2 > ${CMAKE_CURRENT_BINARY_DIR}/place_log.out ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - ${BENCHMARK_DIR}/data/${run_type}/output/place_log.out - ${CMAKE_CURRENT_BINARY_DIR}/place_log.out + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} data/${run_type}/output/place_log.out place_log.out ) llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input @@ -22,20 +22,18 @@ macro(test_input run_type costs_tolerance) -nodisp -route_only -route_chan_width 15 -pres_fac_mult 2 -acc_fac 1 -first_iter_pres_fac 4 -initial_pres_fac 8 > ${CMAKE_CURRENT_BINARY_DIR}/route_log.out ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - -r 0.015 - ${BENCHMARK_DIR}/data/${run_type}/output/route_log.out - ${CMAKE_CURRENT_BINARY_DIR}/route_log.out + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} -r 0.015 data/${run_type}/output/route_log.out route_log.out ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - -r 0.015 - ${BENCHMARK_DIR}/data/${run_type}/output/route.out - ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/route.out + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} -r 0.015 + data/${run_type}/output/route.out + data/${run_type}/input/route.out ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - -r ${costs_tolerance} - ${BENCHMARK_DIR}/data/${run_type}/output/costs.out - ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/costs.out + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} -r ${costs_tolerance} + data/${run_type}/output/costs.out + data/${run_type}/input/costs.out ) endmacro() @@ -43,9 +41,5 @@ test_input(ref 0.05) test_input(train 0.05) test_input(test 0.10) -llvm_test_executable(${PROG} ${Source}) - -# The benchmark writes the output where the input files are, so we have to -# copy the data over. -include(CopyDir) -llvm_copy_dir(175.vpr ${CMAKE_CURRENT_BINARY_DIR}/data ${BENCHMARK_DIR}/data) +llvm_test_executable(175.vpr ${Source}) +llvm_test_data_spec(175.vpr MUST_COPY data) diff --git a/External/SPEC/CINT2000/176.gcc/CMakeLists.txt b/External/SPEC/CINT2000/176.gcc/CMakeLists.txt index d1a85a0a..99683bf0 100644 --- a/External/SPEC/CINT2000/176.gcc/CMakeLists.txt +++ b/External/SPEC/CINT2000/176.gcc/CMakeLists.txt @@ -10,13 +10,11 @@ list(APPEND CFLAGS -std=gnu89) list(APPEND CPPFLAGS -D__DATE__="XXX" -D__TIME__="XXX") macro(test_input run_type ifile sfile) - llvm_test_run(RUN_TYPE ${run_type} - ${BENCHMARK_DIR}/data/${run_type}/input/${ifile} - -o ${CMAKE_CURRENT_BINARY_DIR}/${sfile} + llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + data/${run_type}/input/${ifile} -o ${sfile} ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - ${BENCHMARK_DIR}/data/${run_type}/output/${sfile} - ${CMAKE_CURRENT_BINARY_DIR}/${sfile} + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} data/${run_type}/output/${sfile} ${sfile} ) endmacro() @@ -28,4 +26,5 @@ test_input(ref scilab.i scilab.s) test_input(train cp-decl.i cp-decl.s) test_input(test cccp.i cccp.s) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(176.gcc ${Source}) +llvm_test_data_spec_default(176.gcc) diff --git a/External/SPEC/CINT2000/181.mcf/CMakeLists.txt b/External/SPEC/CINT2000/181.mcf/CMakeLists.txt index a3313626..552272fc 100644 --- a/External/SPEC/CINT2000/181.mcf/CMakeLists.txt +++ b/External/SPEC/CINT2000/181.mcf/CMakeLists.txt @@ -1,16 +1,12 @@ macro(test_input run_type) - llvm_test_run(RUN_TYPE ${run_type} - ${BENCHMARK_DIR}/data/${run_type}/input/inp.in - > ${CMAKE_CURRENT_BINARY_DIR}/inp.out - WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + data/${run_type}/input/inp.in > inp.out ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - ${BENCHMARK_DIR}/data/${run_type}/output/mcf.out - ${CMAKE_CURRENT_BINARY_DIR}/mcf.out + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} data/${run_type}/output/mcf.out mcf.out ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - ${BENCHMARK_DIR}/data/${run_type}/output/inp.out - ${CMAKE_CURRENT_BINARY_DIR}/inp.out + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} data/${run_type}/output/inp.out inp.out ) endmacro() @@ -18,4 +14,5 @@ test_input(ref) test_input(train) test_input(test) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(181.mcf ${Source}) +llvm_test_data_spec_default(181.mcf) diff --git a/External/SPEC/CINT2000/186.crafty/CMakeLists.txt b/External/SPEC/CINT2000/186.crafty/CMakeLists.txt index d8ec4613..1aad4792 100644 --- a/External/SPEC/CINT2000/186.crafty/CMakeLists.txt +++ b/External/SPEC/CINT2000/186.crafty/CMakeLists.txt @@ -72,14 +72,11 @@ foreach(FILENAME ${SourceNames}) endforeach() macro(test_input run_type) - llvm_test_run(RUN_TYPE ${run_type} - < ${BENCHMARK_DIR}/data/${run_type}/input/crafty.in - > ${CMAKE_CURRENT_BINARY_DIR}/crafty.out - WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + < data/${run_type}/input/crafty.in > crafty.out ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - ${BENCHMARK_DIR}/data/${run_type}/output/crafty.out - ${CMAKE_CURRENT_BINARY_DIR}/crafty.out + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} data/${run_type}/output/crafty.out crafty.out ) endmacro() @@ -87,4 +84,5 @@ test_input(ref) test_input(train) test_input(test) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(186.crafty ${Source}) +llvm_test_data_spec_default(186.crafty) diff --git a/External/SPEC/CINT2000/197.parser/CMakeLists.txt b/External/SPEC/CINT2000/197.parser/CMakeLists.txt index 63705b2c..8c341ceb 100644 --- a/External/SPEC/CINT2000/197.parser/CMakeLists.txt +++ b/External/SPEC/CINT2000/197.parser/CMakeLists.txt @@ -4,14 +4,13 @@ endif() macro(test_input run_type) llvm_test_run(RUN_TYPE ${run_type} + WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/all/input 2.1.dict -batch - < ${BENCHMARK_DIR}/data/${run_type}/input/${run_type}.in + < ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/${run_type}.in > ${CMAKE_CURRENT_BINARY_DIR}/${run_type}.out - WORKDIR ${BENCHMARK_DIR}/data/all/input ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - ${BENCHMARK_DIR}/data/${run_type}/output/${run_type}.out - ${CMAKE_CURRENT_BINARY_DIR}/${run_type}.out + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} data/${run_type}/output/${run_type}.out ${run_type}.out ) endmacro() @@ -19,4 +18,5 @@ test_input(ref) test_input(train) test_input(test) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(197.parser ${Source}) +llvm_test_data_spec_default(197.parser) diff --git a/External/SPEC/CINT2000/252.eon/CMakeLists.txt b/External/SPEC/CINT2000/252.eon/CMakeLists.txt index 6ea1b8a0..1829b679 100644 --- a/External/SPEC/CINT2000/252.eon/CMakeLists.txt +++ b/External/SPEC/CINT2000/252.eon/CMakeLists.txt @@ -144,7 +144,7 @@ foreach(FILENAME ${SourceNames}) endforeach() macro(test_input run_type) - set(INPUT_DIR ${BENCHMARK_DIR}/data/${run_type}/input) + set(INPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input) llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${INPUT_DIR} chair.control.cook chair.camera chair.surfaces ${CMAKE_CURRENT_BINARY_DIR}/chair.cook.ppm @@ -164,20 +164,20 @@ macro(test_input run_type) ${CMAKE_CURRENT_BINARY_DIR}/pixels_out.kajiya ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - -a 0.005 - ${BENCHMARK_DIR}/data/${run_type}/output/pixels_out.cook - ${CMAKE_CURRENT_BINARY_DIR}/pixels_out.cook + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} -a 0.005 + data/${run_type}/output/pixels_out.cook + pixels_out.cook ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - -a 0.005 - ${BENCHMARK_DIR}/data/${run_type}/output/pixels_out.rushmeier - ${CMAKE_CURRENT_BINARY_DIR}/pixels_out.rushmeier + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} -a 0.005 + data/${run_type}/output/pixels_out.rushmeier + pixels_out.rushmeier ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - -a 0.005 - ${BENCHMARK_DIR}/data/${run_type}/output/pixels_out.kajiya - ${CMAKE_CURRENT_BINARY_DIR}/pixels_out.kajiya + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} -a 0.005 + data/${run_type}/output/pixels_out.kajiya + pixels_out.kajiya ) endmacro() @@ -185,4 +185,5 @@ test_input(ref) test_input(train) test_input(test) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(252.eon ${Source}) +llvm_test_data_spec_default(252.eon) diff --git a/External/SPEC/CINT2000/253.perlbmk/CMakeLists.txt b/External/SPEC/CINT2000/253.perlbmk/CMakeLists.txt index 3dcd8d87..9fa8b71d 100644 --- a/External/SPEC/CINT2000/253.perlbmk/CMakeLists.txt +++ b/External/SPEC/CINT2000/253.perlbmk/CMakeLists.txt @@ -72,96 +72,81 @@ endforeach() macro(test_input run_type perlscript output) llvm_test_run(RUN_TYPE ${run_type} - -I${BENCHMARK_DIR}/data/all/input/lib ${perlscript} + -I${CMAKE_CURRENT_BINARY_DIR}/data/all/input/lib ${perlscript} > ${CMAKE_CURRENT_BINARY_DIR}/${output} ${ARGN} ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - ${BENCHMARK_DIR}/data/${run_type}/output/${output} - ${CMAKE_CURRENT_BINARY_DIR}/${output} + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} data/${run_type}/output/${output} ${output} ) endmacro() # (Parameters come from the respective XXX.in files) test_input(train - ${BENCHMARK_DIR}/data/all/input/diffmail.pl - 2.350.15.24.23.150.out - 2 350 15 24 23 150 - WORKDIR ${BENCHMARK_DIR}/data/all/input + diffmail.pl 2.350.15.24.23.150.out 2 350 15 24 23 150 + WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/all/input ) test_input(train - ${BENCHMARK_DIR}/data/all/input/perfect.pl - b.3.out - b 3 - WORKDIR ${BENCHMARK_DIR}/data/all/input + perfect.pl b.3.out b 3 + WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/all/input ) test_input(train - ${BENCHMARK_DIR}/data/train/input/scrabbl.pl - scrabbl.out - < ${BENCHMARK_DIR}/data/train/input/scrabbl.in - WORKDIR ${BENCHMARK_DIR}/data/train/input + scrabbl.pl scrabbl.out < scrabbl.in + WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/train/input ) test_input(ref - ${BENCHMARK_DIR}/data/ref/input/splitmail.pl - 850.5.19.18.1500.out - 850 5 19 18 1500 + splitmail.pl 850.5.19.18.1500.out 850 5 19 18 1500 WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/ref/input ) test_input(ref - ${BENCHMARK_DIR}/data/ref/input/splitmail.pl - 704.12.26.16.836.out - 704 12 26 16 836 + splitmail.pl 704.12.26.16.836.out 704 12 26 16 836 WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/ref/input ) test_input(ref - ${BENCHMARK_DIR}/data/ref/input/splitmail.pl - 535.13.25.24.1091.out - 535 13 25 24 1091 + splitmail.pl 535.13.25.24.1091.out 535 13 25 24 1091 WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/ref/input ) test_input(ref - ${BENCHMARK_DIR}/data/ref/input/splitmail.pl - 957.12.23.26.1014.out - 957 12 23 26 1014 + splitmail.pl 957.12.23.26.1014.out 957 12 23 26 1014 WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/ref/input ) test_input(ref - ${BENCHMARK_DIR}/data/all/input/diffmail.pl - 2.550.15.24.23.100.out - 2 550 15 24 23 100 - WORKDIR ${BENCHMARK_DIR}/data/all/input + diffmail.pl 2.550.15.24.23.100.out 2 550 15 24 23 100 + WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/ref/input ) test_input(ref - ${BENCHMARK_DIR}/data/all/input/perfect.pl - b.3.m.4.out - b 3 m 4 - WORKDIR ${BENCHMARK_DIR}/data/all/input + perfect.pl b.3.m.4.out b 3 m 4 + WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/ref/input ) test_input(ref - ${BENCHMARK_DIR}/data/ref/input/makerand.pl - makerand.out - WORKDIR ${BENCHMARK_DIR}/data/all/input + makerand.pl makerand.out + WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/ref/input ) file(GLOB inputs ${BENCHMARK_DIR}/data/test/input/*.t) foreach(input ${inputs}) get_filename_component(basename ${input} NAME_WE) test_input(test - ${CMAKE_CURRENT_BINARY_DIR}/data/test/input/${basename}.t - ${basename}.out + ${basename}.t ${basename}.out WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/test/input ) endforeach() -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(253.perlbmk ${Source}) +llvm_test_data_spec(253.perlbmk MUST_COPY + data/test/output + data/train/input + data/train/output + data/ref/output + data/all/input +) -include(CopyDir) -llvm_copy_dir(${PROG} ${CMAKE_CURRENT_BINARY_DIR}/data/test/input +llvm_copy_dir(253.perlbmk ${CMAKE_CURRENT_BINARY_DIR}/data/test/input ${BENCHMARK_DIR}/data/all/input ${BENCHMARK_DIR}/data/test/input ) -llvm_copy_dir(${PROG} ${CMAKE_CURRENT_BINARY_DIR}/data/ref/input +llvm_copy_dir(253.perlbmk ${CMAKE_CURRENT_BINARY_DIR}/data/ref/input ${BENCHMARK_DIR}/data/all/input ${BENCHMARK_DIR}/data/ref/input ) diff --git a/External/SPEC/CINT2000/254.gap/CMakeLists.txt b/External/SPEC/CINT2000/254.gap/CMakeLists.txt index 20305fe8..b13c12ca 100644 --- a/External/SPEC/CINT2000/254.gap/CMakeLists.txt +++ b/External/SPEC/CINT2000/254.gap/CMakeLists.txt @@ -13,15 +13,13 @@ endif() LIST(APPEND CFLAGS -fwrapv) macro(test_input run_type heapsize) - llvm_test_run(RUN_TYPE ${run_type} - -l ${BENCHMARK_DIR}/data/all/input -q -m ${heapsize} - < ${BENCHMARK_DIR}/data/${run_type}/input/${run_type}.in - > ${CMAKE_CURRENT_BINARY_DIR}/${run_type}.out + llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + -l data/all/input -q -m ${heapsize} + < data/${run_type}/input/${run_type}.in + > ${run_type}.out ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - -r 0.01 - ${BENCHMARK_DIR}/data/${run_type}/output/${run_type}.out - ${CMAKE_CURRENT_BINARY_DIR}/${run_type}.out + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} -r 0.01 data/${run_type}/output/${run_type}.out ${run_type}.out ) endmacro() @@ -29,4 +27,5 @@ test_input(ref 192M) test_input(train 128M) test_input(test 64M) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(254.gap ${Source}) +llvm_test_data_spec_default(254.gap) diff --git a/External/SPEC/CINT2000/255.vortex/CMakeLists.txt b/External/SPEC/CINT2000/255.vortex/CMakeLists.txt index d675fefe..1db4653f 100644 --- a/External/SPEC/CINT2000/255.vortex/CMakeLists.txt +++ b/External/SPEC/CINT2000/255.vortex/CMakeLists.txt @@ -5,9 +5,10 @@ macro(test_input run_type input outfile) WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input ${input} ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - ${BENCHMARK_DIR}/data/${run_type}/output/${outfile} - ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/${outfile} + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} + data/${run_type}/output/${outfile} + data/${run_type}/input/${outfile} ) endmacro() @@ -25,9 +26,5 @@ test_input(ref ${endianname}1.raw vortex1.out) test_input(ref ${endianname}2.raw vortex2.out) test_input(ref ${endianname}3.raw vortex3.out) -llvm_test_executable(${PROG} ${Source}) - -# The benchmark writes the output where the input files are, so we have to -# copy the data over. -include(CopyDir) -llvm_copy_dir(${PROG} ${CMAKE_CURRENT_BINARY_DIR}/data ${BENCHMARK_DIR}/data) +llvm_test_executable(255.vortex ${Source}) +llvm_test_data_spec(255.vortex MUST_COPY data) diff --git a/External/SPEC/CINT2000/256.bzip2/CMakeLists.txt b/External/SPEC/CINT2000/256.bzip2/CMakeLists.txt index 9c48a851..ee5df8eb 100644 --- a/External/SPEC/CINT2000/256.bzip2/CMakeLists.txt +++ b/External/SPEC/CINT2000/256.bzip2/CMakeLists.txt @@ -1,12 +1,10 @@ macro(test_input run_type filename size) llvm_test_run(RUN_TYPE ${run_type} - ${BENCHMARK_DIR}/data/${run_type}/input/${filename} - ${size} - > ${CMAKE_CURRENT_BINARY_DIR}/${filename}.out + WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + data/${run_type}/input/${filename} ${size} > ${filename}.out ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - ${BENCHMARK_DIR}/data/${run_type}/output/${filename}.out - ${CMAKE_CURRENT_BINARY_DIR}/${filename}.out + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} data/${run_type}/output/${filename}.out ${filename}.out ) endmacro() @@ -16,4 +14,5 @@ test_input(ref input.source 58) test_input(ref input.graphic 58) test_input(ref input.program 58) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(256.bzip2 ${Source}) +llvm_test_data_spec_default(256.bzip2) diff --git a/External/SPEC/CINT2000/300.twolf/CMakeLists.txt b/External/SPEC/CINT2000/300.twolf/CMakeLists.txt index 6f240684..5c42eb32 100644 --- a/External/SPEC/CINT2000/300.twolf/CMakeLists.txt +++ b/External/SPEC/CINT2000/300.twolf/CMakeLists.txt @@ -5,13 +5,11 @@ list(APPEND CFLAGS -Wno-return-type) macro(test_input run_type) llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input - ${run_type} - > ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/${run_type}.stdout + ${run_type} > ${run_type}.stdout ) foreach(file IN ITEMS ${run_type}.twf ${run_type}.pl2 ${run_type}.sav ${run_type}.pl1 ${run_type}.pl1 ${run_type}.pin ${run_type}.stdout ${run_type}.sv2 ${run_type}.out) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/${file} - ${BENCHMARK_DIR}/data/${run_type}/output/${file} + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} data/${run_type}/output/${file} data/${run_type}/input/${file} ) endforeach() endmacro() @@ -20,9 +18,5 @@ test_input(test) test_input(train) test_input(ref) -llvm_test_executable(${PROG} ${Source}) - -# The benchmark writes the output where the input files are, so we have to -# copy the data over. -include(CopyDir) -llvm_copy_dir(${PROG} ${CMAKE_CURRENT_BINARY_DIR}/data ${BENCHMARK_DIR}/data) +llvm_test_executable(300.twolf ${Source}) +llvm_test_data_spec(300.twolf MUST_COPY data) diff --git a/External/SPEC/CINT2000/CMakeLists.txt b/External/SPEC/CINT2000/CMakeLists.txt index cf88745c..8454ea95 100644 --- a/External/SPEC/CINT2000/CMakeLists.txt +++ b/External/SPEC/CINT2000/CMakeLists.txt @@ -2,7 +2,6 @@ include(${CMAKE_SOURCE_DIR}/External/SPEC/SpecCPU2000.cmake) if(TEST_SUITE_SPEC2000_ROOT) macro(cint2000_subdir BENCHMARK) set(BENCHMARK_DIR ${TEST_SUITE_SPEC2000_ROOT}/benchspec/CINT2000/${BENCHMARK}) - set(PROG ${BENCHMARK}) file(GLOB Source ${BENCHMARK_DIR}/src/*.c ${BENCHMARK_DIR}/src/*.cpp) add_subdirectory(${BENCHMARK}) endmacro() diff --git a/External/SPEC/CINT2006/400.perlbench/CMakeLists.txt b/External/SPEC/CINT2006/400.perlbench/CMakeLists.txt index 17dee225..0a568fec 100644 --- a/External/SPEC/CINT2006/400.perlbench/CMakeLists.txt +++ b/External/SPEC/CINT2006/400.perlbench/CMakeLists.txt @@ -74,56 +74,43 @@ macro(test_input run_type perlscript output) > ${CMAKE_CURRENT_BINARY_DIR}/${output} ${ARGN} ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - ${BENCHMARK_DIR}/data/${run_type}/output/${output} - ${CMAKE_CURRENT_BINARY_DIR}/${output} + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} data/${run_type}/output/${output} ${output} ) endmacro() # (Parameters come from the respective XXX.in files) test_input(train - ${BENCHMARK_DIR}/data/all/input/diffmail.pl - diffmail.2.550.15.24.23.100.out - 2 550 15 24 23 100 + diffmail.pl diffmail.2.550.15.24.23.100.out 2 550 15 24 23 100 WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/all/input ) test_input(train - ${BENCHMARK_DIR}/data/train/input/perfect.pl - perfect.b.3.out - b 3 + perfect.pl perfect.b.3.out b 3 WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/train/input ) test_input(train - ${BENCHMARK_DIR}/data/all/input/splitmail.pl - splitmail.535.13.25.24.1091.out - 535 13 25 24 1091 + splitmail.pl splitmail.535.13.25.24.1091.out 535 13 25 24 1091 WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/all/input ) test_input(train - ${BENCHMARK_DIR}/data/train/input/suns.pl - suns.out + suns.pl suns.out WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/train/input ) -llvm_test_verify(RUN_TYPE train ${FPCMP} - ${BENCHMARK_DIR}/data/train/output/validate - ${CMAKE_CURRENT_BINARY_DIR}/data/train/input/validate +llvm_test_verify(RUN_TYPE train WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} data/train/output/validate data/train/input/validate ) #test_input(train scrabbl.pl scrabbl.in) # spec doesn't come with output files? test_input(ref - ${BENCHMARK_DIR}/data/all/input/diffmail.pl - diffmail.4.800.10.17.19.300.out - 4 800 10 17 19 300 + diffmail.pl diffmail.4.800.10.17.19.300.out 4 800 10 17 19 300 WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/all/input ) test_input(ref - ${BENCHMARK_DIR}/data/all/input/splitmail.pl - splitmail.1600.12.26.16.4500.out - 1600 12 26 16 4500 + splitmail.pl splitmail.1600.12.26.16.4500.out 1600 12 26 16 4500 WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/all/input ) test_input(ref - ${BENCHMARK_DIR}/data/ref/input/checkspam.pl + ${CMAKE_CURRENT_BINARY_DIR}/data/ref/input/checkspam.pl checkspam.2500.5.25.11.150.1.1.1.1.out 2500 5 25 11 150 1 1 1 1 WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/all/input @@ -133,13 +120,10 @@ file(GLOB inputs ${BENCHMARK_DIR}/data/test/input/*.t) foreach(input ${inputs}) get_filename_component(basename ${input} NAME_WE) test_input(test - ${CMAKE_CURRENT_BINARY_DIR}/data/test/input/${basename}.t - ${basename}.out + ${basename}.t ${basename}.out WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/test/input ) endforeach() -llvm_test_executable(${PROG} ${Source}) - -include(CopyDir) -llvm_copy_dir(${PROG} ${CMAKE_CURRENT_BINARY_DIR}/data ${BENCHMARK_DIR}/data) +llvm_test_executable(400.perlbench ${Source}) +llvm_test_data_spec(400.perlbench MUST_COPY data) diff --git a/External/SPEC/CINT2006/401.bzip2/CMakeLists.txt b/External/SPEC/CINT2006/401.bzip2/CMakeLists.txt index 9d9d7549..94e1002f 100644 --- a/External/SPEC/CINT2006/401.bzip2/CMakeLists.txt +++ b/External/SPEC/CINT2006/401.bzip2/CMakeLists.txt @@ -1,27 +1,25 @@ macro(test_input run_type input size output) - llvm_test_run(RUN_TYPE ${run_type} - ${input} - ${size} - > ${CMAKE_CURRENT_BINARY_DIR}/${output} + llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${input} ${size} > ${output} ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - ${BENCHMARK_DIR}/data/${run_type}/output/${output} - ${CMAKE_CURRENT_BINARY_DIR}/${output} + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} data/${run_type}/output/${output} ${output} ) endmacro() -test_input(test ${BENCHMARK_DIR}/data/all/input/input.program 5 input.program.out) -test_input(test ${BENCHMARK_DIR}/data/test/input/dryer.jpg 2 dryer.jpg.out) +test_input(test data/all/input/input.program 5 input.program.out) +test_input(test data/test/input/dryer.jpg 2 dryer.jpg.out) -test_input(train ${BENCHMARK_DIR}/data/all/input/input.program 10 input.program.out) -test_input(train ${BENCHMARK_DIR}/data/train/input/byoudoin.jpg 5 byoudoin.jpg.out) -test_input(train ${BENCHMARK_DIR}/data/all/input/input.combined 80 input.combined.out) +test_input(train data/all/input/input.program 10 input.program.out) +test_input(train data/train/input/byoudoin.jpg 5 byoudoin.jpg.out) +test_input(train data/all/input/input.combined 80 input.combined.out) -test_input(ref ${BENCHMARK_DIR}/data/ref/input/input.source 280 input.source.out) -test_input(ref ${BENCHMARK_DIR}/data/ref/input/chicken.jpg 30 chicken.jpg.out) -test_input(ref ${BENCHMARK_DIR}/data/ref/input/liberty.jpg 30 liberty.jpg.out) -test_input(ref ${BENCHMARK_DIR}/data/all/input/input.program 280 input.program.out) -test_input(ref ${BENCHMARK_DIR}/data/ref/input/text.html 280 text.html.out) -test_input(ref ${BENCHMARK_DIR}/data/all/input/input.combined 200 input.combined.out) +test_input(ref data/ref/input/input.source 280 input.source.out) +test_input(ref data/ref/input/chicken.jpg 30 chicken.jpg.out) +test_input(ref data/ref/input/liberty.jpg 30 liberty.jpg.out) +test_input(ref data/all/input/input.program 280 input.program.out) +test_input(ref data/ref/input/text.html 280 text.html.out) +test_input(ref data/all/input/input.combined 200 input.combined.out) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(401.bzip2 ${Source}) +llvm_test_data_spec_default(401.bzip2) diff --git a/External/SPEC/CINT2006/403.gcc/CMakeLists.txt b/External/SPEC/CINT2006/403.gcc/CMakeLists.txt index 571c0f62..c70bdfd4 100644 --- a/External/SPEC/CINT2006/403.gcc/CMakeLists.txt +++ b/External/SPEC/CINT2006/403.gcc/CMakeLists.txt @@ -11,13 +11,11 @@ endif() list(APPEND CPPFLAGS -DPOSIX -DSPEC_CPU_HAVE_BOOL) macro(test_input run_type ifile sfile) - llvm_test_run(RUN_TYPE ${run_type} - ${BENCHMARK_DIR}/data/${run_type}/input/${ifile} - -o ${CMAKE_CURRENT_BINARY_DIR}/${sfile} + llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + data/${run_type}/input/${ifile} -o ${sfile} ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - ${BENCHMARK_DIR}/data/${run_type}/output/${sfile} - ${CMAKE_CURRENT_BINARY_DIR}/${sfile} + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} data/${run_type}/output/${sfile} ${sfile} ) endmacro() @@ -33,4 +31,5 @@ test_input(ref g23.in g23.s) test_input(ref s04.in s04.s) test_input(ref scilab.in scilab.s) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(403.gcc ${Source}) +llvm_test_data_spec_default(403.gcc) diff --git a/External/SPEC/CINT2006/429.mcf/CMakeLists.txt b/External/SPEC/CINT2006/429.mcf/CMakeLists.txt index 370779b4..6c501f95 100644 --- a/External/SPEC/CINT2006/429.mcf/CMakeLists.txt +++ b/External/SPEC/CINT2006/429.mcf/CMakeLists.txt @@ -1,18 +1,14 @@ list(APPEND CPPFLAGS -DWANT_STDC_PROTO) macro(test_input run_type) - llvm_test_run(RUN_TYPE ${run_type} - ${BENCHMARK_DIR}/data/${run_type}/input/inp.in - > ${CMAKE_CURRENT_BINARY_DIR}/inp.out - WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + data/${run_type}/input/inp.in > inp.out ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - ${BENCHMARK_DIR}/data/${run_type}/output/inp.out - ${CMAKE_CURRENT_BINARY_DIR}/inp.out + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} data/${run_type}/output/inp.out inp.out ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - ${BENCHMARK_DIR}/data/${run_type}/output/mcf.out - ${CMAKE_CURRENT_BINARY_DIR}/mcf.out + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} data/${run_type}/output/mcf.out mcf.out ) endmacro() @@ -20,4 +16,5 @@ test_input(test) test_input(train) test_input(ref) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(429.mcf ${Source}) +llvm_test_data_spec_default(429.mcf) diff --git a/External/SPEC/CINT2006/445.gobmk/CMakeLists.txt b/External/SPEC/CINT2006/445.gobmk/CMakeLists.txt index 2fd536ee..d249b170 100644 --- a/External/SPEC/CINT2006/445.gobmk/CMakeLists.txt +++ b/External/SPEC/CINT2006/445.gobmk/CMakeLists.txt @@ -12,14 +12,13 @@ include_directories(${BENCHMARK_DIR}/src/include) macro(test_input run_type tstfile outfile) llvm_test_run(RUN_TYPE ${run_type} + WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/all/input --quiet --mode gtp - < ${BENCHMARK_DIR}/data/${run_type}/input/${tstfile} + < ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/${tstfile} > ${CMAKE_CURRENT_BINARY_DIR}/${outfile} - WORKDIR ${BENCHMARK_DIR}/data/all/input ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - ${BENCHMARK_DIR}/data/${run_type}/output/${outfile} - ${CMAKE_CURRENT_BINARY_DIR}/${outfile} + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} data/${run_type}/output/${outfile} ${outfile} ) endmacro() @@ -41,4 +40,5 @@ foreach(tstfile IN ITEMS test_input(ref ${tstfile} ${basename}.out) endforeach() -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(445.gobmk ${Source}) +llvm_test_data_spec_default(445.gobmk) diff --git a/External/SPEC/CINT2006/456.hmmer/CMakeLists.txt b/External/SPEC/CINT2006/456.hmmer/CMakeLists.txt index dd3a6016..2aa58c56 100644 --- a/External/SPEC/CINT2006/456.hmmer/CMakeLists.txt +++ b/External/SPEC/CINT2006/456.hmmer/CMakeLists.txt @@ -2,20 +2,14 @@ list(APPEND LDFLAGS -lm) macro(test_input run_type input output) # The benchmark modifies the data file, need to copy a fresh one - llvm_test_prepare(RUN_TYPE ${run_type} - cp -f - ${BENCHMARK_DIR}/data/${run_type}/input/${input} - ${CMAKE_CURRENT_BINARY_DIR}/${input} + llvm_test_prepare(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + cp -f data/${run_type}/input/${input} ${input} ) - llvm_test_run(RUN_TYPE ${run_type} - ${ARGN} ${input} - > ${CMAKE_CURRENT_BINARY_DIR}/${output} - WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${ARGN} ${input} > ${output} ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - -r 0.002 -a 0.00001 - ${BENCHMARK_DIR}/data/${run_type}/output/${output} - ${CMAKE_CURRENT_BINARY_DIR}/${output} + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} -r 0.002 -a 0.00001 data/${run_type}/output/${output} ${output} ) endmacro() @@ -26,10 +20,8 @@ test_input(train leng100.hmm leng100.out --fixed 0 --mean 425 --num 85000 --sd 300 --seed 0 ) # Copy nph3.hmm as well -llvm_test_prepare(RUN_TYPE ref - cp -f - ${BENCHMARK_DIR}/data/ref/input/nph3.hmm - ${CMAKE_CURRENT_BINARY_DIR}/nph3.hmm +llvm_test_prepare(RUN_TYPE ref WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + cp -f data/ref/input/nph3.hmm nph3.hmm ) test_input(ref swiss41 nph3.out nph3.hmm @@ -38,4 +30,5 @@ test_input(ref retro.hmm retro.out --fixed 0 --mean 500 --num 500000 --sd 350 --seed 0 ) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(456.hmmer ${Source}) +llvm_test_data_spec_default(456.hmmer) diff --git a/External/SPEC/CINT2006/458.sjeng/CMakeLists.txt b/External/SPEC/CINT2006/458.sjeng/CMakeLists.txt index 8149c9d9..3ef506e8 100644 --- a/External/SPEC/CINT2006/458.sjeng/CMakeLists.txt +++ b/External/SPEC/CINT2006/458.sjeng/CMakeLists.txt @@ -1,11 +1,9 @@ macro(test_input run_type) - llvm_test_run(RUN_TYPE ${run_type} - ${BENCHMARK_DIR}/data/${run_type}/input/${run_type}.txt - > ${CMAKE_CURRENT_BINARY_DIR}/${run_type}.out + llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + data/${run_type}/input/${run_type}.txt > ${run_type}.out ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - ${BENCHMARK_DIR}/data/${run_type}/output/${run_type}.out - ${CMAKE_CURRENT_BINARY_DIR}/${run_type}.out + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} data/${run_type}/output/${run_type}.out ${run_type}.out ) endmacro() @@ -13,4 +11,5 @@ test_input(test) test_input(train) test_input(ref) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(458.sjeng ${Source}) +llvm_test_data_spec_default(458.sjeng) diff --git a/External/SPEC/CINT2006/462.libquantum/CMakeLists.txt b/External/SPEC/CINT2006/462.libquantum/CMakeLists.txt index 9ad72802..a0b01812 100644 --- a/External/SPEC/CINT2006/462.libquantum/CMakeLists.txt +++ b/External/SPEC/CINT2006/462.libquantum/CMakeLists.txt @@ -1,18 +1,17 @@ list(APPEND LDFLAGS -lm) macro(test_input run_type) - llvm_test_run(RUN_TYPE ${run_type} - ${ARGN} - > ${CMAKE_CURRENT_BINARY_DIR}/${run_type}.out + llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${ARGN} > ${run_type}.out ) # Reference outputs for test+train have CRLF line endings so we have to use # diff --strip-trailing-cr # (This flag is a gnu extension, maybe we should rather extend fpcmp or # somehow copy+fix the reference outputs?) - llvm_test_verify(RUN_TYPE ${run_type} diff - --strip-trailing-cr - ${BENCHMARK_DIR}/data/${run_type}/output/${run_type}.out - ${CMAKE_CURRENT_BINARY_DIR}/${run_type}.out + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + diff --strip-trailing-cr + data/${run_type}/output/${run_type}.out + ${run_type}.out ) endmacro() @@ -20,4 +19,5 @@ test_input(test 33 5) test_input(train 143 25) test_input(ref 1397 8) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(462.libquantum ${Source}) +llvm_test_data_spec_default(462.libquantum) diff --git a/External/SPEC/CINT2006/464.h264ref/CMakeLists.txt b/External/SPEC/CINT2006/464.h264ref/CMakeLists.txt index 8eebd8da..af0c2b2a 100644 --- a/External/SPEC/CINT2006/464.h264ref/CMakeLists.txt +++ b/External/SPEC/CINT2006/464.h264ref/CMakeLists.txt @@ -3,17 +3,19 @@ list(APPEND CFLAGS -fsigned-char) macro(test_input run_type leading level) llvm_test_run(RUN_TYPE ${run_type} + WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input -d ${leading}encoder_${level}.cfg > ${CMAKE_CURRENT_BINARY_DIR}/${leading}${level}_encodelog.out - WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - ${BENCHMARK_DIR}/data/${run_type}/output/${leading}${level}_encodelog.out - ${CMAKE_CURRENT_BINARY_DIR}/${leading}${level}_encodelog.out + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} + data/${run_type}/output/${leading}${level}_encodelog.out + ${leading}${level}_encodelog.out ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - ${BENCHMARK_DIR}/data/${run_type}/output/${leading}${level}_leakybucketparam.cfg - ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/${leading}${level}_leakybucketparam.cfg + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} + data/${run_type}/output/${leading}${level}_leakybucketparam.cfg + data/${run_type}/input/${leading}${level}_leakybucketparam.cfg ) endmacro() @@ -24,10 +26,14 @@ test_input(ref foreman_ref_ baseline) test_input(ref foreman_ref_ main) test_input(ref sss_ main) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(464.h264ref ${Source}) +llvm_test_data_spec(464.h264ref + data/test/output + data/train/output + data/ref/output +) # TODO: This will copy a bit more than 50M of data, maybe we should symlink it? -include(CopyDir) llvm_copy_dir(464.h264ref ${CMAKE_CURRENT_BINARY_DIR}/data/test/input ${BENCHMARK_DIR}/data/all/input ${BENCHMARK_DIR}/data/test/input diff --git a/External/SPEC/CINT2006/471.omnetpp/CMakeLists.txt b/External/SPEC/CINT2006/471.omnetpp/CMakeLists.txt index 2dc2fc18..a1bbff26 100644 --- a/External/SPEC/CINT2006/471.omnetpp/CMakeLists.txt +++ b/External/SPEC/CINT2006/471.omnetpp/CMakeLists.txt @@ -97,19 +97,19 @@ endforeach() macro(test_input run_type) llvm_test_run(RUN_TYPE ${run_type} - -f ${BENCHMARK_DIR}/data/${run_type}/input/omnetpp.ini - > ${CMAKE_CURRENT_BINARY_DIR}/omnetpp.log + -f data/${run_type}/input/omnetpp.ini + > omnetpp.log WORKDIR ${CMAKE_CURRENT_BINARY_DIR} ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - -r 0.00001 -a 0.000001 - ${BENCHMARK_DIR}/data/${run_type}/output/omnetpp.log - ${CMAKE_CURRENT_BINARY_DIR}/omnetpp.log + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} -r 0.00001 -a 0.000001 + data/${run_type}/output/omnetpp.log + omnetpp.log ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - -r 0.00001 -a 0.000001 - ${BENCHMARK_DIR}/data/${run_type}/output/omnetpp.sca - ${CMAKE_CURRENT_BINARY_DIR}/omnetpp.sca + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} -r 0.00001 -a 0.000001 + data/${run_type}/output/omnetpp.sca + omnetpp.sca ) endmacro() @@ -117,4 +117,5 @@ test_input(test) test_input(train) test_input(ref) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(471.omnetpp ${Source}) +llvm_test_data_spec_default(471.omnetpp) diff --git a/External/SPEC/CINT2006/473.astar/CMakeLists.txt b/External/SPEC/CINT2006/473.astar/CMakeLists.txt index e7b4e4e8..e8c90006 100644 --- a/External/SPEC/CINT2006/473.astar/CMakeLists.txt +++ b/External/SPEC/CINT2006/473.astar/CMakeLists.txt @@ -2,14 +2,11 @@ list(APPEND CPPFLAGS -std=c++98) macro(test_input run_type input output) llvm_test_run(RUN_TYPE ${run_type} - ${input} - > ${CMAKE_CURRENT_BINARY_DIR}/${output} - WORKDIR ${BENCHMARK_DIR}/data/${run_type}/input + WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input + ${input} > ${CMAKE_CURRENT_BINARY_DIR}/${output} ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - -r 0.001 - ${BENCHMARK_DIR}/data/${run_type}/output/${output} - ${CMAKE_CURRENT_BINARY_DIR}/${output} + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} -r 0.001 data/${run_type}/output/${output} ${output} ) endmacro() @@ -19,4 +16,5 @@ test_input(train rivers1.cfg rivers1.out) test_input(ref BigLakes2048.cfg BigLakes2048.out) test_input(ref rivers.cfg rivers.out) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(473.astar ${Source}) +llvm_test_data_spec_default(473.astar) diff --git a/External/SPEC/CINT2006/483.xalancbmk/CMakeLists.txt b/External/SPEC/CINT2006/483.xalancbmk/CMakeLists.txt index 712cefbd..8dcd1cb7 100644 --- a/External/SPEC/CINT2006/483.xalancbmk/CMakeLists.txt +++ b/External/SPEC/CINT2006/483.xalancbmk/CMakeLists.txt @@ -32,14 +32,12 @@ endif() macro(test_input run_type input output) llvm_test_run(RUN_TYPE ${run_type} + WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input -v ${input} xalanc.xsl > ${CMAKE_CURRENT_BINARY_DIR}/${output} - WORKDIR ${BENCHMARK_DIR}/data/${run_type}/input ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - -r 0.001 - ${BENCHMARK_DIR}/data/${run_type}/output/${output} - ${CMAKE_CURRENT_BINARY_DIR}/${output} + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} -r 0.001 data/${run_type}/output/${output} ${output} ) endmacro() @@ -47,4 +45,5 @@ test_input(test test.xml test.out) test_input(train allbooks.xml train.out) test_input(ref t5.xml ref.out) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(483.xalancbmk ${Source}) +llvm_test_data_spec_default(483.xalancbmk) diff --git a/External/SPEC/CINT95/099.go/CMakeLists.txt b/External/SPEC/CINT95/099.go/CMakeLists.txt index 94c2f751..ff7a59fe 100644 --- a/External/SPEC/CINT95/099.go/CMakeLists.txt +++ b/External/SPEC/CINT95/099.go/CMakeLists.txt @@ -1,12 +1,11 @@ macro(test_input run_type input output size0 size1) llvm_test_run(RUN_TYPE ${run_type} + WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input ${size0} ${size1} ${input} > ${CMAKE_CURRENT_BINARY_DIR}/${output} - WORKDIR ${BENCHMARK_DIR}/data/${run_type}/input ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - ${BENCHMARK_DIR}/data/${run_type}/output/${output} - ${CMAKE_CURRENT_BINARY_DIR}/${output} + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} data/${run_type}/output/${output} ${output} ) endmacro() @@ -16,4 +15,5 @@ test_input(ref 5stone21.in 5stone21.out 50 21) test_input(ref 9stone21.in 9stone21.out 50 21) test_input(ref null.in null.out 50 21) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(099.go ${Source}) +llvm_test_data_spec_default(099.go) diff --git a/External/SPEC/CINT95/124.m88ksim/CMakeLists.txt b/External/SPEC/CINT95/124.m88ksim/CMakeLists.txt index 66aaa438..0f7f5dcf 100644 --- a/External/SPEC/CINT95/124.m88ksim/CMakeLists.txt +++ b/External/SPEC/CINT95/124.m88ksim/CMakeLists.txt @@ -111,13 +111,11 @@ endforeach() macro(test_input run_type) llvm_test_run(RUN_TYPE ${run_type} - -c < ${BENCHMARK_DIR}/data/${run_type}/input/${CTLFILE} - > ${CMAKE_CURRENT_BINARY_DIR}/${run_type}.out - WORKDIR ${BENCHMARK_DIR}/data/${run_type}/input + WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input + -c < ${CTLFILE} > ${CMAKE_CURRENT_BINARY_DIR}/${run_type}.out ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - ${BENCHMARK_DIR}/data/${run_type}/output/${run_type}.out - ${CMAKE_CURRENT_BINARY_DIR}/${run_type}.out + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} data/${run_type}/output/${run_type}.out ${run_type}.out ) endmacro() @@ -125,4 +123,5 @@ test_input(test) test_input(train) test_input(ref) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(124.m88ksim ${Source}) +llvm_test_data_spec_default(124.m88ksim) diff --git a/External/SPEC/CINT95/126.gcc/CMakeLists.txt b/External/SPEC/CINT95/126.gcc/CMakeLists.txt index 394c8680..050482df 100644 --- a/External/SPEC/CINT95/126.gcc/CMakeLists.txt +++ b/External/SPEC/CINT95/126.gcc/CMakeLists.txt @@ -3,15 +3,15 @@ list(APPEND CPPFLAGS -idirafter ${BENCHMARK_DIR}/src/src.alt) macro(test_input run_type input output) llvm_test_run(RUN_TYPE ${run_type} + WORKDIR ${CMAKE_CURRENT_BINARY_DIR} -quiet -funroll-loops -fforce-mem -fcse-follow-jumps -fcse-skip-blocks -fexpensive-optimizations -fstrength-reduce -fpeephole -fschedule-insns -finline-functions -fschedule-insns2 - -O ${BENCHMARK_DIR}/data/${run_type}/input/${input} - -o ${CMAKE_CURRENT_BINARY_DIR}/${output} + -O data/${run_type}/input/${input} + -o ${output} ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - ${BENCHMARK_DIR}/data/${run_type}/output/${output} - ${CMAKE_CURRENT_BINARY_DIR}/${output} + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} data/${run_type}/output/${output} ${output} ) endmacro() @@ -23,4 +23,5 @@ foreach(input ${inputs}) test_input(ref ${basename}.o ${basename}.s) endforeach() -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(126.gcc ${Source}) +llvm_test_data_spec_default(126.gcc) diff --git a/External/SPEC/CINT95/129.compress/CMakeLists.txt b/External/SPEC/CINT95/129.compress/CMakeLists.txt index 614535d6..91d51f30 100644 --- a/External/SPEC/CINT95/129.compress/CMakeLists.txt +++ b/External/SPEC/CINT95/129.compress/CMakeLists.txt @@ -4,12 +4,11 @@ list(APPEND CFLAGS -Wno-return-type) macro(test_input run_type input output) llvm_test_run(RUN_TYPE ${run_type} - < ${BENCHMARK_DIR}/data/${run_type}/input/${input} - > ${CMAKE_CURRENT_BINARY_DIR}/${output} + WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + < data/${run_type}/input/${input} > ${output} ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - ${BENCHMARK_DIR}/data/${run_type}/output/${output} - ${CMAKE_CURRENT_BINARY_DIR}/${output} + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} data/${run_type}/output/${output} ${output} ) endmacro() @@ -17,4 +16,5 @@ test_input(test test.in test.out) test_input(train test.in test.out) test_input(ref bigtest.in bigtest.out) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(129.compress ${Source}) +llvm_test_data_spec_default(129.compress) diff --git a/External/SPEC/CINT95/130.li/CMakeLists.txt b/External/SPEC/CINT95/130.li/CMakeLists.txt index 6c5829da..13437d6a 100644 --- a/External/SPEC/CINT95/130.li/CMakeLists.txt +++ b/External/SPEC/CINT95/130.li/CMakeLists.txt @@ -4,13 +4,12 @@ add_definitions(-Disnumber=my_isnumber) macro(test_input run_type) llvm_test_run(RUN_TYPE ${run_type} + WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input ${ARGN} > ${CMAKE_CURRENT_BINARY_DIR}/${run_type}.out - WORKDIR ${BENCHMARK_DIR}/data/${run_type}/input ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - ${BENCHMARK_DIR}/data/${run_type}/output/${run_type}.out - ${CMAKE_CURRENT_BINARY_DIR}/${run_type}.out + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} data/${run_type}/output/${run_type}.out ${run_type}.out ) endmacro() @@ -21,4 +20,5 @@ test_input(ref au.lsp boyer.lsp browse.lsp ctak.lsp dderiv.lsp deriv.lsp destrum1.lsp destrum2.lsp div2.lsp puzzle0.lsp puzzle1.lsp tak0.lsp tak1.lsp tak2.lsp takr.lsp triang.lsp xit.lsp) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(130.li ${Source}) +llvm_test_data_spec_default(130.li) diff --git a/External/SPEC/CINT95/132.ijpeg/CMakeLists.txt b/External/SPEC/CINT95/132.ijpeg/CMakeLists.txt index 4feec7fa..2f2b006c 100644 --- a/External/SPEC/CINT95/132.ijpeg/CMakeLists.txt +++ b/External/SPEC/CINT95/132.ijpeg/CMakeLists.txt @@ -72,6 +72,7 @@ endforeach() macro(test_input run_type input output) llvm_test_run(RUN_TYPE ${run_type} + WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input -image_file ${input} -compression.quality 90 -compression.optimize_coding 0 @@ -82,11 +83,9 @@ macro(test_input run_type input output) -verbose 1 -GO.findoptcomp > ${CMAKE_CURRENT_BINARY_DIR}/${output} - WORKDIR ${BENCHMARK_DIR}/data/${run_type}/input ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - ${BENCHMARK_DIR}/data/${run_type}/output/${output} - ${CMAKE_CURRENT_BINARY_DIR}/${output} + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} data/${run_type}/output/${output} ${output} ) endmacro() @@ -96,4 +95,5 @@ test_input(ref penguin.ppm penguin.out) test_input(ref specmun.ppm specmun.out) test_input(ref vigo.ppm vigo.out) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(132.ijpeg ${Source}) +llvm_test_data_spec_default(132.ijpeg) diff --git a/External/SPEC/CINT95/134.perl/CMakeLists.txt b/External/SPEC/CINT95/134.perl/CMakeLists.txt index 1f9b59e8..96119db5 100644 --- a/External/SPEC/CINT95/134.perl/CMakeLists.txt +++ b/External/SPEC/CINT95/134.perl/CMakeLists.txt @@ -2,14 +2,13 @@ add_definitions(-DHAVE_STRERROR -DHAS_MKDIR -DHAS_RMDIR -DI_TIME) macro(test_input run_type basename) llvm_test_run(RUN_TYPE ${run_type} + WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input ${basename}.pl - < ${BENCHMARK_DIR}/data/${run_type}/input/${basename}.in + < ${basename}.in > ${CMAKE_CURRENT_BINARY_DIR}/${basename}.out - WORKDIR ${BENCHMARK_DIR}/data/${run_type}/input ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - ${BENCHMARK_DIR}/data/${run_type}/output/${basename}.out - ${CMAKE_CURRENT_BINARY_DIR}/${basename}.out + llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} data/${run_type}/output/${basename}.out ${basename}.out ) endmacro() @@ -21,4 +20,5 @@ test_input(train scrabbl) test_input(ref primes) test_input(ref scrabbl) -llvm_test_executable(${PROG} ${Source}) +llvm_test_executable(134.perl ${Source}) +llvm_test_data_spec_default(134.perl) diff --git a/External/SPEC/CINT95/147.vortex/CMakeLists.txt b/External/SPEC/CINT95/147.vortex/CMakeLists.txt index 8293b2b2..65a4c9c4 100644 --- a/External/SPEC/CINT95/147.vortex/CMakeLists.txt +++ b/External/SPEC/CINT95/147.vortex/CMakeLists.txt @@ -11,12 +11,13 @@ endif() macro(test_input run_type) llvm_test_run(RUN_TYPE ${run_type} - ${INPUTNAME} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input + ${INPUTNAME} ) - llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP} - ${BENCHMARK_DIR}/data/${run_type}/output/vortex.out - ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/vortex.out +llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + ${FPCMP} + data/${run_type}/output/vortex.out + data/${run_type}/input/vortex.out ) endmacro() @@ -24,9 +25,5 @@ test_input(test) test_input(train) test_input(ref) -llvm_test_executable(${PROG} ${Source}) - -# The benchmark writes the output where the input files are, so we have to -# copy the data over. -include(CopyDir) -llvm_copy_dir(${PROG} ${CMAKE_CURRENT_BINARY_DIR}/data ${BENCHMARK_DIR}/data) +llvm_test_executable(147.vortex ${Source}) +llvm_test_data_spec(147.vortex MUST_COPY data) diff --git a/External/SPEC/SpecCPU2000.cmake b/External/SPEC/SpecCPU2000.cmake index 9fe4a813..2a903f70 100644 --- a/External/SPEC/SpecCPU2000.cmake +++ b/External/SPEC/SpecCPU2000.cmake @@ -25,4 +25,12 @@ if(TEST_SUITE_SPEC2000_ROOT) # Work around built in -Werror=implicit-function-declaration default on iOS list(APPEND CPPFLAGS -Wno-implicit-function-declaration) endif() + + function(llvm_test_data_spec target) + llvm_test_data(${target} SOURCE_DIR ${BENCHMARK_DIR} ${ARGN}) + endfunction() + + function(llvm_test_data_spec_default target) + llvm_test_data_spec(${target} data) + endfunction() endif() diff --git a/External/SPEC/SpecCPU2006.cmake b/External/SPEC/SpecCPU2006.cmake index 083b0663..04a3667e 100644 --- a/External/SPEC/SpecCPU2006.cmake +++ b/External/SPEC/SpecCPU2006.cmake @@ -51,8 +51,15 @@ if(TEST_SUITE_SPEC2006_ROOT) macro(cpu2006_subdir BENCHMARK) set(BENCHMARK_DIR ${TEST_SUITE_SPEC2006_ROOT}/benchspec/CPU2006/${BENCHMARK}) - set(PROG ${BENCHMARK}) file(GLOB Source ${BENCHMARK_DIR}/src/*.c ${BENCHMARK_DIR}/src/*.cpp ${BENCHMARK_DIR}/src/*.cc) add_subdirectory(${BENCHMARK}) endmacro() + + function(llvm_test_data_spec target) + llvm_test_data(${target} SOURCE_DIR ${BENCHMARK_DIR} ${ARGN}) + endfunction() + + function(llvm_test_data_spec_default target) + llvm_test_data_spec(${target} data) + endfunction() endif() diff --git a/External/SPEC/SpecCPU95.cmake b/External/SPEC/SpecCPU95.cmake index e9f872ef..36adeed6 100644 --- a/External/SPEC/SpecCPU95.cmake +++ b/External/SPEC/SpecCPU95.cmake @@ -18,8 +18,15 @@ if(TEST_SUITE_SPEC95_ROOT) macro(cint95_subdir BENCHMARK) set(BENCHMARK_DIR ${TEST_SUITE_SPEC95_ROOT}/benchspec/CINT95/${BENCHMARK}) - set(PROG ${BENCHMARK}) file(GLOB Source ${BENCHMARK_DIR}/src/*.c ${BENCHMARK_DIR}/src/*.cpp) add_subdirectory(${BENCHMARK}) endmacro() + + function(llvm_test_data_spec target) + llvm_test_data(${target} SOURCE_DIR ${BENCHMARK_DIR} ${ARGN}) + endfunction() + + function(llvm_test_data_spec_default target) + llvm_test_data_spec(${target} data) + endfunction() endif() diff --git a/External/skidmarks10/CMakeLists.txt b/External/skidmarks10/CMakeLists.txt index 50294c27..f91437a7 100644 --- a/External/skidmarks10/CMakeLists.txt +++ b/External/skidmarks10/CMakeLists.txt @@ -7,8 +7,10 @@ if(TEST_SUITE_SKIDMARKS10_ROOT) list(APPEND CFLAGS -msse3) endif() - llvm_test_run(0 ${TEST_SUITE_SKIDMARKS10_ROOT}/golden - WORKDIR ${CMAKE_CURRENT_BINARY_DIR}) + llvm_test_run(WORKDIR ${CMAKE_CURRENT_BINARY_DIR} + 0 golden + ) file(GLOB SOURCES ${TEST_SUITE_SKIDMARKS10_ROOT}/source/*.c) llvm_test_executable(skidmarks ${SOURCES}) + llvm_test_data(skidmarks SOURCE_DIR ${TEST_SUITE_SKIDMARKS10_ROOT} golden) endif() diff --git a/MultiSource/Applications/ALAC/decode/CMakeLists.txt b/MultiSource/Applications/ALAC/decode/CMakeLists.txt index fcc86e9a..f0a0ef56 100644 --- a/MultiSource/Applications/ALAC/decode/CMakeLists.txt +++ b/MultiSource/Applications/ALAC/decode/CMakeLists.txt @@ -6,7 +6,7 @@ else() list(APPEND CXXFLAGS -DTARGET_RT_BIG_ENDIAN=1) endif() list(APPEND LDFLAGS -lstdc++) -set(RUN_OPTIONS - - < ${CMAKE_CURRENT_SOURCE_DIR}/tune.caf) +set(RUN_OPTIONS - - < tune.caf) llvm_multisource(alacconvert-decode EndianPortable.c ALACBitUtilities.c @@ -21,3 +21,4 @@ llvm_multisource(alacconvert-decode main.cpp CAFFileALAC.cpp ) +llvm_test_data(alacconvert-decode tune.caf) diff --git a/MultiSource/Applications/ALAC/encode/CMakeLists.txt b/MultiSource/Applications/ALAC/encode/CMakeLists.txt index 7c765fad..37da56b2 100644 --- a/MultiSource/Applications/ALAC/encode/CMakeLists.txt +++ b/MultiSource/Applications/ALAC/encode/CMakeLists.txt @@ -6,7 +6,7 @@ else() list(APPEND CXXFLAGS -DTARGET_RT_BIG_ENDIAN=1) endif() list(APPEND LDFLAGS -lstdc++) -set(RUN_OPTIONS - - < ${CMAKE_CURRENT_SOURCE_DIR}/tune.wav) +set(RUN_OPTIONS - - < tune.wav) llvm_multisource(alacconvert-encode EndianPortable.c ALACBitUtilities.c @@ -21,3 +21,4 @@ llvm_multisource(alacconvert-encode main.cpp CAFFileALAC.cpp ) +llvm_test_data(alacconvert-encode tune.wav) diff --git a/MultiSource/Applications/Burg/CMakeLists.txt b/MultiSource/Applications/Burg/CMakeLists.txt index bdb4a0b9..4647cdea 100644 --- a/MultiSource/Applications/Burg/CMakeLists.txt +++ b/MultiSource/Applications/Burg/CMakeLists.txt @@ -1,7 +1,8 @@ list(APPEND CPPFLAGS -DDEBUG) list(APPEND CFLAGS -std=gnu89) list(APPEND LDFLAGS -lstdc++) -set(RUN_OPTIONS < ${CMAKE_CURRENT_SOURCE_DIR}/sample.gr) +set(RUN_OPTIONS < sample.gr) include_directories(${CMAKE_CURRENT_BINARY_DIR}) llvm_multisource(burg) +llvm_test_data(burg sample.gr) diff --git a/MultiSource/Applications/ClamAV/CMakeLists.txt b/MultiSource/Applications/ClamAV/CMakeLists.txt index 0370761d..7fb3bd59 100644 --- a/MultiSource/Applications/ClamAV/CMakeLists.txt +++ b/MultiSource/Applications/ClamAV/CMakeLists.txt @@ -1,24 +1,24 @@ list(APPEND CPPFLAGS -DHAVE_CONFIG_H -I${CMAKE_CURRENT_SOURCE_DIR} -I${CMAKE_CURRENT_SOURCE_DIR}/zlib -DDONT_LOCK_DBDIRS) set(INPUT - ${CMAKE_CURRENT_SOURCE_DIR}/inputs/clam.cab - ${CMAKE_CURRENT_SOURCE_DIR}/inputs/clamdoc.tar.gz - ${CMAKE_CURRENT_SOURCE_DIR}/inputs/clam.exe - ${CMAKE_CURRENT_SOURCE_DIR}/inputs/clam.exe.bz2 - ${CMAKE_CURRENT_SOURCE_DIR}/inputs/clam-v2.rar - ${CMAKE_CURRENT_SOURCE_DIR}/inputs/clam-v3.rar - ${CMAKE_CURRENT_SOURCE_DIR}/inputs/clam.zip - ${CMAKE_CURRENT_SOURCE_DIR}/inputs/README - ${CMAKE_CURRENT_SOURCE_DIR}/inputs/rtf-test/Doc11.rtf - ${CMAKE_CURRENT_SOURCE_DIR}/inputs/rtf-test/Doc1.rtf - ${CMAKE_CURRENT_SOURCE_DIR}/inputs/rtf-test/Doc22.rtf - ${CMAKE_CURRENT_SOURCE_DIR}/inputs/rtf-test/Doc2.rtf - ${CMAKE_CURRENT_SOURCE_DIR}/inputs/rtf-test/doc3.rtf - ${CMAKE_CURRENT_SOURCE_DIR}/inputs/rtf-test/docCLAMexe.rtf - ${CMAKE_CURRENT_SOURCE_DIR}/inputs/rtf-test/rtf1.rtf - ${CMAKE_CURRENT_SOURCE_DIR}/inputs/rtf-test/rtf-novirus.rtf + inputs/clam.cab + inputs/clamdoc.tar.gz + inputs/clam.exe + inputs/clam.exe.bz2 + inputs/clam-v2.rar + inputs/clam-v3.rar + inputs/clam.zip + inputs/README + inputs/rtf-test/Doc11.rtf + inputs/rtf-test/Doc1.rtf + inputs/rtf-test/Doc22.rtf + inputs/rtf-test/Doc2.rtf + inputs/rtf-test/doc3.rtf + inputs/rtf-test/docCLAMexe.rtf + inputs/rtf-test/rtf1.rtf + inputs/rtf-test/rtf-novirus.rtf ) -set(RUN_OPTIONS --debug --exclude-dir .svn --verbose -d${CMAKE_CURRENT_SOURCE_DIR}/dbdir -r ${INPUT}) +set(RUN_OPTIONS --debug --exclude-dir .svn --verbose -d${CMAKE_CURRENT_BINARY_DIR}/dbdir -r ${INPUT}) if(TARGET_OS STREQUAL "Darwin") list(APPEND CPPFLAGS -DC_DARWIN) endif() @@ -170,3 +170,4 @@ llvm_multisource(clamscan zlib_uncompr.c zlib_zutil.c ) +llvm_test_data(clamscan ${INPUT} dbdir) diff --git a/MultiSource/Applications/JM/ldecod/CMakeLists.txt b/MultiSource/Applications/JM/ldecod/CMakeLists.txt index 26babac3..c23489c0 100644 --- a/MultiSource/Applications/JM/ldecod/CMakeLists.txt +++ b/MultiSource/Applications/JM/ldecod/CMakeLists.txt @@ -1,5 +1,5 @@ list(APPEND CPPFLAGS -D__USE_LARGEFILE64 -D_FILE_OFFSET_BITS=64) list(APPEND LDFLAGS -lm) -set(RUN_OPTIONS -i ${CMAKE_CURRENT_SOURCE_DIR}/data/test.264 -o Output/test_dec.yuv -r ${CMAKE_CURRENT_SOURCE_DIR}/data/test_rec.yuv) -set(WORKDIR ${CMAKE_CURRENT_BINARY_DIR}) +set(RUN_OPTIONS -i data/test.264 -o Output/test_dec.yuv -r data/test_rec.yuv) llvm_multisource(ldecod) +llvm_test_data(ldecod data/test.264 data/test_rec.yuv) diff --git a/MultiSource/Applications/JM/lencod/CMakeLists.txt b/MultiSource/Applications/JM/lencod/CMakeLists.txt index eec2b091..30eafd17 100644 --- a/MultiSource/Applications/JM/lencod/CMakeLists.txt +++ b/MultiSource/Applications/JM/lencod/CMakeLists.txt @@ -2,9 +2,14 @@ list(APPEND CPPFLAGS -D__USE_LARGEFILE64 -D_FILE_OFFSET_BITS=64) list(APPEND LDFLAGS -lm) set(FP_TOLERANCE 0.025) if(SMALL_PROBLEM_SIZE) - set(RUN_OPTIONS -d ${CMAKE_CURRENT_SOURCE_DIR}/data/encoder_small.cfg -p InputFile=${CMAKE_CURRENT_SOURCE_DIR}/data/foreman_part_qcif_444.yuv -p LeakyBucketRateFile=${CMAKE_CURRENT_SOURCE_DIR}/data/leakybucketrate.cfg -p QmatrixFile=${CMAKE_CURRENT_SOURCE_DIR}/data/q_matrix.cfg) + set(RUN_OPTIONS -d data/encoder_small.cfg -p InputFile=data/foreman_part_qcif_444.yuv -p LeakyBucketRateFile=data/leakybucketrate.cfg -p QmatrixFile=data/q_matrix.cfg) else() - set(RUN_OPTIONS -d ${CMAKE_CURRENT_SOURCE_DIR}/data/encoder.cfg -p InputFile=${CMAKE_CURRENT_SOURCE_DIR}/data/foreman_part_qcif_444.yuv -p LeakyBucketRateFile=${CMAKE_CURRENT_SOURCE_DIR}/data/leakybucketrate.cfg -p QmatrixFile=${CMAKE_CURRENT_SOURCE_DIR}/data/q_matrix.cfg) + set(RUN_OPTIONS -d data/encoder.cfg -p InputFile=data/foreman_part_qcif_444.yuv -p LeakyBucketRateFile=data/leakybucketrate.cfg -p QmatrixFile=data/q_matrix.cfg) endif() -set(WORKDIR ${CMAKE_CURRENT_BINARY_DIR}) llvm_multisource(lencod) +if(SMALL_PROBLEM_SIZE) + llvm_test_data(lencod data/encoder_small.cfg) +else() + llvm_test_data(lencod data/encoder.cfg) +endif() +llvm_test_data(lencod data/foreman_part_qcif_444.yuv data/leakybucketrate.cfg data/q_matrix.cfg) diff --git a/MultiSource/Applications/SIBsim4/CMakeLists.txt b/MultiSource/Applications/SIBsim4/CMakeLists.txt index 96c82d75..49bfe62d 100644 --- a/MultiSource/Applications/SIBsim4/CMakeLists.txt +++ b/MultiSource/Applications/SIBsim4/CMakeLists.txt @@ -1,6 +1,8 @@ if(SMALL_PROBLEM_SIZE) - set(RUN_OPTIONS -A4 ${CMAKE_CURRENT_SOURCE_DIR}/x-small.fa ${CMAKE_CURRENT_SOURCE_DIR}/y-small.fa) + set(INPUTS x-small.fa y-small.fa) else() - set(RUN_OPTIONS -A4 ${CMAKE_CURRENT_SOURCE_DIR}/x.fa ${CMAKE_CURRENT_SOURCE_DIR}/y.fa) + set(INPUTS x.fa y.fa) endif() +set(RUN_OPTIONS -A4 ${INPUTS}) llvm_multisource(SIBsim4) +llvm_test_data(SIBsim4 ${INPUTS}) diff --git a/MultiSource/Applications/SPASS/CMakeLists.txt b/MultiSource/Applications/SPASS/CMakeLists.txt index 7b1b112c..b9d53aaa 100644 --- a/MultiSource/Applications/SPASS/CMakeLists.txt +++ b/MultiSource/Applications/SPASS/CMakeLists.txt @@ -2,9 +2,11 @@ list(APPEND CPPFLAGS -DCLOCK_NO_TIMING) list(APPEND CFLAGS -fno-strict-aliasing) list(APPEND LDFLAGS -lm) if(SMALL_PROBLEM_SIZE) - set(RUN_OPTIONS "${CMAKE_CURRENT_SOURCE_DIR}/small_problem.dfg") + set(INPUTS small_problem.dfg) else() - set(RUN_OPTIONS "${CMAKE_CURRENT_SOURCE_DIR}/problem.dfg") + set(INPUTS problem.dfg) endif() +set(RUN_OPTIONS ${INPUTS}) set(HASH_PROGRAM_OUTPUT 1) llvm_multisource(SPASS) +llvm_test_data(SPASS ${INPUTS}) diff --git a/MultiSource/Applications/d/CMakeLists.txt b/MultiSource/Applications/d/CMakeLists.txt index 1f113eb8..0198e233 100644 --- a/MultiSource/Applications/d/CMakeLists.txt +++ b/MultiSource/Applications/d/CMakeLists.txt @@ -1,5 +1,5 @@ list(APPEND CPPFLAGS -DD_BUILD_VERSION=5725) -set(RUN_OPTIONS -v ${CMAKE_CURRENT_SOURCE_DIR}/grammar.g) +set(RUN_OPTIONS -v grammar.g) set(HASH_PROGRAM_OUTPUT 1) llvm_multisource(make_dparser make_dparser.c @@ -15,3 +15,4 @@ llvm_multisource(make_dparser version.c grammar.g.c ) +llvm_test_data(make_dparser grammar.g) diff --git a/MultiSource/Applications/hbd/CMakeLists.txt b/MultiSource/Applications/hbd/CMakeLists.txt index a99b93e2..b4e4ed73 100644 --- a/MultiSource/Applications/hbd/CMakeLists.txt +++ b/MultiSource/Applications/hbd/CMakeLists.txt @@ -1,4 +1,5 @@ list(APPEND CPPFLAGS -DHAVE_CONFIG_H) list(APPEND LDFLAGS -lstdc++) -set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/Sort.class) +set(RUN_OPTIONS Sort.class) llvm_multisource(hbd) +llvm_test_data(hbd Sort.class) diff --git a/MultiSource/Applications/hexxagon/CMakeLists.txt b/MultiSource/Applications/hexxagon/CMakeLists.txt index 022a2333..85e2c704 100644 --- a/MultiSource/Applications/hexxagon/CMakeLists.txt +++ b/MultiSource/Applications/hexxagon/CMakeLists.txt @@ -1,4 +1,5 @@ list(APPEND LDFLAGS -lstdc++) -set(RUN_OPTIONS < ${CMAKE_CURRENT_SOURCE_DIR}/input) +set(RUN_OPTIONS < input) llvm_multisource(hexxagon) target_include_directories(hexxagon PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) +llvm_test_data(hexxagon input) diff --git a/MultiSource/Applications/kimwitu++/CMakeLists.txt b/MultiSource/Applications/kimwitu++/CMakeLists.txt index a0f771aa..04c95c7f 100644 --- a/MultiSource/Applications/kimwitu++/CMakeLists.txt +++ b/MultiSource/Applications/kimwitu++/CMakeLists.txt @@ -1,6 +1,6 @@ list(APPEND CPPFLAGS -I${CMAKE_CURRENT_SOURCE_DIR} -DYYDEBUG=1) list(APPEND LDFLAGS -lstdc++) -set(RUN_OPTIONS -f test -o -v -s kcc ${CMAKE_CURRENT_SOURCE_DIR}/inputs/f3.k ${CMAKE_CURRENT_SOURCE_DIR}/inputs/f2.k ${CMAKE_CURRENT_SOURCE_DIR}/inputs/f1.k) -set(WORKDIR ${CMAKE_CURRENT_BINARY_DIR}) +set(RUN_OPTIONS -f test -o -v -s kcc inputs/f3.k inputs/f2.k inputs/f1.k) set(HASH_PROGRAM_OUTPUT 1) llvm_multisource(kc) +llvm_test_data(kc inputs/f3.k inputs/f2.k inputs/f1.k) diff --git a/MultiSource/Applications/lambda-0.1.3/CMakeLists.txt b/MultiSource/Applications/lambda-0.1.3/CMakeLists.txt index e8a5a020..e0717690 100644 --- a/MultiSource/Applications/lambda-0.1.3/CMakeLists.txt +++ b/MultiSource/Applications/lambda-0.1.3/CMakeLists.txt @@ -1,5 +1,5 @@ list(APPEND LDFLAGS -lstdc++) -set(RUN_OPTIONS < ${CMAKE_CURRENT_SOURCE_DIR}/input) -set(WORKDIR ${CMAKE_CURRENT_BINARY_DIR}) +set(RUN_OPTIONS < input) llvm_multisource(lambda) target_include_directories(lambda PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) +llvm_test_data(lambda input) diff --git a/MultiSource/Applications/lemon/CMakeLists.txt b/MultiSource/Applications/lemon/CMakeLists.txt index b459ed63..562f9e76 100644 --- a/MultiSource/Applications/lemon/CMakeLists.txt +++ b/MultiSource/Applications/lemon/CMakeLists.txt @@ -1,5 +1,7 @@ if(NOT TEST_SUITE_BENCHMARKING_ONLY) - set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/parse.y ${CMAKE_CURRENT_SOURCE_DIR}/example1.y ${CMAKE_CURRENT_SOURCE_DIR}/example2.y ${CMAKE_CURRENT_SOURCE_DIR}/example3.y ${CMAKE_CURRENT_SOURCE_DIR}/example4.y ${CMAKE_CURRENT_SOURCE_DIR}/example5.y ${CMAKE_CURRENT_SOURCE_DIR}/lighttpd_configparser.y ${CMAKE_CURRENT_SOURCE_DIR}/lighttpd_mod_ssi_exprparser.y ${CMAKE_CURRENT_SOURCE_DIR}/wireshark_dtd_grammar.lemon ${CMAKE_CURRENT_SOURCE_DIR}/wireshark_grammar.lemon ${CMAKE_CURRENT_SOURCE_DIR}/wireshark_mate_grammar.lemon ${CMAKE_CURRENT_SOURCE_DIR}/xapian_queryparser.lemony ${CMAKE_CURRENT_SOURCE_DIR}/ecmascript.y) + set(INPUTS parse.y example1.y example2.y example3.y example4.y example5.y lighttpd_configparser.y lighttpd_mod_ssi_exprparser.y wireshark_dtd_grammar.lemon wireshark_grammar.lemon wireshark_mate_grammar.lemon xapian_queryparser.lemony ecmascript.y) + set(RUN_OPTIONS ${INPUTS}) set(HASH_PROGRAM_OUTPUT 1) llvm_multisource(lemon lemon.c) + llvm_test_data(lemon ${INPUTS} lempar.c) endif() diff --git a/MultiSource/Applications/lua/CMakeLists.txt b/MultiSource/Applications/lua/CMakeLists.txt index 2955d99f..cbfa7385 100644 --- a/MultiSource/Applications/lua/CMakeLists.txt +++ b/MultiSource/Applications/lua/CMakeLists.txt @@ -3,7 +3,6 @@ if(NOT ARCH STREQUAL "XCore") list(APPEND CPPFLAGS -DLUA_USE_POSIX) endif() set(RUN_OPTIONS alltests.lua "") -set(WORKDIR ${CMAKE_CURRENT_BINARY_DIR}) set(HASH_PROGRAM_OUTPUT 1) add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/generate_inputs.sh diff --git a/MultiSource/Applications/minisat/CMakeLists.txt b/MultiSource/Applications/minisat/CMakeLists.txt index b35d7d42..40762485 100644 --- a/MultiSource/Applications/minisat/CMakeLists.txt +++ b/MultiSource/Applications/minisat/CMakeLists.txt @@ -1,12 +1,14 @@ list(APPEND LDFLAGS -lstdc++ -lm) if(SMALL_PROBLEM_SIZE) - set(RUN_OPTIONS -verbosity=0 ${CMAKE_CURRENT_SOURCE_DIR}/small.cnf) + set(INPUT small.cnf) else() if(LARGE_PROBLEM_SIZE) - set(RUN_OPTIONS -verbosity=0 ${CMAKE_CURRENT_SOURCE_DIR}/long.cnf) + set(INPUT long.cnf) else() - set(RUN_OPTIONS -verbosity=0 ${CMAKE_CURRENT_SOURCE_DIR}/short.cnf) + set(INPUT short.cnf) endif() endif() +set(RUN_OPTIONS -verbosity=0 ${INPUT}) set(FP_TOLERANCE 0.1) llvm_multisource(minisat) +llvm_test_data(minisat ${INPUT}) diff --git a/MultiSource/Applications/obsequi/CMakeLists.txt b/MultiSource/Applications/obsequi/CMakeLists.txt index 4454abf5..9fd8134b 100644 --- a/MultiSource/Applications/obsequi/CMakeLists.txt +++ b/MultiSource/Applications/obsequi/CMakeLists.txt @@ -8,5 +8,6 @@ endif() if(NOT "${ARCH}" STREQUAL "PowerPC") list(APPEND LDFLAGS -lsupc++) endif() -set(RUN_OPTIONS < ${CMAKE_CURRENT_SOURCE_DIR}/input) +set(RUN_OPTIONS < input) llvm_multisource(Obsequi) +llvm_test_data(Obsequi input) diff --git a/MultiSource/Applications/oggenc/CMakeLists.txt b/MultiSource/Applications/oggenc/CMakeLists.txt index 0ad4db57..e40bd55e 100644 --- a/MultiSource/Applications/oggenc/CMakeLists.txt +++ b/MultiSource/Applications/oggenc/CMakeLists.txt @@ -1,4 +1,5 @@ list(APPEND CFLAGS -fno-strict-aliasing) list(APPEND LDFLAGS -lm) -set(RUN_OPTIONS -Q -s 901820 - < ${CMAKE_CURRENT_SOURCE_DIR}/tune) +set(RUN_OPTIONS -Q -s 901820 - < tune) llvm_multisource(oggenc) +llvm_test_data(oggenc tune) diff --git a/MultiSource/Applications/siod/CMakeLists.txt b/MultiSource/Applications/siod/CMakeLists.txt index 40f509d5..a562f50d 100644 --- a/MultiSource/Applications/siod/CMakeLists.txt +++ b/MultiSource/Applications/siod/CMakeLists.txt @@ -1,4 +1,5 @@ list(APPEND CPPFLAGS -D__USE_MISC -D__USE_GNU -D__USE_SVID -D__USE_XOPEN_EXTENDED -D__USE_XOPEN -Dunix) list(APPEND LDFLAGS -lm) -set(RUN_OPTIONS -v1 ${CMAKE_CURRENT_SOURCE_DIR}/test.scm) +set(RUN_OPTIONS -v1 test.scm) llvm_multisource(siod) +llvm_test_data(siod test.scm) diff --git a/MultiSource/Applications/spiff/CMakeLists.txt b/MultiSource/Applications/spiff/CMakeLists.txt index fb1683d5..0a7ef5b6 100644 --- a/MultiSource/Applications/spiff/CMakeLists.txt +++ b/MultiSource/Applications/spiff/CMakeLists.txt @@ -1,2 +1,3 @@ -set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/Sample.3 ${CMAKE_CURRENT_SOURCE_DIR}/Sample.4) +set(RUN_OPTIONS Sample.3 Sample.4) llvm_multisource(spiff) +llvm_test_data(spiff Sample.3 Sample.4) diff --git a/MultiSource/Applications/sqlite3/CMakeLists.txt b/MultiSource/Applications/sqlite3/CMakeLists.txt index 618cafa9..3eeb4141 100644 --- a/MultiSource/Applications/sqlite3/CMakeLists.txt +++ b/MultiSource/Applications/sqlite3/CMakeLists.txt @@ -1,6 +1,5 @@ list(APPEND CPPFLAGS -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -I.) -set(RUN_OPTIONS -init ${CMAKE_CURRENT_SOURCE_DIR}/sqlite3rc :memory: < ${CMAKE_CURRENT_SOURCE_DIR}/commands) -set(WORKDIR ${CMAKE_CURRENT_BINARY_DIR}) +set(RUN_OPTIONS -init sqlite3rc :memory: < commands) set(FP_TOLERANCE 1.0e-9) set(GeneratedTestInputs ${CMAKE_CURRENT_BINARY_DIR}/test15.sql) @@ -19,3 +18,4 @@ llvm_multisource(sqlite3 shell.c ) add_dependencies(sqlite3 sqlite_input) +llvm_test_data(sqlite3 sqlite3rc commands) diff --git a/MultiSource/Applications/treecc/CMakeLists.txt b/MultiSource/Applications/treecc/CMakeLists.txt index 7d8ec679..aac5c489 100644 --- a/MultiSource/Applications/treecc/CMakeLists.txt +++ b/MultiSource/Applications/treecc/CMakeLists.txt @@ -1,2 +1,3 @@ -set(RUN_OPTIONS -n ${CMAKE_CURRENT_SOURCE_DIR}/examples/expr_cpp.tc) +set(RUN_OPTIONS -n examples/expr_cpp.tc) llvm_multisource(treecc) +llvm_test_data(treecc examples/expr_cpp.tc) diff --git a/MultiSource/Applications/viterbi/CMakeLists.txt b/MultiSource/Applications/viterbi/CMakeLists.txt index 11169c35..7c5adf35 100644 --- a/MultiSource/Applications/viterbi/CMakeLists.txt +++ b/MultiSource/Applications/viterbi/CMakeLists.txt @@ -1,2 +1,3 @@ -list(APPEND CPPFLAGS -I${CMAKE_CURRENT_SOURCE_DIR} -DPROJ_SRC_DIR="${CMAKE_CURRENT_SOURCE_DIR}") +list(APPEND CPPFLAGS -I${CMAKE_CURRENT_SOURCE_DIR} -DPROJ_SRC_DIR=".") llvm_multisource(viterbi) +llvm_test_data(viterbi Dist_demux) diff --git a/MultiSource/Benchmarks/ASC_Sequoia/IRSmk/CMakeLists.txt b/MultiSource/Benchmarks/ASC_Sequoia/IRSmk/CMakeLists.txt index 6d5b5df7..89c8d8cd 100644 --- a/MultiSource/Benchmarks/ASC_Sequoia/IRSmk/CMakeLists.txt +++ b/MultiSource/Benchmarks/ASC_Sequoia/IRSmk/CMakeLists.txt @@ -1,3 +1,4 @@ list(APPEND LDFLAGS -lm) -set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/irsmk_input) +set(RUN_OPTIONS irsmk_input) llvm_multisource(IRSmk) +llvm_test_data(IRSmk irsmk_input) diff --git a/MultiSource/Benchmarks/BitBench/drop3/CMakeLists.txt b/MultiSource/Benchmarks/BitBench/drop3/CMakeLists.txt index caef2651..48396566 100644 --- a/MultiSource/Benchmarks/BitBench/drop3/CMakeLists.txt +++ b/MultiSource/Benchmarks/BitBench/drop3/CMakeLists.txt @@ -1,2 +1,3 @@ -set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/input-file) +set(RUN_OPTIONS input-file) llvm_multisource(drop3) +llvm_test_data(drop3 input-file) diff --git a/MultiSource/Benchmarks/BitBench/five11/CMakeLists.txt b/MultiSource/Benchmarks/BitBench/five11/CMakeLists.txt index 610e8468..06266984 100644 --- a/MultiSource/Benchmarks/BitBench/five11/CMakeLists.txt +++ b/MultiSource/Benchmarks/BitBench/five11/CMakeLists.txt @@ -1,2 +1,3 @@ -set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/input-file) +set(RUN_OPTIONS input-file) llvm_multisource(five11) +llvm_test_data(five11 input-file) diff --git a/MultiSource/Benchmarks/BitBench/uudecode/CMakeLists.txt b/MultiSource/Benchmarks/BitBench/uudecode/CMakeLists.txt index 45f176bc..83740191 100644 --- a/MultiSource/Benchmarks/BitBench/uudecode/CMakeLists.txt +++ b/MultiSource/Benchmarks/BitBench/uudecode/CMakeLists.txt @@ -1,2 +1,3 @@ -set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/input-file) +set(RUN_OPTIONS input-file) llvm_multisource(uudecode) +llvm_test_data(uudecode input-file) diff --git a/MultiSource/Benchmarks/BitBench/uuencode/CMakeLists.txt b/MultiSource/Benchmarks/BitBench/uuencode/CMakeLists.txt index 32d40401..6ec35568 100644 --- a/MultiSource/Benchmarks/BitBench/uuencode/CMakeLists.txt +++ b/MultiSource/Benchmarks/BitBench/uuencode/CMakeLists.txt @@ -1,2 +1,3 @@ -set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/input.txt) +set(RUN_OPTIONS input.txt) llvm_multisource(uuencode) +llvm_test_data(uuencode input.txt) diff --git a/MultiSource/Benchmarks/DOE-ProxyApps-C++/PENNANT/CMakeLists.txt b/MultiSource/Benchmarks/DOE-ProxyApps-C++/PENNANT/CMakeLists.txt index 20936b70..8c9e0cb6 100644 --- a/MultiSource/Benchmarks/DOE-ProxyApps-C++/PENNANT/CMakeLists.txt +++ b/MultiSource/Benchmarks/DOE-ProxyApps-C++/PENNANT/CMakeLists.txt @@ -1,2 +1,3 @@ -set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/intermediate_leblanc.pnt) +set(RUN_OPTIONS intermediate_leblanc.pnt) llvm_multisource(PENNANT) +llvm_test_data(PENNANT intermediate_leblanc.pnt) diff --git a/MultiSource/Benchmarks/DOE-ProxyApps-C/Pathfinder/CMakeLists.txt b/MultiSource/Benchmarks/DOE-ProxyApps-C/Pathfinder/CMakeLists.txt index 8f7ca4e4..3ac107e2 100644 --- a/MultiSource/Benchmarks/DOE-ProxyApps-C/Pathfinder/CMakeLists.txt +++ b/MultiSource/Benchmarks/DOE-ProxyApps-C/Pathfinder/CMakeLists.txt @@ -1,3 +1,4 @@ list(APPEND LDFLAGS -lm) -set(RUN_OPTIONS -x ${CMAKE_CURRENT_SOURCE_DIR}/medsmall1.adj_list) +set(RUN_OPTIONS -x medsmall1.adj_list) llvm_multisource(PathFinder) +llvm_test_data(PathFinder medsmall1.adj_list) diff --git a/MultiSource/Benchmarks/DOE-ProxyApps-C/SimpleMOC/CMakeLists.txt b/MultiSource/Benchmarks/DOE-ProxyApps-C/SimpleMOC/CMakeLists.txt index 8d5774ed..f55ac4aa 100644 --- a/MultiSource/Benchmarks/DOE-ProxyApps-C/SimpleMOC/CMakeLists.txt +++ b/MultiSource/Benchmarks/DOE-ProxyApps-C/SimpleMOC/CMakeLists.txt @@ -1,4 +1,5 @@ list(APPEND LDFLAGS -lm) list(APPEND CFLAGS -std=gnu99) -set(RUN_OPTIONS -i ${CMAKE_CURRENT_SOURCE_DIR}/default.in) +set(RUN_OPTIONS -i default.in) llvm_multisource(SimpleMOC) +llvm_test_data(SimpleMOC default.in) diff --git a/MultiSource/Benchmarks/Fhourstones-3.1/CMakeLists.txt b/MultiSource/Benchmarks/Fhourstones-3.1/CMakeLists.txt index 7623d949..f45a3645 100644 --- a/MultiSource/Benchmarks/Fhourstones-3.1/CMakeLists.txt +++ b/MultiSource/Benchmarks/Fhourstones-3.1/CMakeLists.txt @@ -1,6 +1,8 @@ if(LARGE_PROBLEM_SIZE) - set(RUN_OPTIONS < ${CMAKE_CURRENT_SOURCE_DIR}/inputs_large) + set(INPUTS inputs_large) else() - set(RUN_OPTIONS < ${CMAKE_CURRENT_SOURCE_DIR}/inputs) + set(INPUTS inputs) endif() +set(RUN_OPTIONS < ${INPUTS}) llvm_multisource(fhourstones3.1) +llvm_test_data(fhourstones3.1 ${INPUTS}) diff --git a/MultiSource/Benchmarks/Fhourstones/CMakeLists.txt b/MultiSource/Benchmarks/Fhourstones/CMakeLists.txt index 0f363637..f1286f90 100644 --- a/MultiSource/Benchmarks/Fhourstones/CMakeLists.txt +++ b/MultiSource/Benchmarks/Fhourstones/CMakeLists.txt @@ -1,3 +1,4 @@ list(APPEND CPPFLAGS -DUNIX -DTRANSIZE=1050011 -DPROBES=8 -DREPORTPLY=8) -set(RUN_OPTIONS < ${CMAKE_CURRENT_SOURCE_DIR}/input) +set(RUN_OPTIONS < input) llvm_multisource(fhourstones) +llvm_test_data(fhourstones input) diff --git a/MultiSource/Benchmarks/FreeBench/analyzer/CMakeLists.txt b/MultiSource/Benchmarks/FreeBench/analyzer/CMakeLists.txt index f027ad3a..ca28aa05 100644 --- a/MultiSource/Benchmarks/FreeBench/analyzer/CMakeLists.txt +++ b/MultiSource/Benchmarks/FreeBench/analyzer/CMakeLists.txt @@ -1,7 +1,9 @@ list(APPEND CPPFLAGS -DVERSION="1.00" -DCOMPDATE="today" -DCFLAGS="" -DHOSTNAME="thishost") if(LARGE_PROBLEM_SIZE) - set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/ref.in) + set(INPUTS ref.in) else() - set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/test.in) + set(INPUTS test.in) endif() +set(RUN_OPTIONS ${INPUTS}) llvm_multisource(analyzer) +llvm_test_data(analyzer ${INPUTS}) diff --git a/MultiSource/Benchmarks/FreeBench/distray/CMakeLists.txt b/MultiSource/Benchmarks/FreeBench/distray/CMakeLists.txt index b0fbb9a4..237ed8ea 100644 --- a/MultiSource/Benchmarks/FreeBench/distray/CMakeLists.txt +++ b/MultiSource/Benchmarks/FreeBench/distray/CMakeLists.txt @@ -1,9 +1,11 @@ list(APPEND CPPFLAGS -DVERSION="1.00" -DCOMPDATE="today" -DCFLAGS="" -DHOSTNAME="thishost") list(APPEND LDFLAGS -lm) if(LARGE_PROBLEM_SIZE) - set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/ref.in) + set(INPUTS ref.in) else() - set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/test.in) + set(INPUTS test.in) endif() +set(RUN_OPTIONS ${INPUTS}) set(HASH_PROGRAM_OUTPUT 1) llvm_multisource(distray) +llvm_test_data(distray ${INPUTS}) diff --git a/MultiSource/Benchmarks/FreeBench/fourinarow/CMakeLists.txt b/MultiSource/Benchmarks/FreeBench/fourinarow/CMakeLists.txt index 35b9c4af..bf1d26b7 100644 --- a/MultiSource/Benchmarks/FreeBench/fourinarow/CMakeLists.txt +++ b/MultiSource/Benchmarks/FreeBench/fourinarow/CMakeLists.txt @@ -1,7 +1,9 @@ list(APPEND CPPFLAGS -DVERSION="1.00" -DCOMPDATE="today" -DCFLAGS="" -DHOSTNAME="thishost") if(LARGE_PROBLEM_SIZE) - set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/ref.in) + set(INPUTS ref.in) else() - set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/test.in) + set(INPUTS test.in) endif() +set(RUN_OPTIONS ${INPUTS}) llvm_multisource(fourinarow) +llvm_test_data(fourinarow ${INPUTS}) diff --git a/MultiSource/Benchmarks/FreeBench/mason/CMakeLists.txt b/MultiSource/Benchmarks/FreeBench/mason/CMakeLists.txt index 3effb0d0..46244d0e 100644 --- a/MultiSource/Benchmarks/FreeBench/mason/CMakeLists.txt +++ b/MultiSource/Benchmarks/FreeBench/mason/CMakeLists.txt @@ -1,7 +1,9 @@ list(APPEND CPPFLAGS -DVERSION="1.00" -DCOMPDATE="today" -DCFLAGS="" -DHOSTNAME="thishost") if(LARGE_PROBLEM_SIZE) - set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/ref.in) + set(INPUTS ref.in) else() - set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/test.in) + set(INPUTS test.in) endif() +set(RUN_OPTIONS ${INPUTS}) llvm_multisource(mason) +llvm_test_data(mason ${INPUTS}) diff --git a/MultiSource/Benchmarks/FreeBench/neural/CMakeLists.txt b/MultiSource/Benchmarks/FreeBench/neural/CMakeLists.txt index cf2024a6..c3a7ec74 100644 --- a/MultiSource/Benchmarks/FreeBench/neural/CMakeLists.txt +++ b/MultiSource/Benchmarks/FreeBench/neural/CMakeLists.txt @@ -1,8 +1,10 @@ list(APPEND CPPFLAGS -DVERSION="1.00" -DCOMPDATE="today" -DCFLAGS="" -DHOSTNAME="thishost") list(APPEND LDFLAGS -lm) if(LARGE_PROBLEM_SIZE) - set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/ref.in) + set(INPUTS ref.in) else() - set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/test.in) + set(INPUTS test.in) endif() +set(RUN_OPTIONS ${INPUTS}) llvm_multisource(neural) +llvm_test_data(neural ${INPUTS}) diff --git a/MultiSource/Benchmarks/FreeBench/pcompress2/CMakeLists.txt b/MultiSource/Benchmarks/FreeBench/pcompress2/CMakeLists.txt index 22d0d357..7c43fdd6 100644 --- a/MultiSource/Benchmarks/FreeBench/pcompress2/CMakeLists.txt +++ b/MultiSource/Benchmarks/FreeBench/pcompress2/CMakeLists.txt @@ -4,13 +4,7 @@ if(LARGE_PROBLEM_SIZE) else() set(INPUT_FILE test.in) endif() -set(RUN_OPTIONS ${CMAKE_CURRENT_BINARY_DIR}/${INPUT_FILE}) -set(GeneratedTestInputs copy-input-file) +set(RUN_OPTIONS ${INPUT_FILE}) -add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${INPUT_FILE} - COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/${INPUT_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${INPUT_FILE} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMENT "Copying pcompress2 test input") -add_custom_target(pcompress2_input SOURCES ${CMAKE_CURRENT_BINARY_DIR}/${INPUT_FILE}) - llvm_multisource(pcompress2) -add_dependencies(pcompress2 pcompress2_input) +llvm_multisource(pcompress2) +llvm_test_data(pcompress2 ${INPUT_FILE}) diff --git a/MultiSource/Benchmarks/FreeBench/pifft/CMakeLists.txt b/MultiSource/Benchmarks/FreeBench/pifft/CMakeLists.txt index 7a57e4de..4de8b885 100644 --- a/MultiSource/Benchmarks/FreeBench/pifft/CMakeLists.txt +++ b/MultiSource/Benchmarks/FreeBench/pifft/CMakeLists.txt @@ -1,8 +1,10 @@ list(APPEND CPPFLAGS -DVERSION="1.00" -DCOMPDATE="today" -DCFLAGS="" -DHOSTNAME="thishost") list(APPEND LDFLAGS -lm) if(LARGE_PROBLEM_SIZE) - set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/ref.in) + set(INPUTS ref.in) else() - set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/test.in) + set(INPUTS test.in) endif() +set(RUN_OPTIONS ${INPUTS}) llvm_multisource(pifft) +llvm_test_data(pifft ${INPUTS}) diff --git a/MultiSource/Benchmarks/MallocBench/espresso/CMakeLists.txt b/MultiSource/Benchmarks/MallocBench/espresso/CMakeLists.txt index c5e28b95..34135435 100644 --- a/MultiSource/Benchmarks/MallocBench/espresso/CMakeLists.txt +++ b/MultiSource/Benchmarks/MallocBench/espresso/CMakeLists.txt @@ -1,4 +1,5 @@ list(APPEND CPPFLAGS -DNOMEMOPT) list(APPEND CFLAGS -std=gnu89) -set(RUN_OPTIONS -t ${CMAKE_CURRENT_SOURCE_DIR}/INPUT/largest.espresso) +set(RUN_OPTIONS -t INPUT/largest.espresso) llvm_multisource(espresso) +llvm_test_data(espresso INPUT/largest.espresso) diff --git a/MultiSource/Benchmarks/MallocBench/gawk/CMakeLists.txt b/MultiSource/Benchmarks/MallocBench/gawk/CMakeLists.txt index 4bd9a141..ae6e4560 100644 --- a/MultiSource/Benchmarks/MallocBench/gawk/CMakeLists.txt +++ b/MultiSource/Benchmarks/MallocBench/gawk/CMakeLists.txt @@ -1,4 +1,4 @@ -set(RUN_OPTIONS -f ${CMAKE_CURRENT_SOURCE_DIR}/INPUT/adj.awk type=l linelen=70 indent=5 ${CMAKE_CURRENT_SOURCE_DIR}/INPUT/words-large.awk) +set(RUN_OPTIONS -f INPUT/adj.awk type=l linelen=70 indent=5 INPUT/words-large.awk) list(APPEND LDFLAGS -lm) list(APPEND CPPFLAGS -DBCOPY_MISSING -DSPRINTF_INT -DDOPRNT_MISSING -DGCVT_MISSING -DSTRCASE_MISSING -DSTRTOD_MISSING -DTMPNAM_MISSING) @@ -16,3 +16,4 @@ llvm_multisource(gawk io.c node.c ) +llvm_test_data(gawk INPUT/adj.awk INPUT/words-large.awk) diff --git a/MultiSource/Benchmarks/MallocBench/gs/CMakeLists.txt b/MultiSource/Benchmarks/MallocBench/gs/CMakeLists.txt index ae54913e..42a6b153 100644 --- a/MultiSource/Benchmarks/MallocBench/gs/CMakeLists.txt +++ b/MultiSource/Benchmarks/MallocBench/gs/CMakeLists.txt @@ -1,8 +1,8 @@ list(APPEND LDFLAGS -lm) -list(APPEND CPPFLAGS -DNOMEMOPT -DGS_LIB_DEFAULT="${CMAKE_CURRENT_SOURCE_DIR}:${CMAKE_CURRENT_SOURCE_DIR}/fonts") +list(APPEND CPPFLAGS -DNOMEMOPT -DGS_LIB_DEFAULT=".:./fonts") list(APPEND CFLAGS -Wno-implicit-function-declaration) list(APPEND CPPFLAGS -DNOPRIVATE) -set(RUN_OPTIONS -DNODISPLAY ${CMAKE_CURRENT_SOURCE_DIR}/INPUT/large.ps) +set(RUN_OPTIONS -DNODISPLAY INPUT/large.ps) llvm_multisource(gs gs.c gsmain.c @@ -69,3 +69,29 @@ llvm_multisource(gs gdevmem.c gdevs.c ) +llvm_test_data(gs + INPUT/large.ps + Fontmap + alphabet.ps + copyleft.ps + fcutils.ps + golfer.ps + prfont.ps + statusd.ps + bdftops.ps + decrypt.ps + gfonts.ps + lines.ps + ps2image.ps + traceop.ps + cheq.ps + empty.ps + ghost.ps + pcharstr.ps + pstoppm.ps + chess.ps + escher.ps + ghost2.ps + ppath.ps + quit.ps +) diff --git a/MultiSource/Benchmarks/MallocBench/make/CMakeLists.txt b/MultiSource/Benchmarks/MallocBench/make/CMakeLists.txt index dcd98e51..f83ff791 100644 --- a/MultiSource/Benchmarks/MallocBench/make/CMakeLists.txt +++ b/MultiSource/Benchmarks/MallocBench/make/CMakeLists.txt @@ -1,5 +1,5 @@ list(APPEND CPPFLAGS -DHAVE_SIGLIST -DNO_LDAV -DNOMEMOPT -DPOSIX) -set(RUN_OPTIONS -n -f ${CMAKE_CURRENT_SOURCE_DIR}/INPUT/GNUmakefile.make USEROPT=BWGC VPATH=${CMAKE_CURRENT_SOURCE_DIR}) +set(RUN_OPTIONS -n -f INPUT/GNUmakefile.make USEROPT=BWGC) llvm_multisource(make commands.c job.c @@ -22,3 +22,4 @@ llvm_multisource(make arscan.c ar.c ) +llvm_test_data(make INPUT/GNUmakefile.make) diff --git a/MultiSource/Benchmarks/MallocBench/p2c/CMakeLists.txt b/MultiSource/Benchmarks/MallocBench/p2c/CMakeLists.txt index 7bb6a84f..d1f2e3b1 100644 --- a/MultiSource/Benchmarks/MallocBench/p2c/CMakeLists.txt +++ b/MultiSource/Benchmarks/MallocBench/p2c/CMakeLists.txt @@ -1,3 +1,4 @@ list(APPEND CPPFLAGS -DNOMEMOPT) -set(RUN_OPTIONS -v < ${CMAKE_CURRENT_SOURCE_DIR}/INPUT/mf.p) +set(RUN_OPTIONS -v < INPUT/mf.p) llvm_multisource(p2c) +llvm_test_data(p2c INPUT/mf.p) diff --git a/MultiSource/Benchmarks/MallocBench/perl/CMakeLists.txt b/MultiSource/Benchmarks/MallocBench/perl/CMakeLists.txt index 1c4593ff..85bd72f0 100644 --- a/MultiSource/Benchmarks/MallocBench/perl/CMakeLists.txt +++ b/MultiSource/Benchmarks/MallocBench/perl/CMakeLists.txt @@ -1,6 +1,6 @@ list(APPEND CPPFLAGS -DHAS_STRERROR -DHAS_MKDIR -DHAS_RMDIR -U_POSIX_SOURCE -D__USE_MISC) list(APPEND LDFLAGS -lm -lcrypt) -set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/INPUT/endsort.perl ${CMAKE_CURRENT_SOURCE_DIR}/INPUT/endsort.perl) +set(RUN_OPTIONS INPUT/endsort.perl INPUT/endsort.perl) llvm_multisource(perl array.c doarg.c @@ -24,3 +24,4 @@ llvm_multisource(perl regcomp.c toke.c ) +llvm_test_data(perl INPUT) diff --git a/MultiSource/Benchmarks/McCat/01-qbsort/CMakeLists.txt b/MultiSource/Benchmarks/McCat/01-qbsort/CMakeLists.txt index cc80c04c..e7b63b7c 100644 --- a/MultiSource/Benchmarks/McCat/01-qbsort/CMakeLists.txt +++ b/MultiSource/Benchmarks/McCat/01-qbsort/CMakeLists.txt @@ -1,4 +1,5 @@ -set(RUN_OPTIONS 1000 < ${CMAKE_CURRENT_SOURCE_DIR}/benchmark.in3) list(APPEND LDFLAGS -lm) +set(RUN_OPTIONS 1000 < benchmark.in3) set(HASH_PROGRAM_OUTPUT 1) llvm_multisource(qbsort) +llvm_test_data(qbsort benchmark.in3) diff --git a/MultiSource/Benchmarks/McCat/03-testtrie/CMakeLists.txt b/MultiSource/Benchmarks/McCat/03-testtrie/CMakeLists.txt index fcdb75ba..2b909147 100644 --- a/MultiSource/Benchmarks/McCat/03-testtrie/CMakeLists.txt +++ b/MultiSource/Benchmarks/McCat/03-testtrie/CMakeLists.txt @@ -1,3 +1,4 @@ list(APPEND LDFLAGS -lm) -list(APPEND RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/testtrie.in2) +set(RUN_OPTIONS testtrie.in2) llvm_multisource(testtrie) +llvm_test_data(testtrie testtrie.in2) diff --git a/MultiSource/Benchmarks/McCat/04-bisect/CMakeLists.txt b/MultiSource/Benchmarks/McCat/04-bisect/CMakeLists.txt index 81d57bfd..e40c27e6 100644 --- a/MultiSource/Benchmarks/McCat/04-bisect/CMakeLists.txt +++ b/MultiSource/Benchmarks/McCat/04-bisect/CMakeLists.txt @@ -1,4 +1,5 @@ list(APPEND LDFLAGS -lm) set(FP_TOLERANCE 0.001) -set(RUN_OPTIONS < ${CMAKE_CURRENT_SOURCE_DIR}/bisect_test.in) +set(RUN_OPTIONS < bisect_test.in) llvm_multisource(bisect) +llvm_test_data(bisect bisect_test.in) diff --git a/MultiSource/Benchmarks/McCat/09-vor/CMakeLists.txt b/MultiSource/Benchmarks/McCat/09-vor/CMakeLists.txt index e619a515..4f656fc5 100644 --- a/MultiSource/Benchmarks/McCat/09-vor/CMakeLists.txt +++ b/MultiSource/Benchmarks/McCat/09-vor/CMakeLists.txt @@ -1,3 +1,4 @@ -set(RUN_OPTIONS < ${CMAKE_CURRENT_SOURCE_DIR}/vor.in3) +set(RUN_OPTIONS < vor.in3) list(APPEND LDFLAGS -lm) llvm_multisource(vor) +llvm_test_data(vor vor.in3) diff --git a/MultiSource/Benchmarks/McCat/15-trie/CMakeLists.txt b/MultiSource/Benchmarks/McCat/15-trie/CMakeLists.txt index 4454c71c..03b17ae3 100644 --- a/MultiSource/Benchmarks/McCat/15-trie/CMakeLists.txt +++ b/MultiSource/Benchmarks/McCat/15-trie/CMakeLists.txt @@ -1,3 +1,4 @@ list(APPEND LDFLAGS -lm) -list(APPEND RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/trie.in1) +list(APPEND RUN_OPTIONS trie.in1) llvm_multisource(trie) +llvm_test_data(trie trie.in1) diff --git a/MultiSource/Benchmarks/McCat/17-bintr/CMakeLists.txt b/MultiSource/Benchmarks/McCat/17-bintr/CMakeLists.txt index 8178880a..db42c4e9 100644 --- a/MultiSource/Benchmarks/McCat/17-bintr/CMakeLists.txt +++ b/MultiSource/Benchmarks/McCat/17-bintr/CMakeLists.txt @@ -1,3 +1,4 @@ list(APPEND LDFLAGS -lm) -set(RUN_OPTIONS < ${CMAKE_CURRENT_SOURCE_DIR}/bnchmrk.in1) +set(RUN_OPTIONS < bnchmrk.in1) llvm_multisource(bintr) +llvm_test_data(bintr bnchmrk.in1) diff --git a/MultiSource/Benchmarks/McCat/18-imp/CMakeLists.txt b/MultiSource/Benchmarks/McCat/18-imp/CMakeLists.txt index 8371cf1d..0cd02350 100644 --- a/MultiSource/Benchmarks/McCat/18-imp/CMakeLists.txt +++ b/MultiSource/Benchmarks/McCat/18-imp/CMakeLists.txt @@ -1,3 +1,4 @@ -list(APPEND RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/sg01.imp) list(APPEND LDFLAGS -lm) +set(RUN_OPTIONS ./sg01.imp) llvm_multisource(imp) +llvm_test_data(imp sg01.imp sg01.pgm) diff --git a/MultiSource/Benchmarks/MiBench/automotive-susan/CMakeLists.txt b/MultiSource/Benchmarks/MiBench/automotive-susan/CMakeLists.txt index bef71866..92e8da9b 100644 --- a/MultiSource/Benchmarks/MiBench/automotive-susan/CMakeLists.txt +++ b/MultiSource/Benchmarks/MiBench/automotive-susan/CMakeLists.txt @@ -1,4 +1,5 @@ list(APPEND LDFLAGS -lm) -set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/input_large.pgm /dev/null -s) +set(RUN_OPTIONS input_large.pgm /dev/null -s) set(HASH_PROGRAM_OUTPUT 1) llvm_multisource(automotive-susan) +llvm_test_data(automotive-susan input_large.pgm) diff --git a/MultiSource/Benchmarks/MiBench/consumer-jpeg/CMakeLists.txt b/MultiSource/Benchmarks/MiBench/consumer-jpeg/CMakeLists.txt index f3bea715..3ffe7859 100644 --- a/MultiSource/Benchmarks/MiBench/consumer-jpeg/CMakeLists.txt +++ b/MultiSource/Benchmarks/MiBench/consumer-jpeg/CMakeLists.txt @@ -1,3 +1,4 @@ list(APPEND LDFLAGS -lm) -set(RUN_OPTIONS -dct int -ppm -outfile /dev/null ${CMAKE_CURRENT_SOURCE_DIR}/input_large.jpg) +set(RUN_OPTIONS -dct int -ppm -outfile /dev/null input_large.jpg) llvm_multisource(consumer-jpeg) +llvm_test_data(consumer-jpeg input_large.jpg) diff --git a/MultiSource/Benchmarks/MiBench/consumer-lame/CMakeLists.txt b/MultiSource/Benchmarks/MiBench/consumer-lame/CMakeLists.txt index de6b764c..b1033271 100644 --- a/MultiSource/Benchmarks/MiBench/consumer-lame/CMakeLists.txt +++ b/MultiSource/Benchmarks/MiBench/consumer-lame/CMakeLists.txt @@ -1,4 +1,5 @@ list(APPEND CPPFLAGS -DHAVEMPGLIB -DLAMEPARSE -DNDEBUG -D__NO_MATH_INLINES -DLAMESNDFILE) list(APPEND LDFLAGS -lm) -set(RUN_OPTIONS -S ${CMAKE_CURRENT_SOURCE_DIR}/large.wav /dev/null) +set(RUN_OPTIONS -S large.wav /dev/null) llvm_multisource(consumer-lame) +llvm_test_data(consumer-lame large.wav) diff --git a/MultiSource/Benchmarks/MiBench/consumer-typeset/CMakeLists.txt b/MultiSource/Benchmarks/MiBench/consumer-typeset/CMakeLists.txt index ef07ec9e..5f670b48 100644 --- a/MultiSource/Benchmarks/MiBench/consumer-typeset/CMakeLists.txt +++ b/MultiSource/Benchmarks/MiBench/consumer-typeset/CMakeLists.txt @@ -1,5 +1,6 @@ list(APPEND CPPFLAGS -DOS_UNIX=1 -DOS_DOS=0 -DOS_MAC=0 -DDB_FIX=0 -DUSE_STAT=1 -DSAFE_DFT=0 -DCOLLATE=1 -DLIB_DIR="lout.lib" -DFONT_DIR="font" -DMAPS_DIR="maps" -DINCL_DIR="include" -DDATA_DIR="data" -DHYPH_DIR="hyph" -DLOCALE_DIR="locale" -DCHAR_IN=1 -DCHAR_OUT=0 -DLOCALE_ON=1 -DASSERT_ON=1 -DDEBUG_ON=0 -DPDF_COMPRESSION=0 -D_FORTIFY_SOURCE=0) list(APPEND LDFLAGS -lm) -set(RUN_OPTIONS -x -I ${CMAKE_CURRENT_SOURCE_DIR}/data/include -D ${CMAKE_CURRENT_SOURCE_DIR}/data/data -F ${CMAKE_CURRENT_SOURCE_DIR}/data/font -C ${CMAKE_CURRENT_SOURCE_DIR}/data/maps -H ${CMAKE_CURRENT_SOURCE_DIR}/data/hyph ${CMAKE_CURRENT_SOURCE_DIR}/large.lout) +set(RUN_OPTIONS -x -I data/include -D data/data -F data/font -C data/maps -H data/hyph large.lout) llvm_multisource(consumer-typeset) +llvm_test_data(consumer-typeset large.lout data) diff --git a/MultiSource/Benchmarks/MiBench/network-dijkstra/CMakeLists.txt b/MultiSource/Benchmarks/MiBench/network-dijkstra/CMakeLists.txt index 83f3c568..76d2a49f 100644 --- a/MultiSource/Benchmarks/MiBench/network-dijkstra/CMakeLists.txt +++ b/MultiSource/Benchmarks/MiBench/network-dijkstra/CMakeLists.txt @@ -1,3 +1,4 @@ list(APPEND LDFLAGS -lm) -set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/input.dat) +set(RUN_OPTIONS input.dat) llvm_multisource(network-dijkstra) +llvm_test_data(network-dijkstra input.dat) diff --git a/MultiSource/Benchmarks/MiBench/network-patricia/CMakeLists.txt b/MultiSource/Benchmarks/MiBench/network-patricia/CMakeLists.txt index fcbf64f6..c412039f 100644 --- a/MultiSource/Benchmarks/MiBench/network-patricia/CMakeLists.txt +++ b/MultiSource/Benchmarks/MiBench/network-patricia/CMakeLists.txt @@ -1,4 +1,5 @@ list(APPEND LDFLAGS -lm) -set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/large.udp) +set(RUN_OPTIONS large.udp) set(HASH_PROGRAM_OUTPUT 1) llvm_multisource(network-patricia) +llvm_test_data(network-patricia large.udp) diff --git a/MultiSource/Benchmarks/MiBench/office-ispell/CMakeLists.txt b/MultiSource/Benchmarks/MiBench/office-ispell/CMakeLists.txt index d814df4c..13920af8 100644 --- a/MultiSource/Benchmarks/MiBench/office-ispell/CMakeLists.txt +++ b/MultiSource/Benchmarks/MiBench/office-ispell/CMakeLists.txt @@ -1,4 +1,5 @@ list(APPEND CPPFLAGS -Dconst=) list(APPEND LDFLAGS -lm) -set(RUN_OPTIONS -a -d ${CMAKE_CURRENT_SOURCE_DIR}/americanmed+ < ${CMAKE_CURRENT_SOURCE_DIR}/large.txt) +set(RUN_OPTIONS -a -d americanmed+ < large.txt) llvm_multisource(office-ispell) +llvm_test_data(office-ispell americanmed+.hash large.txt) diff --git a/MultiSource/Benchmarks/MiBench/security-rijndael/CMakeLists.txt b/MultiSource/Benchmarks/MiBench/security-rijndael/CMakeLists.txt index 99fd5370..732c955e 100644 --- a/MultiSource/Benchmarks/MiBench/security-rijndael/CMakeLists.txt +++ b/MultiSource/Benchmarks/MiBench/security-rijndael/CMakeLists.txt @@ -1,4 +1,5 @@ list(APPEND LDFLAGS -lm) -set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/output_large.enc /dev/null d 1234567890abcdeffedcba09876543211234567890abcdeffedcba0987654321) +set(RUN_OPTIONS output_large.enc /dev/null d 1234567890abcdeffedcba09876543211234567890abcdeffedcba0987654321) set(HASH_PROGRAM_OUTPUT 1) llvm_multisource(security-rijndael) +llvm_test_data(security-rijndael output_large.enc) diff --git a/MultiSource/Benchmarks/MiBench/security-sha/CMakeLists.txt b/MultiSource/Benchmarks/MiBench/security-sha/CMakeLists.txt index 859aedf4..a85080b7 100644 --- a/MultiSource/Benchmarks/MiBench/security-sha/CMakeLists.txt +++ b/MultiSource/Benchmarks/MiBench/security-sha/CMakeLists.txt @@ -1,3 +1,4 @@ list(APPEND LDFLAGS -lm) -set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/input_large.asc ) +set(RUN_OPTIONS input_large.asc) llvm_multisource(security-sha) +llvm_test_data(security-sha input_large.asc) diff --git a/MultiSource/Benchmarks/MiBench/telecomm-CRC32/CMakeLists.txt b/MultiSource/Benchmarks/MiBench/telecomm-CRC32/CMakeLists.txt index cec4784c..a5a91926 100644 --- a/MultiSource/Benchmarks/MiBench/telecomm-CRC32/CMakeLists.txt +++ b/MultiSource/Benchmarks/MiBench/telecomm-CRC32/CMakeLists.txt @@ -1,3 +1,4 @@ list(APPEND LDFLAGS -lm) -set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/large.pcm) +set(RUN_OPTIONS large.pcm) llvm_multisource(telecomm-CRC32) +llvm_test_data(telecomm-CRC32 large.pcm) diff --git a/MultiSource/Benchmarks/MiBench/telecomm-adpcm/CMakeLists.txt b/MultiSource/Benchmarks/MiBench/telecomm-adpcm/CMakeLists.txt index 47245de3..0cc68130 100644 --- a/MultiSource/Benchmarks/MiBench/telecomm-adpcm/CMakeLists.txt +++ b/MultiSource/Benchmarks/MiBench/telecomm-adpcm/CMakeLists.txt @@ -1,4 +1,5 @@ list(APPEND LDFLAGS -lm) -set(RUN_OPTIONS < ${CMAKE_CURRENT_SOURCE_DIR}/large.adpcm) +set(RUN_OPTIONS < large.adpcm) set(HASH_PROGRAM_OUTPUT 1) llvm_multisource(telecomm-adpcm) +llvm_test_data(telecomm-adpcm large.adpcm) diff --git a/MultiSource/Benchmarks/MiBench/telecomm-gsm/CMakeLists.txt b/MultiSource/Benchmarks/MiBench/telecomm-gsm/CMakeLists.txt index fba7e2ae..226e5afb 100644 --- a/MultiSource/Benchmarks/MiBench/telecomm-gsm/CMakeLists.txt +++ b/MultiSource/Benchmarks/MiBench/telecomm-gsm/CMakeLists.txt @@ -1,5 +1,6 @@ list(APPEND CPPFLAGS -DSTUPID_COMPILER -DNeedFunctionPrototypes=1 -DSASR) list(APPEND LDFLAGS -lm) -set(RUN_OPTIONS -fps -c ${CMAKE_CURRENT_SOURCE_DIR}/large.au) +set(RUN_OPTIONS -fps -c large.au) set(HASH_PROGRAM_OUTPUT 1) llvm_multisource(telecomm-gsm) +llvm_test_data(telecomm-gsm large.au) diff --git a/MultiSource/Benchmarks/PAQ8p/CMakeLists.txt b/MultiSource/Benchmarks/PAQ8p/CMakeLists.txt index afd52205..e6abe2bf 100644 --- a/MultiSource/Benchmarks/PAQ8p/CMakeLists.txt +++ b/MultiSource/Benchmarks/PAQ8p/CMakeLists.txt @@ -1,9 +1,11 @@ list(APPEND CPPFLAGS -DNOASM -DLLVM) list(APPEND LDFLAGS -lstdc++ -lm) if(SMALL_PROBLEM_SIZE) - set(RUN_OPTIONS -1 ${CMAKE_CURRENT_SOURCE_DIR}/small.in) + set(INPUTS small.in) + set(RUN_OPTIONS -1 ${INPUTS}) else() - set(RUN_OPTIONS -4 ${CMAKE_CURRENT_SOURCE_DIR}/file1.in) + set(INPUTS file1.in) + set(RUN_OPTIONS -4 ${INPUTS}) endif() -set(WORKDIR ${CMAKE_CURRENT_BINARY_DIR}) llvm_multisource(paq8p) +llvm_test_data(paq8p ${INPUTS}) diff --git a/MultiSource/Benchmarks/Prolangs-C++/employ/CMakeLists.txt b/MultiSource/Benchmarks/Prolangs-C++/employ/CMakeLists.txt index 5b9fe56c..bbe59b23 100644 --- a/MultiSource/Benchmarks/Prolangs-C++/employ/CMakeLists.txt +++ b/MultiSource/Benchmarks/Prolangs-C++/employ/CMakeLists.txt @@ -1,4 +1,5 @@ list(APPEND LDFLAGS -lstdc++) -set(RUN_OPTIONS 400 < ${CMAKE_CURRENT_SOURCE_DIR}/input.txt) +set(RUN_OPTIONS 400 < input.txt) set(HASH_PROGRAM_OUTPUT 1) llvm_multisource(employ) +llvm_test_data(employ input.txt) diff --git a/MultiSource/Benchmarks/Prolangs-C/agrep/CMakeLists.txt b/MultiSource/Benchmarks/Prolangs-C/agrep/CMakeLists.txt index ef7a8f2a..e391a59f 100644 --- a/MultiSource/Benchmarks/Prolangs-C/agrep/CMakeLists.txt +++ b/MultiSource/Benchmarks/Prolangs-C/agrep/CMakeLists.txt @@ -1,3 +1,4 @@ -set(RUN_OPTIONS -2 int ${CMAKE_CURRENT_SOURCE_DIR}/InstructionCombining.cpp.txt) +set(RUN_OPTIONS -2 int InstructionCombining.cpp.txt) set(HASH_PROGRAM_OUTPUT 1) llvm_multisource(agrep) +llvm_test_data(agrep InstructionCombining.cpp.txt) diff --git a/MultiSource/Benchmarks/Prolangs-C/bison/CMakeLists.txt b/MultiSource/Benchmarks/Prolangs-C/bison/CMakeLists.txt index 82db3354..b1d447eb 100644 --- a/MultiSource/Benchmarks/Prolangs-C/bison/CMakeLists.txt +++ b/MultiSource/Benchmarks/Prolangs-C/bison/CMakeLists.txt @@ -1,2 +1,3 @@ -set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/parse.y.in -v) +set(RUN_OPTIONS parse.y.in -v) llvm_multisource(mybison) +llvm_test_data(mybison parse.y.in) diff --git a/MultiSource/Benchmarks/Prolangs-C/cdecl/CMakeLists.txt b/MultiSource/Benchmarks/Prolangs-C/cdecl/CMakeLists.txt index ffb80370..d2ed5854 100644 --- a/MultiSource/Benchmarks/Prolangs-C/cdecl/CMakeLists.txt +++ b/MultiSource/Benchmarks/Prolangs-C/cdecl/CMakeLists.txt @@ -1,3 +1,4 @@ list(APPEND CFLAGS -std=gnu89) -set(RUN_OPTIONS < ${CMAKE_CURRENT_SOURCE_DIR}/testset) +set(RUN_OPTIONS < testset) llvm_multisource(cdecl) +llvm_test_data(cdecl testset) diff --git a/MultiSource/Benchmarks/Prolangs-C/gnugo/CMakeLists.txt b/MultiSource/Benchmarks/Prolangs-C/gnugo/CMakeLists.txt index 871f68c2..4825ca22 100644 --- a/MultiSource/Benchmarks/Prolangs-C/gnugo/CMakeLists.txt +++ b/MultiSource/Benchmarks/Prolangs-C/gnugo/CMakeLists.txt @@ -1,3 +1,4 @@ set(HASH_PROGRAM_OUTPUT 1) -set(RUN_OPTIONS < ${CMAKE_CURRENT_SOURCE_DIR}/stdin) +set(RUN_OPTIONS < stdin) llvm_multisource(gnugo) +llvm_test_data(gnugo stdin) diff --git a/MultiSource/Benchmarks/Prolangs-C/unix-smail/CMakeLists.txt b/MultiSource/Benchmarks/Prolangs-C/unix-smail/CMakeLists.txt index ec350a31..e105221a 100644 --- a/MultiSource/Benchmarks/Prolangs-C/unix-smail/CMakeLists.txt +++ b/MultiSource/Benchmarks/Prolangs-C/unix-smail/CMakeLists.txt @@ -1,2 +1,3 @@ -set(RUN_OPTIONS -v ALL < ${CMAKE_CURRENT_SOURCE_DIR}/main.c) +set(RUN_OPTIONS -v ALL < main.c) llvm_multisource(unix-smail) +llvm_test_data(unix-smail main.c) diff --git a/MultiSource/Benchmarks/Ptrdist/anagram/CMakeLists.txt b/MultiSource/Benchmarks/Ptrdist/anagram/CMakeLists.txt index 0b9eb1d1..30b9278b 100644 --- a/MultiSource/Benchmarks/Ptrdist/anagram/CMakeLists.txt +++ b/MultiSource/Benchmarks/Ptrdist/anagram/CMakeLists.txt @@ -1,2 +1,3 @@ -set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/words 2 < ${CMAKE_CURRENT_SOURCE_DIR}/input.OUT) +set(RUN_OPTIONS words 2 < input.OUT) llvm_multisource(anagram) +llvm_test_data(anagram words input.OUT) diff --git a/MultiSource/Benchmarks/Ptrdist/bc/CMakeLists.txt b/MultiSource/Benchmarks/Ptrdist/bc/CMakeLists.txt index b3a68432..a96efcbe 100644 --- a/MultiSource/Benchmarks/Ptrdist/bc/CMakeLists.txt +++ b/MultiSource/Benchmarks/Ptrdist/bc/CMakeLists.txt @@ -1,3 +1,4 @@ -set(RUN_OPTIONS < ${CMAKE_CURRENT_SOURCE_DIR}/primes.b) +set(RUN_OPTIONS < primes.b) set(HASH_PROGRAM_OUTPUT 1) llvm_multisource(bc) +llvm_test_data(bc primes.b) diff --git a/MultiSource/Benchmarks/Ptrdist/ks/CMakeLists.txt b/MultiSource/Benchmarks/Ptrdist/ks/CMakeLists.txt index 6fc6f76e..523e52a7 100644 --- a/MultiSource/Benchmarks/Ptrdist/ks/CMakeLists.txt +++ b/MultiSource/Benchmarks/Ptrdist/ks/CMakeLists.txt @@ -1,2 +1,3 @@ -list(APPEND RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/KL-4.in) +set(RUN_OPTIONS KL-4.in) llvm_multisource(ks) +llvm_test_data(ks KL-4.in) diff --git a/MultiSource/Benchmarks/Ptrdist/yacr2/CMakeLists.txt b/MultiSource/Benchmarks/Ptrdist/yacr2/CMakeLists.txt index 74edddb8..e444a201 100644 --- a/MultiSource/Benchmarks/Ptrdist/yacr2/CMakeLists.txt +++ b/MultiSource/Benchmarks/Ptrdist/yacr2/CMakeLists.txt @@ -1,4 +1,5 @@ list(APPEND CPPFLAGS -DTODD) -set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/input2.in) +set(RUN_OPTIONS input2.in) set(HASH_PROGRAM_OUTPUT 1) llvm_multisource(yacr2) +llvm_test_data(yacr2 input2.in) diff --git a/MultiSource/Benchmarks/Rodinia/hotspot/CMakeLists.txt b/MultiSource/Benchmarks/Rodinia/hotspot/CMakeLists.txt index 6d029d69..1f83aa61 100644 --- a/MultiSource/Benchmarks/Rodinia/hotspot/CMakeLists.txt +++ b/MultiSource/Benchmarks/Rodinia/hotspot/CMakeLists.txt @@ -1,6 +1,5 @@ set(FP_ABSTOLERANCE 0.00001) list(APPEND CFLAGS -I${CMAKE_CURRENT_SOURCE_DIR}/../Common) -set(WORKDIR ${CMAKE_CURRENT_BINARY_DIR}) llvm_multisource(hotspot hotspotKernel.c diff --git a/MultiSource/Benchmarks/Rodinia/srad/CMakeLists.txt b/MultiSource/Benchmarks/Rodinia/srad/CMakeLists.txt index 2200c480..a3ffcdb4 100644 --- a/MultiSource/Benchmarks/Rodinia/srad/CMakeLists.txt +++ b/MultiSource/Benchmarks/Rodinia/srad/CMakeLists.txt @@ -1,7 +1,6 @@ list(APPEND LDFLAGS -lm) set(FP_ABSTOLERANCE 0.00001) list(APPEND CFLAGS -I${CMAKE_CURRENT_SOURCE_DIR}/../Common) -set(WORKDIR ${CMAKE_CURRENT_BINARY_DIR}) llvm_multisource(srad main.c sradKernel.c diff --git a/MultiSource/Benchmarks/Trimaran/netbench-url/CMakeLists.txt b/MultiSource/Benchmarks/Trimaran/netbench-url/CMakeLists.txt index 77343728..c9b5e5ca 100644 --- a/MultiSource/Benchmarks/Trimaran/netbench-url/CMakeLists.txt +++ b/MultiSource/Benchmarks/Trimaran/netbench-url/CMakeLists.txt @@ -1,10 +1,11 @@ if(LARGE_PROBLEM_SIZE) - set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/medium_inputs 1400) + set(RUN_OPTIONS medium_inputs 1400) else() if(SMALL_PROBLEM_SIZE) - set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/medium_inputs 100) + set(RUN_OPTIONS medium_inputs 100) else() - set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/medium_inputs 900) + set(RUN_OPTIONS medium_inputs 900) endif() endif() llvm_multisource(netbench-url) +llvm_test_data(netbench-url medium_inputs) diff --git a/MultiSource/Benchmarks/VersaBench/8b10b/CMakeLists.txt b/MultiSource/Benchmarks/VersaBench/8b10b/CMakeLists.txt index 7893dc9f..1811fa88 100644 --- a/MultiSource/Benchmarks/VersaBench/8b10b/CMakeLists.txt +++ b/MultiSource/Benchmarks/VersaBench/8b10b/CMakeLists.txt @@ -1,6 +1,7 @@ if(SMALL_PROBLEM_SIZE) - set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/input.txt 2000) + set(RUN_OPTIONS input.txt 2000) else() - set(RUN_OPTIONS ${CMAKE_CURRENT_SOURCE_DIR}/input.txt 20000) + set(RUN_OPTIONS input.txt 20000) endif() llvm_multisource(8b10b) +llvm_test_data(8b10b input.txt) diff --git a/MultiSource/Benchmarks/VersaBench/dbms/CMakeLists.txt b/MultiSource/Benchmarks/VersaBench/dbms/CMakeLists.txt index e0447421..bf3a09f9 100644 --- a/MultiSource/Benchmarks/VersaBench/dbms/CMakeLists.txt +++ b/MultiSource/Benchmarks/VersaBench/dbms/CMakeLists.txt @@ -1,7 +1,10 @@ list(APPEND LDFLAGS -lm) if(SMALL_PROBLEM_SIZE) - set(RUN_OPTIONS -i ${CMAKE_CURRENT_SOURCE_DIR}/dbms.train.in) + set(INPUTS dbms.train.in) + set(RUN_OPTIONS -i ${INPUTS}) else() - set(RUN_OPTIONS -i ${CMAKE_CURRENT_SOURCE_DIR}/dbms.ref.in) + set(INPUTS dbms.ref.in) + set(RUN_OPTIONS -i ${INPUTS}) endif() llvm_multisource(dbms) +llvm_test_data(dbms ${INPUTS}) diff --git a/MultiSource/Benchmarks/mafft/CMakeLists.txt b/MultiSource/Benchmarks/mafft/CMakeLists.txt index aaf73ed2..7a71ec0a 100644 --- a/MultiSource/Benchmarks/mafft/CMakeLists.txt +++ b/MultiSource/Benchmarks/mafft/CMakeLists.txt @@ -1,7 +1,6 @@ list(APPEND CPPFLAGS -DLLVM) list(APPEND LDFLAGS -lm) -set(RUN_OPTIONS -b 62 -g 0.100 -f 2.00 -h 0.100 -L < ${CMAKE_CURRENT_SOURCE_DIR}/pyruvate_decarboxylase.fasta) -set(WORKDIR ${CMAKE_CURRENT_BINARY_DIR}) +set(RUN_OPTIONS -b 62 -g 0.100 -f 2.00 -h 0.100 -L < pyruvate_decarboxylase.fasta) set(HASH_PROGRAM_OUTPUT 1) llvm_multisource(pairlocalalign Calignm1.c @@ -32,3 +31,4 @@ llvm_multisource(pairlocalalign suboptalign11.c tddis.c ) +llvm_test_data(pairlocalalign pyruvate_decarboxylase.fasta) diff --git a/MultiSource/Benchmarks/mediabench/adpcm/rawcaudio/CMakeLists.txt b/MultiSource/Benchmarks/mediabench/adpcm/rawcaudio/CMakeLists.txt index 706d5fd5..62eafeb4 100644 --- a/MultiSource/Benchmarks/mediabench/adpcm/rawcaudio/CMakeLists.txt +++ b/MultiSource/Benchmarks/mediabench/adpcm/rawcaudio/CMakeLists.txt @@ -1,5 +1,8 @@ -set(RUN_OPTIONS < ${CMAKE_CURRENT_SOURCE_DIR}/../data/clinton.pcm ) +set(RUN_OPTIONS < clinton.pcm) llvm_multisource(rawcaudio rawcaudio.c adpcm.c ) +llvm_test_data(rawcaudio SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../data + clinton.pcm +) diff --git a/MultiSource/Benchmarks/mediabench/adpcm/rawdaudio/CMakeLists.txt b/MultiSource/Benchmarks/mediabench/adpcm/rawdaudio/CMakeLists.txt index 84634e79..b1057a34 100644 --- a/MultiSource/Benchmarks/mediabench/adpcm/rawdaudio/CMakeLists.txt +++ b/MultiSource/Benchmarks/mediabench/adpcm/rawdaudio/CMakeLists.txt @@ -1,6 +1,9 @@ -set(RUN_OPTIONS < ${CMAKE_CURRENT_SOURCE_DIR}/../data/clinton.adpcm ) +set(RUN_OPTIONS < clinton.adpcm) set(HASH_PROGRAM_OUTPUT 1) llvm_multisource(rawdaudio rawdaudio.c adpcm.c ) +llvm_test_data(rawdaudio SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../data + clinton.adpcm +) diff --git a/MultiSource/Benchmarks/mediabench/g721/g721encode/CMakeLists.txt b/MultiSource/Benchmarks/mediabench/g721/g721encode/CMakeLists.txt index 08aa2083..8ac2c333 100644 --- a/MultiSource/Benchmarks/mediabench/g721/g721encode/CMakeLists.txt +++ b/MultiSource/Benchmarks/mediabench/g721/g721encode/CMakeLists.txt @@ -1,4 +1,4 @@ -set(RUN_OPTIONS -4 -l < ${CMAKE_CURRENT_SOURCE_DIR}/../data/clinton.pcm) +set(RUN_OPTIONS -4 -l < clinton.pcm) llvm_multisource(encode encode.c g711.c @@ -7,3 +7,6 @@ llvm_multisource(encode g723_40.c g72x.c ) +llvm_test_data(encode SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../data + clinton.pcm +) diff --git a/MultiSource/Benchmarks/mediabench/gsm/toast/CMakeLists.txt b/MultiSource/Benchmarks/mediabench/gsm/toast/CMakeLists.txt index 91d14a50..a384543e 100644 --- a/MultiSource/Benchmarks/mediabench/gsm/toast/CMakeLists.txt +++ b/MultiSource/Benchmarks/mediabench/gsm/toast/CMakeLists.txt @@ -1,4 +1,4 @@ -set(RUN_OPTIONS -cpl ${CMAKE_CURRENT_SOURCE_DIR}/../data/clinton.pcm) +set(RUN_OPTIONS -cpl clinton.pcm) list(APPEND CPPFLAGS -DNeedFunctionPrototypes=1 -DSASR) llvm_multisource(toast add.c @@ -25,3 +25,6 @@ llvm_multisource(toast preprocess.c toast_audio.c ) +llvm_test_data(toast SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../data + clinton.pcm +) diff --git a/MultiSource/Benchmarks/mediabench/jpeg/jpeg-6a/CMakeLists.txt b/MultiSource/Benchmarks/mediabench/jpeg/jpeg-6a/CMakeLists.txt index 4ed5e029..8750df54 100644 --- a/MultiSource/Benchmarks/mediabench/jpeg/jpeg-6a/CMakeLists.txt +++ b/MultiSource/Benchmarks/mediabench/jpeg/jpeg-6a/CMakeLists.txt @@ -1,4 +1,4 @@ -set(RUN_OPTIONS -dct int -progressive -opt ${CMAKE_CURRENT_SOURCE_DIR}/../data/testimg.ppm) +set(RUN_OPTIONS -dct int -progressive -opt testimg.ppm) llvm_multisource(cjpeg jcapimin.c jcapistd.c @@ -55,3 +55,6 @@ llvm_multisource(cjpeg rdswitch.c cdjpeg.c ) +llvm_test_data(cjpeg SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../data + testimg.ppm +) diff --git a/MultiSource/Benchmarks/mediabench/mpeg2/mpeg2dec/CMakeLists.txt b/MultiSource/Benchmarks/mediabench/mpeg2/mpeg2dec/CMakeLists.txt index 8cc008e1..653f8dca 100644 --- a/MultiSource/Benchmarks/mediabench/mpeg2/mpeg2dec/CMakeLists.txt +++ b/MultiSource/Benchmarks/mediabench/mpeg2/mpeg2dec/CMakeLists.txt @@ -1,4 +1,4 @@ -set(RUN_OPTIONS -b ${CMAKE_CURRENT_SOURCE_DIR}/../data/mei16v2.m2v -r -f -o0 ${CMAKE_CURRENT_BINARY_DIR}/tmp%d) +set(RUN_OPTIONS -b mei16v2.m2v -r -f -o0 tmp%d) list(APPEND LDFLAGS -lm) llvm_multisource(mpeg2decode display.c @@ -18,3 +18,6 @@ llvm_multisource(mpeg2decode spatscal.c systems.c ) +llvm_test_data(mpeg2decode SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../data + mei16v2.m2v +) diff --git a/MultiSource/Benchmarks/nbench/CMakeLists.txt b/MultiSource/Benchmarks/nbench/CMakeLists.txt index cabb3524..b86a7946 100644 --- a/MultiSource/Benchmarks/nbench/CMakeLists.txt +++ b/MultiSource/Benchmarks/nbench/CMakeLists.txt @@ -1,12 +1,5 @@ list(APPEND CPPFLAGS -DBASE_ITERATIONS=25) list(APPEND LDFLAGS -lm) -set(WORKDIR ${CMAKE_CURRENT_BINARY_DIR}) - -add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/NNET.DAT - COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/NNET.DAT ${CMAKE_CURRENT_BINARY_DIR}/NNET.DAT - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMENT "Copying nbench test input") -add_custom_target(nbench_input SOURCES ${CMAKE_CURRENT_BINARY_DIR}/NNET.DAT) llvm_multisource(nbench) -add_dependencies(nbench nbench_input) +llvm_test_data(nbench NNET.DAT) diff --git a/MultiSource/Benchmarks/sim/CMakeLists.txt b/MultiSource/Benchmarks/sim/CMakeLists.txt index 86764eaa..11d14b9d 100644 --- a/MultiSource/Benchmarks/sim/CMakeLists.txt +++ b/MultiSource/Benchmarks/sim/CMakeLists.txt @@ -1,4 +1,5 @@ list(APPEND CPPFLAGS -DUNIX) -set(RUN_OPTIONS 8 ${CMAKE_CURRENT_SOURCE_DIR}/tob.38-44 ${CMAKE_CURRENT_SOURCE_DIR}/liv.42-48) -set(WORKDIR ${CMAKE_CURRENT_BINARY_DIR}) +set(RUN_OPTIONS 8 tob.38-44 liv.42-48) llvm_multisource(sim) + +llvm_test_data(sim tob.38-44 liv.42-48) diff --git a/cmake/modules/CopyDir.cmake b/cmake/modules/CopyDir.cmake index 319b899f..b25a80b1 100644 --- a/cmake/modules/CopyDir.cmake +++ b/cmake/modules/CopyDir.cmake @@ -15,3 +15,17 @@ function(llvm_copy target to from) COMMAND ${CMAKE_COMMAND} -E copy ${from} ${to} ) endfunction() + +function(llvm_create_symlink target to from) + add_custom_command( + TARGET ${target} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E create_symlink ${from} ${to} + ) +endfunction() + +function(llvm_make_directory target) + add_custom_command( + TARGET ${target} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E make_directory ${ARGN} + ) +endfunction() diff --git a/cmake/modules/SingleMultiSource.cmake b/cmake/modules/SingleMultiSource.cmake index 385fe390..d74ca9db 100644 --- a/cmake/modules/SingleMultiSource.cmake +++ b/cmake/modules/SingleMultiSource.cmake @@ -68,9 +68,8 @@ endmacro() # HASH_PROGRAM_OUTPUT, etc. # Create llvm_test_run() and llvm_test_verify() invocation for that. function(llvm_test_traditional name) - if(WORKDIR) - list(APPEND RUN_OPTIONS WORKDIR ${WORKDIR}) - endif() + # Always run in the same directory as the executable + list(INSERT RUN_OPTIONS 0 WORKDIR ${CMAKE_CURRENT_BINARY_DIR}) llvm_test_run(${RUN_OPTIONS}) # Hash if we've been asked to. diff --git a/cmake/modules/TestSuite.cmake b/cmake/modules/TestSuite.cmake index 8922d662..ca037c7f 100644 --- a/cmake/modules/TestSuite.cmake +++ b/cmake/modules/TestSuite.cmake @@ -4,6 +4,35 @@ # ##===----------------------------------------------------------------------===## include(TestFile) +include(CopyDir) + +# Copies files and directories to be used as benchmark input data to the +# directory of the benchmark executable. +# Paths are interepreted relative to CMAKE_CURRENT_SOURCE_DIR by default but +# this can be changed with the SOURCE_DIR argument. +function(llvm_test_data target) + cmake_parse_arguments(_LTDARGS "MUST_COPY" "SOURCE_DIR" "" ${ARGN}) + set(SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) + if(_LTDARGS_SOURCE_DIR) + set(SOURCE_DIR ${_LTDARGS_SOURCE_DIR}) + endif() + foreach(file ${_LTDARGS_UNPARSED_ARGUMENTS}) + set(full_path ${SOURCE_DIR}/${file}) + if(_LTDARGS_MUST_COPY) + if(IS_DIRECTORY ${full_path}) + llvm_copy_dir(${target} $/${file} ${full_path}) + else() + llvm_copy(${target} $/${file} ${full_path}) + endif() + else() + get_filename_component(file_subdir ${file} DIRECTORY) + if(file_subdir) + llvm_make_directory(${target} ${file_subdir}) + endif() + llvm_create_symlink(${target} $/${file} ${full_path}) + endif() + endforeach() +endfunction() # Creates a new executable build target. Use this instead of `add_executable`. # It applies CFLAGS, CPPFLAGS, CXXFLAGS and LDFLAGS. Creates a .test file if -- cgit v1.2.3