[test-suite] r255876 - cmake/lit: Add SPEC2000
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 16 20:52:42 PST 2015
Author: matze
Date: Wed Dec 16 22:52:41 2015
New Revision: 255876
URL: http://llvm.org/viewvc/llvm-project?rev=255876&view=rev
Log:
cmake/lit: Add SPEC2000
This is a new integration that improves over the Makefiles:
- Support all of spec input data sets (ref, train, test). You can choose
the variant with the usual RUN_TYPE test-suite configuration.
(In the future I'd like to make lit aware of the variants and allow to
switch them without regenerating the .test files)
- The .test files do a proper result checking now that is identical to
what the official spec driver is doing. The Makefiles used a lot of
shortcuts and simplifications which are not necessary anymore for
cmake/lit.
Does not include support for the fortran benchmarks.
Apple people should also beware of rdar://23577619
Added:
test-suite/trunk/External/SPEC/CFP2000/177.mesa/CMakeLists.txt
test-suite/trunk/External/SPEC/CFP2000/179.art/CMakeLists.txt
test-suite/trunk/External/SPEC/CFP2000/183.equake/CMakeLists.txt
test-suite/trunk/External/SPEC/CFP2000/188.ammp/CMakeLists.txt
test-suite/trunk/External/SPEC/CFP2000/CMakeLists.txt
test-suite/trunk/External/SPEC/CINT2000/164.gzip/CMakeLists.txt
test-suite/trunk/External/SPEC/CINT2000/175.vpr/CMakeLists.txt
test-suite/trunk/External/SPEC/CINT2000/176.gcc/CMakeLists.txt
test-suite/trunk/External/SPEC/CINT2000/181.mcf/CMakeLists.txt
test-suite/trunk/External/SPEC/CINT2000/186.crafty/CMakeLists.txt
test-suite/trunk/External/SPEC/CINT2000/197.parser/CMakeLists.txt
test-suite/trunk/External/SPEC/CINT2000/252.eon/CMakeLists.txt
test-suite/trunk/External/SPEC/CINT2000/253.perlbmk/CMakeLists.txt
test-suite/trunk/External/SPEC/CINT2000/254.gap/CMakeLists.txt
test-suite/trunk/External/SPEC/CINT2000/255.vortex/CMakeLists.txt
test-suite/trunk/External/SPEC/CINT2000/256.bzip2/CMakeLists.txt
test-suite/trunk/External/SPEC/CINT2000/300.twolf/CMakeLists.txt
test-suite/trunk/External/SPEC/CINT2000/CMakeLists.txt
test-suite/trunk/External/SPEC/CMakeLists.txt
test-suite/trunk/External/SPEC/lit.local.cfg
test-suite/trunk/cmake/modules/CopyDir.cmake
Modified:
test-suite/trunk/CMakeLists.txt
test-suite/trunk/External/CMakeLists.txt
test-suite/trunk/cmake/modules/SingleMultiSource.cmake
Modified: test-suite/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/CMakeLists.txt?rev=255876&r1=255875&r2=255876&view=diff
==============================================================================
--- test-suite/trunk/CMakeLists.txt (original)
+++ test-suite/trunk/CMakeLists.txt Wed Dec 16 22:52:41 2015
@@ -46,6 +46,10 @@ mark_as_advanced(TEST_SUITE_REMOTE_USER
# Run Under configuration for RunSafely.sh (will be set in lit.site.cfg)
set(TEST_SUITE_RUN_UNDER "" CACHE STRING "RunSafely.sh run-under (-u) parameter")
+# run type/benchmark size configuration (mostly for SPEC at the moment)
+set(TEST_SUITE_RUN_TYPE "train" CACHE STRING
+ "Type of benchmark inputs (may be test,train or ref)")
+
include(MakefileFunctions)
include(SingleMultiSource)
find_package(YACC)
Modified: test-suite/trunk/External/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/CMakeLists.txt?rev=255876&r1=255875&r2=255876&view=diff
==============================================================================
--- test-suite/trunk/External/CMakeLists.txt (original)
+++ test-suite/trunk/External/CMakeLists.txt Wed Dec 16 22:52:41 2015
@@ -26,5 +26,6 @@ llvm_add_subdirectories(
HMMER
Nurbs
Povray
+ SPEC
skidmarks10
)
Added: test-suite/trunk/External/SPEC/CFP2000/177.mesa/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CFP2000/177.mesa/CMakeLists.txt?rev=255876&view=auto
==============================================================================
--- test-suite/trunk/External/SPEC/CFP2000/177.mesa/CMakeLists.txt (added)
+++ test-suite/trunk/External/SPEC/CFP2000/177.mesa/CMakeLists.txt Wed Dec 16 22:52:41 2015
@@ -0,0 +1,90 @@
+# There's more files than we need in the src directory, provide a list:
+set(SourceNames
+ accum.c
+ alpha.c
+ alphabuf.c
+ api1.c
+ api2.c
+ attrib.c
+ bitmap.c
+ blend.c
+ clip.c
+ colortab.c
+ context.c
+ copypix.c
+ depth.c
+ dlist.c
+ drawpix.c
+ enable.c
+ eval.c
+ feedback.c
+ fog.c
+ get.c
+ hash.c
+ image.c
+ light.c
+ lines.c
+ logic.c
+ masking.c
+ matrix.c
+ misc.c
+ mmath.c
+ osmesa.c
+ pb.c
+ pixel.c
+ pointers.c
+ points.c
+ polygon.c
+ quads.c
+ rastpos.c
+ readpix.c
+ rect.c
+ scissor.c
+ shade.c
+ span.c
+ stencil.c
+ teximage.c
+ texobj.c
+ texstate.c
+ texture.c
+ triangle.c
+ varray.c
+ vb.c
+ vbfill.c
+ vbrender.c
+ vbxform.c
+ winpos.c
+ xform.c
+ mesa4.c
+)
+set(Source "")
+foreach(Filename ${SourceNames})
+ list(APPEND Source ${BENCHMARK_DIR}/src/${Filename})
+endforeach()
+
+macro(test_input run_type frames)
+ llvm_test_run(RUN_TYPE ${run_type}
+ 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} ${FPCMP}
+ -a 6.0
+ ${BENCHMARK_DIR}/data/${run_type}/output/mesa.ppm
+ ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/mesa.ppm
+ )
+endmacro()
+
+test_input(test 10)
+test_input(train 500)
+test_input(ref 1000)
+
+llvm_multisource()
+
+# 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)
Added: test-suite/trunk/External/SPEC/CFP2000/179.art/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CFP2000/179.art/CMakeLists.txt?rev=255876&view=auto
==============================================================================
--- test-suite/trunk/External/SPEC/CFP2000/179.art/CMakeLists.txt (added)
+++ test-suite/trunk/External/SPEC/CFP2000/179.art/CMakeLists.txt Wed Dec 16 22:52:41 2015
@@ -0,0 +1,58 @@
+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}"
+ )
+endmacro()
+
+set(DATADIR ${BENCHMARK_DIR}/data)
+test_input(test test.out
+ WORKDIR ${DATADIR}/test/input
+ -scanfile c756hel.in
+ -trainfile1 a10.img
+ -stride 2
+ -startx 134
+ -starty 220
+ -endx 139
+ -endy 225
+ -objects 1
+)
+test_input(train train.out
+ WORKDIR ${DATADIR}/train/input
+ -scanfile c756hel.in
+ -trainfile1 a10.img
+ -stride 2
+ -startx 134
+ -starty 220
+ -endx 184
+ -endy 240
+ -objects 3
+)
+test_input(ref ref.1.out
+ WORKDIR ${DATADIR}/ref/input
+ -scanfile c756hel.in
+ -trainfile1 a10.img
+ -trainfile2 hc.img
+ -stride 2
+ -startx 110
+ -starty 200
+ -endx 160
+ -endy 240
+ -objects 10
+)
+test_input(ref ref.2.out
+ WORKDIR ${DATADIR}/ref/input
+ -scanfile c756hel.in
+ -trainfile1 a10.img
+ -trainfile2 hc.img
+ -stride 2
+ -startx 470
+ -starty 140
+ -endx 520
+ -endy 180
+ -objects 10
+)
+
+llvm_multisource()
Added: test-suite/trunk/External/SPEC/CFP2000/183.equake/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CFP2000/183.equake/CMakeLists.txt?rev=255876&view=auto
==============================================================================
--- test-suite/trunk/External/SPEC/CFP2000/183.equake/CMakeLists.txt (added)
+++ test-suite/trunk/External/SPEC/CFP2000/183.equake/CMakeLists.txt Wed Dec 16 22:52:41 2015
@@ -0,0 +1,17 @@
+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_verify(RUN_TYPE ${run_type} ${FPCMP}
+ -r 0.00001
+ "${BENCHMARK_DIR}/data/${run_type}/output/inp.out"
+ "${CMAKE_CURRENT_BINARY_DIR}/inp.out"
+ )
+endmacro()
+
+test_input(test)
+test_input(train)
+test_input(ref)
+
+llvm_multisource()
Added: test-suite/trunk/External/SPEC/CFP2000/188.ammp/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CFP2000/188.ammp/CMakeLists.txt?rev=255876&view=auto
==============================================================================
--- test-suite/trunk/External/SPEC/CFP2000/188.ammp/CMakeLists.txt (added)
+++ test-suite/trunk/External/SPEC/CFP2000/188.ammp/CMakeLists.txt Wed Dec 16 22:52:41 2015
@@ -0,0 +1,18 @@
+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"
+ )
+ 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"
+ )
+endmacro()
+
+test_input(test)
+test_input(train)
+test_input(ref)
+
+llvm_multisource()
Added: test-suite/trunk/External/SPEC/CFP2000/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CFP2000/CMakeLists.txt?rev=255876&view=auto
==============================================================================
--- test-suite/trunk/External/SPEC/CFP2000/CMakeLists.txt (added)
+++ test-suite/trunk/External/SPEC/CFP2000/CMakeLists.txt Wed Dec 16 22:52:41 2015
@@ -0,0 +1,23 @@
+list(APPEND CPPFLAGS -DSPEC_CPU2000)
+if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ list(APPEND CPPFLAGS -DSPEC_CPU2000_LP64)
+endif()
+
+macro(cfp2000_subdir)
+ foreach(BENCHMARK ${ARGN})
+ set(BENCHMARK_DIR ${TEST_SUITE_SPEC2000_ROOT}/benchspec/CFP2000/${BENCHMARK})
+ set(PROG ${BENCHMARK})
+ file(GLOB Source ${BENCHMARK_DIR}/src/*.c ${BENCHMARK_DIR}/src/*.cpp)
+ if(NOT DEFINED TEST_SUITE_RUN_TYPE)
+ set(TEST_SUITE_RUN_TYPE "train")
+ endif()
+ llvm_add_subdirectories(${BENCHMARK})
+ endforeach()
+endmacro()
+
+cfp2000_subdir(
+ 177.mesa
+ 179.art
+ 183.equake
+ 188.ammp
+)
Added: test-suite/trunk/External/SPEC/CINT2000/164.gzip/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT2000/164.gzip/CMakeLists.txt?rev=255876&view=auto
==============================================================================
--- test-suite/trunk/External/SPEC/CINT2000/164.gzip/CMakeLists.txt (added)
+++ test-suite/trunk/External/SPEC/CINT2000/164.gzip/CMakeLists.txt Wed Dec 16 22:52:41 2015
@@ -0,0 +1,21 @@
+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_verify(RUN_TYPE ${run_type} ${FPCMP}
+ ${BENCHMARK_DIR}/data/${run_type}/output/${filename}.out
+ ${CMAKE_CURRENT_BINARY_DIR}/${filename}.out
+ )
+endmacro()
+
+test_input(train input.combined 32)
+test_input(test input.compressed 2)
+test_input(ref input.source 60)
+test_input(ref input.log 60)
+test_input(ref input.graphic 60)
+test_input(ref input.random 60)
+test_input(ref input.program 60)
+
+llvm_multisource()
Added: test-suite/trunk/External/SPEC/CINT2000/175.vpr/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT2000/175.vpr/CMakeLists.txt?rev=255876&view=auto
==============================================================================
--- test-suite/trunk/External/SPEC/CINT2000/175.vpr/CMakeLists.txt (added)
+++ test-suite/trunk/External/SPEC/CINT2000/175.vpr/CMakeLists.txt Wed Dec 16 22:52:41 2015
@@ -0,0 +1,51 @@
+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_run(RUN_TYPE ${run_type} EXECUTABLE rm ${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_run(RUN_TYPE ${run_type}
+ WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input
+ net.in arch.in place.in route.out
+ -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} ${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} ${FPCMP}
+ -r ${costs_tolerance}
+ ${BENCHMARK_DIR}/data/${run_type}/output/costs.out
+ ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/costs.out
+ )
+endmacro()
+
+test_input(ref 0.05)
+test_input(train 0.05)
+test_input(test 0.10)
+
+llvm_multisource()
+
+# 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)
Added: test-suite/trunk/External/SPEC/CINT2000/176.gcc/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT2000/176.gcc/CMakeLists.txt?rev=255876&view=auto
==============================================================================
--- test-suite/trunk/External/SPEC/CINT2000/176.gcc/CMakeLists.txt (added)
+++ test-suite/trunk/External/SPEC/CINT2000/176.gcc/CMakeLists.txt Wed Dec 16 22:52:41 2015
@@ -0,0 +1,27 @@
+if(ENDIAN STREQUAL "big")
+ list(APPEND CPPFLAGS -DHOST_WORDS_BIG_ENDIAN)
+endif()
+if(TARGET_OS STREQUAL "Darwin")
+ list(APPEND LDFLAGS -Xlinker -stack_size -Xlinker 0x800000)
+endif()
+
+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_verify(RUN_TYPE ${run_type} ${FPCMP}
+ ${BENCHMARK_DIR}/data/${run_type}/output/${sfile}
+ ${CMAKE_CURRENT_BINARY_DIR}/${sfile}
+ )
+endmacro()
+
+test_input(ref 166.i 166.s)
+test_input(ref 200.i 200.s)
+test_input(ref expr.i expr.s)
+test_input(ref integrate.i integrate.s)
+test_input(ref scilab.i scilab.s)
+test_input(train cp-decl.i cp-decl.s)
+test_input(test cccp.i cccp.s)
+
+llvm_multisource()
Added: test-suite/trunk/External/SPEC/CINT2000/181.mcf/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT2000/181.mcf/CMakeLists.txt?rev=255876&view=auto
==============================================================================
--- test-suite/trunk/External/SPEC/CINT2000/181.mcf/CMakeLists.txt (added)
+++ test-suite/trunk/External/SPEC/CINT2000/181.mcf/CMakeLists.txt Wed Dec 16 22:52:41 2015
@@ -0,0 +1,20 @@
+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_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} ${FPCMP}
+ ${BENCHMARK_DIR}/data/${run_type}/output/inp.out
+ ${CMAKE_CURRENT_BINARY_DIR}/inp.out
+ )
+endmacro()
+
+test_input(ref)
+test_input(train)
+test_input(test)
+
+llvm_multisource()
Added: test-suite/trunk/External/SPEC/CINT2000/186.crafty/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT2000/186.crafty/CMakeLists.txt?rev=255876&view=auto
==============================================================================
--- test-suite/trunk/External/SPEC/CINT2000/186.crafty/CMakeLists.txt (added)
+++ test-suite/trunk/External/SPEC/CINT2000/186.crafty/CMakeLists.txt Wed Dec 16 22:52:41 2015
@@ -0,0 +1,89 @@
+if(ARCH STREQUAL "Alpha")
+ list(APPEND CPPFLAGS -DALPHA -DLINUX)
+elseif(ARCH STREQUAL "PowerPC")
+ list(APPEND CPPFLAGS -DLINUX_PPC32)
+elseif(ARCH STREQUAL "Sparc")
+ list(APPEND CPPFLAGS -DSUN_BSD)
+endif()
+
+if(TARGET_OS STREQUAL "Darwin")
+ list(APPEND CPPFLAGS -DUNIX -DLINUX)
+elseif(TARGET_OS STREQUAL "Linux")
+ list(APPEND CPPFLAGS -DUNIX -DLINUX)
+endif()
+
+if(ENDIAN STREQUAL "little")
+ list(APPEND CPPFLAGS -DLITTLE_ENDIAN_ARCH)
+endif()
+
+include(CheckTypeSize)
+check_type_size("long" LONG64_TYPE_SIZE BUILTIN_TYPES_ONLY)
+if(LONG64_TYPE_SIZE EQUAL 8)
+ list(APPEND CPPFLAGS -DLONG_HAS_64BITS)
+endif()
+check_type_size("long long" LONG_LONG_TYPE_SIZE BUILTIN_TYPES_ONLY)
+if(LONG_LONG_TYPE_SIZE GREATER 7)
+ list(APPEND CPPFLAGS -DHAS_LONGLONG)
+endif()
+
+set(SourceNames
+ attacks.c
+ boolean.c
+ draw.c
+ drawn.c
+ edit.c
+ enprise.c
+ evaluate.c
+ history.c
+ init.c
+ input.c
+ interupt.c
+ iterate.c
+ lookup.c
+ main.c
+ make.c
+ movgen.c
+ next.c
+ nexte.c
+ nextr.c
+ option.c
+ output.c
+ phase.c
+ ponder.c
+ preeval.c
+ quiesce.c
+ repeat.c
+ resign.c
+ root.c
+ search.c
+ searchr.c
+ setboard.c
+ store.c
+ swap.c
+ time.c
+ unmake.c
+ utility.c
+ valid.c
+ validate.c
+)
+set(Source "")
+foreach(FILENAME ${SourceNames})
+ list(APPEND Source ${BENCHMARK_DIR}/src/${FILENAME})
+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
+ )
+ llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
+ ${BENCHMARK_DIR}/data/${run_type}/output/crafty.out
+ ${CMAKE_CURRENT_BINARY_DIR}/crafty.out
+ )
+endmacro()
+
+test_input(ref)
+test_input(train)
+test_input(test)
+
+llvm_multisource()
Added: test-suite/trunk/External/SPEC/CINT2000/197.parser/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT2000/197.parser/CMakeLists.txt?rev=255876&view=auto
==============================================================================
--- test-suite/trunk/External/SPEC/CINT2000/197.parser/CMakeLists.txt (added)
+++ test-suite/trunk/External/SPEC/CINT2000/197.parser/CMakeLists.txt Wed Dec 16 22:52:41 2015
@@ -0,0 +1,22 @@
+if(TARGET_OS STREQUAL "Darwin")
+ list(APPEND CPPFLAGS -D_ANSI_SOURCE=1)
+endif()
+
+macro(test_input run_type)
+ llvm_test_run(RUN_TYPE ${run_type}
+ 2.1.dict -batch
+ < ${BENCHMARK_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
+ )
+endmacro()
+
+test_input(ref)
+test_input(train)
+test_input(test)
+
+llvm_multisource()
Added: test-suite/trunk/External/SPEC/CINT2000/252.eon/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT2000/252.eon/CMakeLists.txt?rev=255876&view=auto
==============================================================================
--- test-suite/trunk/External/SPEC/CINT2000/252.eon/CMakeLists.txt (added)
+++ test-suite/trunk/External/SPEC/CINT2000/252.eon/CMakeLists.txt Wed Dec 16 22:52:41 2015
@@ -0,0 +1,188 @@
+list(APPEND CPPFLAGS -include errno.h -DHAS_ERRLIST -DUSE_STRERROR -DSPEC_STDCPP)
+if(ARCH STREQUAL "PowerPC")
+ list(APPEND CPPFLAGS -DFMAX_IS_DOUBLE)
+endif()
+list(APPEND CXXFLAGS -fno-exceptions -Wno-deprecated -fpermissive -stdlib=libstdc++)
+list(APPEND LDFLAGS -stdlib=libstdc++ -lm)
+list(APPEND LIBS -lm)
+include_directories(${BENCHMARK_DIR}/src)
+
+# There's more sourcefiles in the directory than necessary so enumerate the ones
+# we want.
+set(SourceNames
+ ggCoverageSolidTexture.cc
+ ggPathDielectricMaterial.cc
+ ggBox2.cc
+ ggBox3.cc
+ ggRasterSurfaceTexture.cc
+ ggJitterSample1.cc
+ ggNRooksSample2.cc
+ ggJitterSample2.cc
+ ggRGBFPixel.cc
+ ggRotatingPinholeCamera.cc
+ ggRandomSample2.cc
+ ggRandomSample3.cc
+ ggSolidNoise2.cc
+ ggSolidNoise3.cc
+ ggSolidTexture.cc
+ ggOakSolidTexture.cc
+ ggSpecularMaterial.cc
+ ggNA.cc
+ ggMaterial.cc
+ ggDiffuseMaterial.cc
+ ggDielectricMaterial.cc
+ ggConductorMaterial.cc
+ ggEdgeDiscrepancy.cc
+ ggPolishedMaterial.cc
+ ggFrameInterpolation.cc
+ ggQuaternion.cc
+ ggSpline.cc
+ ggONB2.cc
+ ggONB3.cc
+ ggFrame2.cc
+ ggFrame3.cc
+ ggHMatrix3.cc
+ ggSphere.cc
+ ggRGBE.cc
+ ggGamma.cc
+ ggBRDF.cc
+ ggDiffuseBRDF.cc
+ ggPhongBRDF.cc
+ ggPolishedBRDF.cc
+ ggCamera.cc
+ ggPinholeCamera.cc
+ ggThinLensCamera.cc
+ ggErr.cc
+ ggPixelFilter.cc
+ ggTrianglePixelFilter.cc
+ ggBoxPixelFilter.cc
+ ggFormat.cc
+ ggGeometry.cc
+ ggHAffineMatrix3.cc
+ ggHShearMatrix3.cc
+ ggHBoxMatrix3.cc
+ ggHPerspectiveMatrix3.cc
+ ggHTranslationMatrix3.cc
+ ggHRigidBodyMatrix3.cc
+ ggHRotationMatrix3.cc
+ ggHScaleMatrix3.cc
+ ggHPoint3.cc
+ ggPoint2.cc
+ ggPoint3.cc
+ ggOptics.cc
+ ggPlane.cc
+ ggPolygon.cc
+ ggGrayPixel_x.cc
+ ggRGBPixel_x.cc
+ ggRay2.cc
+ ggRay3.cc
+ ggBoardFloorSolidTexture.cc
+ ggVector2.cc
+ ggVector3.cc
+ ggString.cc
+ ggFineSpectrum.cc
+ ggSpectrum.cc
+ eon.cc
+ eonImageCalculator.cc
+ mrObjectRecord.cc
+ mrCoarsePixelRenderer.cc
+ mrIndirectPixelRenderer.cc
+ mrRushmeierPixelRenderer.cc
+ mrBruteForcePixelRenderer.cc
+ mrKajiyaPixelRenderer.cc
+ mrCookPixelRenderer.cc
+ mrGrid.cc
+ mrScene.cc
+ mrCamera.cc
+ mrTriangle.cc
+ mrFastTriangle.cc
+ mrPolygon.cc
+ mrXYDisk.cc
+ mrXZDisk.cc
+ mrYZDisk.cc
+ mrPhongAreaXYRectangleLuminaire.cc
+ mrPhongAreaXZRectangleLuminaire.cc
+ mrPhongAreaYZRectangleLuminaire.cc
+ mrEmitter.cc
+ mrImposter.cc
+ mrLinkedObjects.cc
+ mrBox.cc
+ mrXCylinder.cc
+ mrYCylinder.cc
+ mrZCylinder.cc
+ mrDiffuseAreaZCylinderLuminaire.cc
+ mrDiffuseCosineZCylinderLuminaire.cc
+ mrDiffuseVisibleAreaZCylinderLuminaire.cc
+ mrXEllipticalCylinder.cc
+ mrYEllipticalCylinder.cc
+ mrZEllipticalCylinder.cc
+ mrSpotAreaXYDiskLuminaire.cc
+ mrDiffuseAreaXYRectangleLuminaire.cc
+ mrDiffuseAreaXZRectangleLuminaire.cc
+ mrDiffuseAreaYZRectangleLuminaire.cc
+ mrSurfaceList.cc
+ mrDiffuseAreaTriangleLuminaire.cc
+ mrDiffuseAreaSphereLuminaire.cc
+ mrDiffuseCosineSphereLuminaire.cc
+ mrDiffuseSolidAngleSphereLuminaire.cc
+ mrShellLuminaire.cc
+ mrInstance.cc
+ mrMaterial.cc
+ mrPhongAreaTriangleLuminaire.cc
+ mrSolidTexture.cc
+ mrSphere.cc
+ mrSurface.cc
+ mrSurfaceTexture.cc
+ mrXYRectangle.cc
+ mrXZRectangle.cc
+ mrYZRectangle.cc
+ myrand.cc
+)
+set(Source "")
+foreach(FILENAME ${SourceNames})
+ list(APPEND Source ${BENCHMARK_DIR}/src/${FILENAME})
+endforeach()
+
+macro(test_input run_type)
+ set(INPUT_DIR ${BENCHMARK_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
+ ppm
+ ${CMAKE_CURRENT_BINARY_DIR}/pixels_out.cook
+ )
+ llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${INPUT_DIR}
+ chair.control.rushmeier chair.camera chair.surfaces
+ ${CMAKE_CURRENT_BINARY_DIR}/chair.rushmeier.ppm
+ ppm
+ ${CMAKE_CURRENT_BINARY_DIR}/pixels_out.rushmeier
+ )
+ llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${INPUT_DIR}
+ chair.control.kajiya chair.camera chair.surfaces
+ ${CMAKE_CURRENT_BINARY_DIR}/chair.kajiya.ppm
+ ppm
+ ${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} ${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} ${FPCMP}
+ -a 0.005
+ ${BENCHMARK_DIR}/data/${run_type}/output/pixels_out.kajiya
+ ${CMAKE_CURRENT_BINARY_DIR}/pixels_out.kajiya
+ )
+endmacro()
+
+test_input(ref)
+test_input(train)
+test_input(test)
+
+llvm_multisource()
Added: test-suite/trunk/External/SPEC/CINT2000/253.perlbmk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT2000/253.perlbmk/CMakeLists.txt?rev=255876&view=auto
==============================================================================
--- test-suite/trunk/External/SPEC/CINT2000/253.perlbmk/CMakeLists.txt (added)
+++ test-suite/trunk/External/SPEC/CINT2000/253.perlbmk/CMakeLists.txt Wed Dec 16 22:52:41 2015
@@ -0,0 +1,159 @@
+set(SourceNames
+ av.c
+ byterun.c
+ deb.c
+ doio.c
+ doop.c
+ dump.c
+ ebcdic.c
+ fake_dyna.c
+ globals.c
+ gv.c
+ hv.c
+ mg.c
+ op.c
+ perl.c
+ perlio.c
+ perly.c
+ pp.c
+ pp_ctl.c
+ pp_hot.c
+ pp_sys.c
+ regcomp.c
+ regexec.c
+ run.c
+ scope.c
+ sv.c
+ taint.c
+ toke.c
+ universal.c
+ util.c
+ MD5.c
+ md5c.c
+)
+if(TARGET_OS STREQUAL "Win32")
+ list(APPEND SourceNames nt_perlmain.c win32.c win32sck.c perllib.c)
+ list(APPEND CPPFLAGS -DSPEC_CPU2000_NTOS -DWIN32 -D_CONSOLE)
+ include_directories(${BENCHMARK_DIR}/src)
+ include_directories(${BENCHMARK_DIR}/src/win32)
+else()
+ list(APPEND SourceNames unix_perlmain.c)
+ list(APPEND CPPFLAGS -DSPEC_CPU2000_LINUX)
+endif()
+
+include(TestBigEndian)
+test_big_endian(IS_BIGENDIAN)
+if(IS_BIGENDIAN)
+ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ list(APPEND CPPFLAGS -DBYTEORDER=0x87654321)
+ else()
+ list(APPEND CPPFLAGS -DBYTEORDER=0x4321)
+ endif()
+else()
+ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ list(APPEND CPPFLAGS -DBYTEORDER=0x12345678)
+ else()
+ list(APPEND CPPFLAGS -DBYTEORDER=0x1234)
+ endif()
+endif()
+
+set(Source "")
+foreach(FILENAME ${SourceNames})
+ list(APPEND Source ${BENCHMARK_DIR}/src/${FILENAME})
+endforeach()
+
+macro(test_input run_type perlscript output)
+ llvm_test_run(RUN_TYPE ${run_type}
+ -I${BENCHMARK_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}
+ )
+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
+)
+test_input(train
+ ${BENCHMARK_DIR}/data/all/input/perfect.pl
+ b.3.out
+ b 3
+ WORKDIR ${BENCHMARK_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
+)
+
+test_input(ref
+ ${BENCHMARK_DIR}/data/ref/input/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
+ 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
+ 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
+ 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
+)
+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
+)
+test_input(ref
+ ${BENCHMARK_DIR}/data/ref/input/makerand.pl
+ makerand.out
+ WORKDIR ${BENCHMARK_DIR}/data/all/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
+ WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/test/input
+ )
+endforeach()
+
+llvm_multisource()
+
+include(CopyDir)
+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(253.perlbmk ${CMAKE_CURRENT_BINARY_DIR}/data/ref/input
+ ${BENCHMARK_DIR}/data/all/input
+ ${BENCHMARK_DIR}/data/ref/input
+)
Added: test-suite/trunk/External/SPEC/CINT2000/254.gap/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT2000/254.gap/CMakeLists.txt?rev=255876&view=auto
==============================================================================
--- test-suite/trunk/External/SPEC/CINT2000/254.gap/CMakeLists.txt (added)
+++ test-suite/trunk/External/SPEC/CINT2000/254.gap/CMakeLists.txt Wed Dec 16 22:52:41 2015
@@ -0,0 +1,31 @@
+# We need to include unistd.h because something with Fedora Core 1 is broken,
+# and we need the sysconf() macros.
+list(APPEND CPPFLAGS -include unistd.h -DSYS_HAS_CALLOC_PROTO -DSYS_HAS_IOCTL_PROTO -DSYS_HAS_TIME_PROTO -DSYS_HAS_READ_PROTO)
+
+if(TARGET_OS STREQUAL "Darwin")
+ list(APPEND CPPFLAGS -DSYS_IS_BSD)
+else()
+ list(APPEND CPPFLAGS -DSYS_IS_USG)
+endif()
+
+# 254.gap relies on signed arithmetic overflow being well-defined.
+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_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
+ )
+endmacro()
+
+test_input(ref 192M)
+test_input(train 128M)
+test_input(test 64M)
+
+llvm_multisource()
Added: test-suite/trunk/External/SPEC/CINT2000/255.vortex/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT2000/255.vortex/CMakeLists.txt?rev=255876&view=auto
==============================================================================
--- test-suite/trunk/External/SPEC/CINT2000/255.vortex/CMakeLists.txt (added)
+++ test-suite/trunk/External/SPEC/CINT2000/255.vortex/CMakeLists.txt Wed Dec 16 22:52:41 2015
@@ -0,0 +1,31 @@
+macro(test_input run_type input outfile)
+ llvm_test_run(RUN_TYPE ${run_type}
+ 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}
+ )
+endmacro()
+
+include(TestBigEndian)
+test_big_endian(IS_BIGENDIAN)
+if(IS_BIGENDIAN)
+ set(endianname "bendian")
+else()
+ set(endianname "lendian")
+endif()
+
+test_input(test ${endianname}.raw vortex.out)
+test_input(train ${endianname}.raw vortex.out)
+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_multisource()
+
+# The benchmark writes the output where the input files are, so we have to
+# copy the data over.
+include(CopyDir)
+llvm_copy_dir(255.vortex ${CMAKE_CURRENT_BINARY_DIR}/data ${BENCHMARK_DIR}/data)
Added: test-suite/trunk/External/SPEC/CINT2000/256.bzip2/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT2000/256.bzip2/CMakeLists.txt?rev=255876&view=auto
==============================================================================
--- test-suite/trunk/External/SPEC/CINT2000/256.bzip2/CMakeLists.txt (added)
+++ test-suite/trunk/External/SPEC/CINT2000/256.bzip2/CMakeLists.txt Wed Dec 16 22:52:41 2015
@@ -0,0 +1,19 @@
+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_verify(RUN_TYPE ${run_type} ${FPCMP}
+ ${BENCHMARK_DIR}/data/${run_type}/output/${filename}.out
+ ${CMAKE_CURRENT_BINARY_DIR}/${filename}.out
+ )
+endmacro()
+
+test_input(train input.compressed 8)
+test_input(test input.random 2)
+test_input(ref input.source 58)
+test_input(ref input.graphic 58)
+test_input(ref input.program 58)
+
+llvm_multisource()
Added: test-suite/trunk/External/SPEC/CINT2000/300.twolf/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT2000/300.twolf/CMakeLists.txt?rev=255876&view=auto
==============================================================================
--- test-suite/trunk/External/SPEC/CINT2000/300.twolf/CMakeLists.txt (added)
+++ test-suite/trunk/External/SPEC/CINT2000/300.twolf/CMakeLists.txt Wed Dec 16 22:52:41 2015
@@ -0,0 +1,27 @@
+list(APPEND LDFLAGS -lm)
+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
+ )
+ 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}
+ )
+ endforeach()
+endmacro()
+
+test_input(test)
+test_input(train)
+test_input(ref)
+
+llvm_multisource()
+
+# The benchmark writes the output where the input files are, so we have to
+# copy the data over.
+include(CopyDir)
+llvm_copy_dir(300.twolf ${CMAKE_CURRENT_BINARY_DIR}/data ${BENCHMARK_DIR}/data)
Added: test-suite/trunk/External/SPEC/CINT2000/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT2000/CMakeLists.txt?rev=255876&view=auto
==============================================================================
--- test-suite/trunk/External/SPEC/CINT2000/CMakeLists.txt (added)
+++ test-suite/trunk/External/SPEC/CINT2000/CMakeLists.txt Wed Dec 16 22:52:41 2015
@@ -0,0 +1,31 @@
+list(APPEND CPPFLAGS -DSPEC_CPU2000)
+if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ list(APPEND CPPFLAGS -DSPEC_CPU2000_LP64)
+endif()
+
+macro(cint2000_subdir)
+ foreach(BENCHMARK ${ARGN})
+ set(BENCHMARK_DIR ${TEST_SUITE_SPEC2000_ROOT}/benchspec/CINT2000/${BENCHMARK})
+ set(PROG ${BENCHMARK})
+ file(GLOB Source ${BENCHMARK_DIR}/src/*.c ${BENCHMARK_DIR}/src/*.cpp)
+ if(NOT DEFINED TEST_SUITE_RUN_TYPE)
+ set(TEST_SUITE_RUN_TYPE train)
+ endif()
+ llvm_add_subdirectories(${BENCHMARK})
+ endforeach()
+endmacro()
+
+cint2000_subdir(
+ 164.gzip
+ 175.vpr
+ 176.gcc
+ 181.mcf
+ 186.crafty
+ 197.parser
+ 252.eon
+ 253.perlbmk
+ 254.gap
+ 255.vortex
+ 256.bzip2
+ 300.twolf
+)
Added: test-suite/trunk/External/SPEC/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CMakeLists.txt?rev=255876&view=auto
==============================================================================
--- test-suite/trunk/External/SPEC/CMakeLists.txt (added)
+++ test-suite/trunk/External/SPEC/CMakeLists.txt Wed Dec 16 22:52:41 2015
@@ -0,0 +1,12 @@
+if(TARGET_OS STREQUAL "Darwin")
+ # Work around built in -Werror=implicit-function-declaration default on iOS
+ list(APPEND CPPFLAGS -Wno-implicit-function-declaration)
+endif()
+
+llvm_externals_find(TEST_SUITE_SPEC2000_ROOT "speccpu2000" "SPEC CPU2000")
+
+if(TEST_SUITE_SPEC2000_ROOT)
+ llvm_add_subdirectories(CFP2000 CINT2000)
+endif()
+
+file(COPY lit.local.cfg DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
Added: test-suite/trunk/External/SPEC/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/lit.local.cfg?rev=255876&view=auto
==============================================================================
--- test-suite/trunk/External/SPEC/lit.local.cfg (added)
+++ test-suite/trunk/External/SPEC/lit.local.cfg Wed Dec 16 22:52:41 2015
@@ -0,0 +1 @@
+config.traditional_output = False
Added: test-suite/trunk/cmake/modules/CopyDir.cmake
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/cmake/modules/CopyDir.cmake?rev=255876&view=auto
==============================================================================
--- test-suite/trunk/cmake/modules/CopyDir.cmake (added)
+++ test-suite/trunk/cmake/modules/CopyDir.cmake Wed Dec 16 22:52:41 2015
@@ -0,0 +1,10 @@
+macro(llvm_copy_dir target to) # args: dir0 dir1 ...
+ set(COPY_COMMAND "")
+ foreach(dir ${ARGN})
+ set(COPY_COMMAND ${COPY_COMMAND} COMMAND ${CMAKE_COMMAND} -E copy_directory "${dir}" "${to}")
+ endforeach()
+ add_custom_command(
+ TARGET ${target} POST_BUILD
+ ${COPY_COMMAND}
+ )
+endmacro()
Modified: test-suite/trunk/cmake/modules/SingleMultiSource.cmake
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/cmake/modules/SingleMultiSource.cmake?rev=255876&r1=255875&r2=255876&view=diff
==============================================================================
--- test-suite/trunk/cmake/modules/SingleMultiSource.cmake (original)
+++ test-suite/trunk/cmake/modules/SingleMultiSource.cmake Wed Dec 16 22:52:41 2015
@@ -202,7 +202,7 @@ macro(llvm_test_run)
# ARGS_UNPARSED_ARGUMENTS is a semicolon-separated list. Change it into a
# whitespace-separated string.
string(REPLACE ";" " " JOINED_ARGUMENTS "${ARGS_UNPARSED_ARGUMENTS}")
- if(NOT DEFINED ARGS_RUN_TYPE OR "${ARGS_RUN_TYPE}" STREQUAL "${RUN_TYPE}")
+ if(NOT DEFINED ARGS_RUN_TYPE OR "${ARGS_RUN_TYPE}" STREQUAL "${TEST_SUITE_RUN_TYPE}")
set(TESTSCRIPT "${TESTSCRIPT}RUN: ${ARGS_EXECUTABLE} ${JOINED_ARGUMENTS}\n")
endif()
endmacro()
@@ -215,7 +215,7 @@ macro(llvm_test_verify)
# ARGS_UNPARSED_ARGUMENTS is a semicolon-separated list. Change it into a
# whitespace-separated string.
string(REPLACE ";" " " JOINED_ARGUMENTS "${ARGS_UNPARSED_ARGUMENTS}")
- if(NOT DEFINED ARGS_RUN_TYPE OR "${ARGS_RUN_TYPE}" STREQUAL "${RUN_TYPE}")
+ if(NOT DEFINED ARGS_RUN_TYPE OR "${ARGS_RUN_TYPE}" STREQUAL "${TEST_SUITE_RUN_TYPE}")
set(TESTSCRIPT "${TESTSCRIPT}VERIFY: ${JOINED_ARGUMENTS}\n")
endif()
endmacro()
More information about the llvm-commits
mailing list