Index: MultiSource/Applications/ClamAV/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Applications/ClamAV/lit.local.cfg @@ -0,0 +1,94 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +import glob + +# xcore does not support many file & dir operations +if config.target.startswith('xcore'): + config.unsupported = True + +input = """%S/inputs/clam.cab + %S/inputs/clamdoc.tar.gz + %S/inputs/clam.exe + %S/inputs/clam.exe.bz2 + %S/inputs/clam-v2.rar + %S/inputs/clam-v3.rar + %S/inputs/clam.zip + %S/inputs/README + %S/inputs/rtf-test/Doc11.rtf + %S/inputs/rtf-test/Doc1.rtf + %S/inputs/rtf-test/Doc22.rtf + %S/inputs/rtf-test/Doc2.rtf + %S/inputs/rtf-test/doc3.rtf + %S/inputs/rtf-test/docCLAMexe.rtf + %S/inputs/rtf-test/rtf1.rtf + %S/inputs/rtf-test/rtf-novirus.rtf""" +input = [i.strip() for i in input.split('\n')] + +config.sources = filter(lambda x: not x.endswith('engine.c') and '/test_' not in x, + glob.glob(os.path.dirname(__file__)+'/*.c')) + +config.cflags += ' -DHAVE_CONFIG_H -I. -DDONT_LOCK_DBDIRS -lz' +config.exec_args += ' --debug --exclude-dir .svn --verbose -d%S/dbdir -r ' + ' '.join(input) + ' 2>&1' + +# for ClamAV these are in clamav-config.h, but since we can't run configure, we have to define them here + +# -- OS macros -- +# It is especially important to get this correctly defined for windows. +if config.os == 'darwin': + config.cflags += ' -DC_DARWIN' +elif config.os == 'aix': + config.cflags += ' -DC_AIX' +elif config.os == 'irix': + config.cflags += ' -DC_IRIX' +elif config.os == 'cygwin': + config.cflags += ' -DC_CYGWIN' +elif 'bsd' in config.os: + config.cflags += ' -DC_BSD' +elif config.os == 'hpux': + config.cflags += ' -DC_HPUX' +elif config.os == 'interix': + config.cflags += ' -DC_INTERIX' +elif 'win' in config.os or config.os == 'mingw': + config.cflags += ' -DC_WINDOWS' +elif config.os == 'linux': + config.cflags += ' -DC_LINUX' + +# -- except ARM all arches have WORDS_BIGENDIAN same as ENDIAN. +# for ARM we'd need a runtime autoconf check to detect. +# Only affects autoit.c, not defining this macro will partially disable it. + +if 'arm' not in config.target and 'thumb' not in config.target: + if config.endianness == 'little': + config.cflags += ' -DFPU_WORDS_BIGENDIAN=0' + else: + config.cflags += ' -DFPU_WORDS_BIGENDIAN=1' + +# -- endianness detection -- +# It is important to get this correctly, especially for Sparc. +# If arch is little endian the code possibly does unaligned accesses, that would +# cause a SIGBUS on Sparc. + +if config.endianness == 'little': + config.cflags += ' -DWORDS_BIGENDIAN=0' +else: + config.cflags += ' -DWORDS_BIGENDIAN=1' + +# TODO: Make sure fpcmp isn't called? + +# TODO: Make work on JIT +# ifeq ($(TARGET_OS),Darwin) +# EXTRA_LLIFLAGS += -load=libz.dylib +# else +# ifeq ($(TARGET_OS),Linux) +# EXTRA_LLIFLAGS += -load=libz.so.1 +# else +# EXTRA_LLIFLAGS += -load=libz +# endif +# endif Index: MultiSource/Applications/SIBsim4/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Applications/SIBsim4/lit.local.cfg @@ -0,0 +1,15 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Applications/SIBsim4/Makefile + +if config.small_problem_size: + config.exec_args += ' -A4 %S/x-small.fa %S/y-small.fa' +else: + config.exec_args += ' -A4 %S/x.fa %S/y.fa' Index: MultiSource/Applications/lemon/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Applications/lemon/lit.local.cfg @@ -0,0 +1,15 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Applications/lemon/Makefile + +config.sources = ['lemon.c'] +config.exec_args += ' %S/parse.y %S/example1.y %S/example2.y %S/example3.y %S/example4.y %S/example5.y %S/lighttpd_configparser.y %S/lighttpd_mod_ssi_exprparser.y %S/wireshark_dtd_grammar.lemon %S/wireshark_grammar.lemon %S/wireshark_mate_grammar.lemon %S/xapian_queryparser.lemony %S/ecmascript.y 2>&1' + +config.hash_output = True Index: MultiSource/Applications/lua/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Applications/lua/lit.local.cfg @@ -0,0 +1,24 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Applications/lua/Makefile +import os, glob + +config.cflags += ' -DLUA_USE_POSIX' +config.cxxflags += ' -DLUA_USE_POSIX' +config.exec_args += ' alltests.lua "\&1' +config.sources = filter(lambda x: not x.endswith('luac.c'), + glob.glob(os.path.dirname(__file__)+'/*.c')) +#config.ignore_return_code = True +config.hash_output = True + +if config.small_problem_size: + config.unsupported = True + +config.preexec = ['cd %S; %S/generate_inputs.sh'] Index: MultiSource/Applications/minisat/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Applications/minisat/lit.local.cfg @@ -0,0 +1,27 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +config.cflags += ' -DNDEBUG' + +if config.small_problem_size: + config.exec_args += ' -verbosity=0 %S/small.cnf' +elif config.large_problem_size: + config.exec_args += ' -verbosity=0 %S/long.cnf' +else: + config.exec_args += ' -verbosity=0 %S/short.cnf' + +config.abstol = 0.1 +config.ignore_return_code = True + +# TODO: Make this work on the JIT +#ifeq ($(TARGET_OS),Darwin) +#SHLIBEXT := .dylib +#endif +# +#JIT_OPTS += -load libz$(SHLIBEXT) Index: MultiSource/Applications/sqlite3/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Applications/sqlite3/lit.local.cfg @@ -0,0 +1,27 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Applications/sqlite3/Makefile + +config.cflags += ' -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.' +config.cxxflags += ' -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.' +config.exec_args += ' :memory: < %T/commands' + +if config.small_problem_size: + config.preexec = ['cd %T; tclsh %S/smalltest.tcl'] +else: + config.preexec = ['cd %T; tclsh %S/speedtest.tcl'] + +sqls = [r'.read %%T/test%d.sql' % i for i in range(1,15)] +config.preexec += ['echo -e ' + '\\\\n'.join(sqls) + ' > %T/commands'] +config.abstol = 1.0e-9 + +# xcore does not support many file & dir operations +if config.target.startswith('xcore'): + config.unsupported = True Index: MultiSource/Applications/viterbi/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Applications/viterbi/lit.local.cfg @@ -0,0 +1,13 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Applications/viterbi/Makefile + +config.cflags += ' -I%S -DPROJ_SRC_DIR=\\"%S\\"' +config.cxxflags += ' -I%S -DPROJ_SRC_DIR=\\"%S\\"' Index: MultiSource/Benchmarks/BitBench/drop3/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/BitBench/drop3/lit.local.cfg @@ -0,0 +1,12 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/BitBench/drop3/Makefile + +config.exec_args += ' %S/input-file' Index: MultiSource/Benchmarks/BitBench/five11/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/BitBench/five11/lit.local.cfg @@ -0,0 +1,12 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/BitBench/five11/Makefile + +config.exec_args += ' %S/input-file' Index: MultiSource/Benchmarks/BitBench/uudecode/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/BitBench/uudecode/lit.local.cfg @@ -0,0 +1,12 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/BitBench/uudecode/Makefile + +config.exec_args += ' %S/input-file' Index: MultiSource/Benchmarks/BitBench/uuencode/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/BitBench/uuencode/lit.local.cfg @@ -0,0 +1,12 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/BitBench/uuencode/Makefile + +config.exec_args += ' %S/uuencode.c' Index: MultiSource/Benchmarks/Bullet/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/Bullet/lit.local.cfg @@ -0,0 +1,13 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/Bullet/Makefile + +config.cflags += ' -I%S/include -DNO_TIME' +config.cxxflags += ' -I%S/include -DNO_TIME' Index: MultiSource/Benchmarks/FreeBench/analyzer/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/FreeBench/analyzer/lit.local.cfg @@ -0,0 +1,18 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/FreeBench/analyzer/Makefile + +config.cflags += ' -DVERSION=\'"1.00"\' -DCOMPDATE="\\"today\\"" -DCFLAGS=\'""\' -DHOSTNAME="\\"thishost\\""' +config.cxxflags += ' -DVERSION=\'"1.00"\' -DCOMPDATE="\\"today\\"" -DCFLAGS=\'""\' -DHOSTNAME="\\"thishost\\""' +if config.large_problem_size: + config.exec_args += ' %S/ref.in' +else: + config.exec_args += ' %S/test.in' + Index: MultiSource/Benchmarks/FreeBench/distray/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/FreeBench/distray/lit.local.cfg @@ -0,0 +1,18 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/FreeBench/distray/Makefile + +config.cflags += ' -DVERSION=\'"1.00"\' -DCOMPDATE="\\"today\\"" -DCFLAGS=\'""\' -DHOSTNAME="\\"thishost\\""' +config.cxxflags += ' -DVERSION=\'"1.00"\' -DCOMPDATE="\\"today\\"" -DCFLAGS=\'""\' -DHOSTNAME="\\"thishost\\""' +if config.large_problem_size: + config.exec_args += ' %S/ref.in' +else: + config.exec_args += ' %S/test.in' +config.hash_output = True Index: MultiSource/Benchmarks/FreeBench/fourinarow/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/FreeBench/fourinarow/lit.local.cfg @@ -0,0 +1,17 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/FreeBench/fourinarow/Makefile + +config.cflags += ' -DVERSION=\'"1.00"\' -DCOMPDATE="\\"today\\"" -DCFLAGS=\'""\' -DHOSTNAME="\\"thishost\\""' +config.cxxflags += ' -DVERSION=\'"1.00"\' -DCOMPDATE="\\"today\\"" -DCFLAGS=\'""\' -DHOSTNAME="\\"thishost\\""' +if config.large_problem_size: + config.exec_args += ' %S/ref.in' +else: + config.exec_args += ' %S/test.in' Index: MultiSource/Benchmarks/FreeBench/mason/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/FreeBench/mason/lit.local.cfg @@ -0,0 +1,17 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/FreeBench/mason/Makefile + +config.cflags += ' -DVERSION='"1.00"' -DCOMPDATE="\\"today\\"" -DCFLAGS=\'""\' -DHOSTNAME="\\"thishost\\""' +config.cxxflags += ' -DVERSION='"1.00"' -DCOMPDATE="\\"today\\"" -DCFLAGS=\'""\' -DHOSTNAME="\\"thishost\\""' +if config.large_problem_size: + config.exec_args += ' %S/ref.in' +else: + config.exec_args += ' %S/test.in' Index: MultiSource/Benchmarks/FreeBench/neural/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/FreeBench/neural/lit.local.cfg @@ -0,0 +1,17 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/FreeBench/neural/Makefile + +config.cflags += ' -DVERSION=\'"1.00"\' -DCOMPDATE="\\"today\\"" -DCFLAGS=\'""\' -DHOSTNAME="\\"thishost\\""' +config.cxxflags += ' -DVERSION='"1.00"' -DCOMPDATE="\\"today\\"" -DCFLAGS=\'""\' -DHOSTNAME="\\"thishost\\""' +if config.large_problem_size: + config.exec_args += ' %S/ref.in' +else: + config.exec_args += ' %S/test.in' Index: MultiSource/Benchmarks/FreeBench/pcompress2/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/FreeBench/pcompress2/lit.local.cfg @@ -0,0 +1,20 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +config.cflags += ' -DVERSION=\'"1.00"\' -DCOMPDATE="\\"today\\"" -DCFLAGS=\'""\' -DHOSTNAME="\\"thishost\\""' + +if config.large_problem_size: + config.exec_args += ' %T/ref.in' +else: + config.exec_args += ' %T/test.in' + +# The pcompress2 benchmark wants to write an output file adjacent to the input +# file. In order to avoid writing back into the source directory, we copy the +# input file into the output directory. +config.preexec = ['cp %S/*.in %T'] Index: MultiSource/Benchmarks/FreeBench/pifft/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/FreeBench/pifft/lit.local.cfg @@ -0,0 +1,17 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/FreeBench/pifft/Makefile + +config.cflags += ' -DVERSION=\'"1.00"\' -DCOMPDATE="\\"today\\"" -DCFLAGS=\'""\' -DHOSTNAME="\\"thishost\\""' +config.cxxflags += ' -DVERSION=\'"1.00"\' -DCOMPDATE="\\"today\\"" -DCFLAGS=\'""\' -DHOSTNAME="\\"thishost\\""' +if config.large_problem_size: + config.exec_args += ' %S/ref.in' +else: + config.exec_args += ' %S/test.in' Index: MultiSource/Benchmarks/MallocBench/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/MallocBench/lit.local.cfg @@ -0,0 +1,10 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +config.compare = False \ No newline at end of file Index: MultiSource/Benchmarks/MiBench/automotive-basicmath/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/MiBench/automotive-basicmath/lit.local.cfg @@ -0,0 +1,10 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +config.hash_output = True Index: MultiSource/Benchmarks/MiBench/automotive-bitcount/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/MiBench/automotive-bitcount/lit.local.cfg @@ -0,0 +1,12 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/MiBench/automotive-bitcount/Makefile + +config.exec_args += ' 1125000' Index: MultiSource/Benchmarks/MiBench/automotive-susan/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/MiBench/automotive-susan/lit.local.cfg @@ -0,0 +1,15 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/MiBench/automotive-susan/Makefile + +config.exec_args += ' %S/input_large.pgm Output/output_large.smoothing.pgm -s' +config.hash_output = True +config.hash_output = True +config.hash_output = True Index: MultiSource/Benchmarks/MiBench/consumer-jpeg/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/MiBench/consumer-jpeg/lit.local.cfg @@ -0,0 +1,12 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/MiBench/consumer-jpeg/Makefile + +config.exec_args += ' -dct int -ppm -outfile Output/output_large_decode.ppm %S/input_large.jpg' Index: MultiSource/Benchmarks/MiBench/consumer-lame/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/MiBench/consumer-lame/lit.local.cfg @@ -0,0 +1,18 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/MiBench/consumer-lame/Makefile + +config.cflags += ' -DHAVEMPGLIB -DLAMEPARSE -DNDEBUG -D__NO_MATH_INLINES -O -DLAMESNDFILE' +config.cxxflags += ' -DHAVEMPGLIB -DLAMEPARSE -DNDEBUG -D__NO_MATH_INLINES -O -DLAMESNDFILE' +config.exec_args += ' -S %S/large.wav Output/output_large.mp3' + +# XCore does not support sockets or sgtty +if config.target.startswith('xcore'): + config.unsupported = True Index: MultiSource/Benchmarks/MiBench/consumer-typeset/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/MiBench/consumer-typeset/lit.local.cfg @@ -0,0 +1,18 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +config.cflags += ' -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' +config.exec_args += ' -x -I %S/data/include -D %S/data/data -F %S/data/font -C %S/data/maps -H %T/data/hyph %S/large.lout' + +# The consumer-typeset benchmark wants to write output files (caches derived +# from the inputs, I think) into the same dir as the hyphenation files. In order +# to avoid writing back into the source directory, we copy the hyphenation files +# into the output directory. +config.preexec = ['mkdir -p %T/data/', + 'cp -r %S/data/hyph %T/data'] Index: MultiSource/Benchmarks/MiBench/network-dijkstra/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/MiBench/network-dijkstra/lit.local.cfg @@ -0,0 +1,12 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/MiBench/network-dijkstra/Makefile + +config.exec_args += ' %S/input.dat' Index: MultiSource/Benchmarks/MiBench/network-patricia/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/MiBench/network-patricia/lit.local.cfg @@ -0,0 +1,15 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/MiBench/network-patricia/Makefile + +config.exec_args += ' %S/large.udp' +config.hash_output = True +config.hash_output = True +config.hash_output = True Index: MultiSource/Benchmarks/MiBench/office-ispell/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/MiBench/office-ispell/lit.local.cfg @@ -0,0 +1,26 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/MiBench/office-ispell/Makefile + +config.cflags += ' -Dconst=' +config.cxxflags += ' -Dconst=' +config.exec_args += ' -a -d %S/americanmed+ < %S/large.txt' + +# FIXME: The expected output is "Illegal format hash table\n exit 1" !!! +config.ignore_return_code = True + +# FIXME: This is a hack, office-ispell requires termio which is less likely to +# be available on an embedded target. We should have configure support for this. +if 'arm' in config.target or 'thumb' in config.target: + config.unsupported = True + +# XCore does not support sockets or sgtty +if config.target.startswith('xcore'): + config.unsupported = True Index: MultiSource/Benchmarks/MiBench/security-blowfish/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/MiBench/security-blowfish/lit.local.cfg @@ -0,0 +1,12 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/MiBench/security-blowfish/Makefile + +config.exec_args += ' print_test_data' Index: MultiSource/Benchmarks/MiBench/security-rijndael/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/MiBench/security-rijndael/lit.local.cfg @@ -0,0 +1,15 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/MiBench/security-rijndael/Makefile + +config.exec_args += ' %S/output_large.enc Output/output_large.dec d 1234567890abcdeffedcba09876543211234567890abcdeffedcba0987654321' +config.hash_output = True +config.hash_output = True +config.hash_output = True Index: MultiSource/Benchmarks/MiBench/security-sha/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/MiBench/security-sha/lit.local.cfg @@ -0,0 +1,12 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/MiBench/security-sha/Makefile + +config.exec_args += ' %S/input_large.asc' Index: MultiSource/Benchmarks/MiBench/telecomm-CRC32/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/MiBench/telecomm-CRC32/lit.local.cfg @@ -0,0 +1,12 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/MiBench/telecomm-CRC32/Makefile + +config.exec_args += ' %S/large.pcm' Index: MultiSource/Benchmarks/MiBench/telecomm-FFT/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/MiBench/telecomm-FFT/lit.local.cfg @@ -0,0 +1,15 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/MiBench/telecomm-FFT/Makefile + +config.exec_args += ' 8 32768 -i' +config.hash_output = True +config.hash_output = True +config.hash_output = True Index: MultiSource/Benchmarks/MiBench/telecomm-adpcm/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/MiBench/telecomm-adpcm/lit.local.cfg @@ -0,0 +1,17 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/MiBench/telecomm-adpcm/Makefile + +# FIXME: The reference output is what is produced if this test is run with no input at al +# (piped from /dev/null). If we give it the actual input, we get a completely different +# (and sane looking) output. Disabling for now until this is fixed. +config.unsupported = True + +config.exec_args += ' < %S/large.adpcm' Index: MultiSource/Benchmarks/MiBench/telecomm-gsm/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/MiBench/telecomm-gsm/lit.local.cfg @@ -0,0 +1,17 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/MiBench/telecomm-gsm/Makefile + +config.cflags += ' -DSTUPID_COMPILER -DNeedFunctionPrototypes=1 -DSASR' +config.cxxflags += ' -DSTUPID_COMPILER -DNeedFunctionPrototypes=1 -DSASR' +config.exec_args += ' -fps -c %S/large.au' +config.hash_output = True +config.hash_output = True +config.hash_output = True Index: MultiSource/Benchmarks/NPB-serial/dc/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/NPB-serial/dc/lit.local.cfg @@ -0,0 +1,17 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/NPB-serial/dc/Makefile + +config.exec_args += ' 10000000 ADC.par' +if config.small_problem_size: + config.cflags += ' -DSMALL_PROBLEM_SIZE' + config.cxxflags += ' -DSMALL_PROBLEM_SIZE' + +config.compare = False \ No newline at end of file Index: MultiSource/Benchmarks/NPB-serial/is/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/NPB-serial/is/lit.local.cfg @@ -0,0 +1,14 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/NPB-serial/is/Makefile + +if config.small_problem_size: + config.cflags += ' -DSMALL_PROBLEM_SIZE' + config.cxxflags += ' -DSMALL_PROBLEM_SIZE' Index: MultiSource/Benchmarks/PAQ8p/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/PAQ8p/lit.local.cfg @@ -0,0 +1,17 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/PAQ8p/Makefile + +config.cflags += ' -DNOASM -DLLVM' +config.cxxflags += ' -DNOASM -DLLVM' +if config.small_problem_size: + config.exec_args += ' -1 %S/small.in' +else: + config.exec_args += ' -4 %S/file1.in' Index: MultiSource/Benchmarks/Prolangs-C++/city/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/Prolangs-C++/city/lit.local.cfg @@ -0,0 +1,10 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +config.cxxflags += ' -I%S' \ No newline at end of file Index: MultiSource/Benchmarks/Prolangs-C++/employ/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/Prolangs-C++/employ/lit.local.cfg @@ -0,0 +1,15 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/Prolangs-C++/employ/Makefile + +config.exec_args += ' 400 < %S/input.txt' +config.hash_output = True +config.hash_output = True +config.hash_output = True Index: MultiSource/Benchmarks/Prolangs-C/agrep/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/Prolangs-C/agrep/lit.local.cfg @@ -0,0 +1,15 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/Prolangs-C/agrep/Makefile + +config.exec_args += ' -2 int %S/InstructionCombining.cpp.txt' +config.hash_output = True +config.hash_output = True +config.hash_output = True Index: MultiSource/Benchmarks/Prolangs-C/archie-client/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/Prolangs-C/archie-client/lit.local.cfg @@ -0,0 +1,18 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# TODO: This test was enabled only if HAVE_RE_COMP was set. +config.unsupported = True + +if config.os == 'sunos': + config.cflags += '-lsocket -lnsl' + +# xcore does not support sockets or forking (popen) +if config.target.startswith('alpha'): + config.unsupported = True \ No newline at end of file Index: MultiSource/Benchmarks/Prolangs-C/bison/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/Prolangs-C/bison/lit.local.cfg @@ -0,0 +1,20 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/Prolangs-C/bison/Makefile + +config.exec_args += ' %S/parse.y.in -v 2>/dev/null' + +# Disable bison due to insane running times of bison.native +if config.target.startswith('sparc'): + config.unsupported = True + +# The output of this benchmark differs depending on whether you're redirecting it +# or piping it... :( +config.compare = False \ No newline at end of file Index: MultiSource/Benchmarks/Prolangs-C/cdecl/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/Prolangs-C/cdecl/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +config.cflags += ' -std=gnu89' +config.exec_args += ' < %S/testset' Index: MultiSource/Benchmarks/Prolangs-C/football/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/Prolangs-C/football/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# FIXME: This test just prints out usage! +config.ignore_return_code = True Index: MultiSource/Benchmarks/Prolangs-C/gnugo/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/Prolangs-C/gnugo/lit.local.cfg @@ -0,0 +1,12 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +config.exec_args += ' < %S/stdin' +config.hash_output = True +config.ignore_return_code = True \ No newline at end of file Index: MultiSource/Benchmarks/Prolangs-C/plot2fig/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/Prolangs-C/plot2fig/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# TODO: This was only enabled if HAVE_RE_COMP was defined. +config.unsupported = True \ No newline at end of file Index: MultiSource/Benchmarks/Prolangs-C/unix-smail/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/Prolangs-C/unix-smail/lit.local.cfg @@ -0,0 +1,15 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/Prolangs-C/unix-smail/Makefile + +config.exec_args += ' -v ALL < %S/main.c' + +if config.target.startswith('alpha'): + config.unsupported = True Index: MultiSource/Benchmarks/SciMark2-C/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/SciMark2-C/lit.local.cfg @@ -0,0 +1,13 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/SciMark2-C/Makefile + +if config.large_problem_size: + config.exec_args += ' -large' Index: MultiSource/Benchmarks/Trimaran/enc-3des/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/Trimaran/enc-3des/lit.local.cfg @@ -0,0 +1,18 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/Trimaran/enc-3des/Makefile + +if config.large_problem_size: + config.exec_args += ' 200' +else: + if config.small_problem_size: + config.exec_args += ' 10' + else: + config.exec_args += ' 100' Index: MultiSource/Benchmarks/Trimaran/enc-md5/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/Trimaran/enc-md5/lit.local.cfg @@ -0,0 +1,18 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/Trimaran/enc-md5/Makefile + +if config.large_problem_size: + config.exec_args += ' 50' +else: + if config.small_problem_size: + config.exec_args += ' 1' + else: + config.exec_args += ' 10' Index: MultiSource/Benchmarks/Trimaran/enc-pc1/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/Trimaran/enc-pc1/lit.local.cfg @@ -0,0 +1,18 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/Trimaran/enc-pc1/Makefile + +if config.large_problem_size: + config.exec_args += ' 20000000' +else: + if config.small_problem_size: + config.exec_args += ' 1000000' + else: + config.exec_args += ' 5000000' Index: MultiSource/Benchmarks/Trimaran/enc-rc4/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/Trimaran/enc-rc4/lit.local.cfg @@ -0,0 +1,18 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/Trimaran/enc-rc4/Makefile + +if config.large_problem_size: + config.exec_args += ' 1000000' +else: + if config.small_problem_size: + config.exec_args += ' 2000' + else: + config.exec_args += ' 200000' Index: MultiSource/Benchmarks/Trimaran/netbench-crc/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/Trimaran/netbench-crc/lit.local.cfg @@ -0,0 +1,18 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/Trimaran/netbench-crc/Makefile + +if config.large_problem_size: + config.exec_args += ' 40000' +else: + if config.small_problem_size: + config.exec_args += ' 1000' + else: + config.exec_args += ' 12000' Index: MultiSource/Benchmarks/Trimaran/netbench-url/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/Trimaran/netbench-url/lit.local.cfg @@ -0,0 +1,18 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/Trimaran/netbench-url/Makefile + +if config.large_problem_size: + config.exec_args += ' %S/medium_inputs 1400' +else: + if config.small_problem_size: + config.exec_args += ' %S/medium_inputs 100' + else: + config.exec_args += ' %S/medium_inputs 900' Index: MultiSource/Benchmarks/VersaBench/8b10b/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/VersaBench/8b10b/lit.local.cfg @@ -0,0 +1,19 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/VersaBench/8b10b/Makefile + +if config.small_problem_size: + config.exec_args += ' %S/input.txt 2000' +else: + config.exec_args += ' %S/input.txt 20000' + +# 8b10b is inherently little-endian, don't bother on big-endian. +if config.endianness == 'big': + config.unsupported = True Index: MultiSource/Benchmarks/VersaBench/beamformer/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/VersaBench/beamformer/lit.local.cfg @@ -0,0 +1,21 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/VersaBench/beamformer/Makefile + +if config.large_problem_size: + config.exec_args += ' -i 400' +else: + if config.small_problem_size: + config.exec_args += ' -i 25' + else: + config.exec_args += ' -i 140' +config.hash_output = True +config.hash_output = True +config.hash_output = True Index: MultiSource/Benchmarks/VersaBench/bmm/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/VersaBench/bmm/lit.local.cfg @@ -0,0 +1,18 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/VersaBench/bmm/Makefile + +if config.large_problem_size: + config.exec_args += ' 1024 1024' +else: + if config.small_problem_size: + config.exec_args += ' 128 32' + else: + config.exec_args += ' 1024 64' Index: MultiSource/Benchmarks/VersaBench/dbms/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/VersaBench/dbms/lit.local.cfg @@ -0,0 +1,15 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/VersaBench/dbms/Makefile + +if config.small_problem_size: + config.exec_args += ' -i %S/dbms.train.in' +else: + config.exec_args += ' -i %S/dbms.ref.in' Index: MultiSource/Benchmarks/VersaBench/ecbdes/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/VersaBench/ecbdes/lit.local.cfg @@ -0,0 +1,18 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/VersaBench/ecbdes/Makefile + +if config.large_problem_size: + config.exec_args += ' 34' +else: + if config.small_problem_size: + config.exec_args += ' 4' + else: + config.exec_args += ' 16' Index: MultiSource/Benchmarks/mafft/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/mafft/lit.local.cfg @@ -0,0 +1,17 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/mafft/Makefile + +config.cflags += ' -DLLVM' +config.cxxflags += ' -DLLVM' +config.exec_args += ' -b 62 -g 0.100 -f 2.00 -h 0.100 -L < %S/pyruvate_decarboxylase.fasta' +config.abstol = 0.00001 +config.unsupported = True +config.hash_output = True Index: MultiSource/Benchmarks/nbench/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/nbench/lit.local.cfg @@ -0,0 +1,13 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/nbench/Makefile + +config.cflags += ' -DBASE_ITERATIONS=25' +config.cxxflags += ' -DBASE_ITERATIONS=25' Index: MultiSource/Benchmarks/tramp3d-v4/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Benchmarks/tramp3d-v4/lit.local.cfg @@ -0,0 +1,17 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# lit.local.cfg autogenerated from MultiSource/Benchmarks/tramp3d-v4/Makefile + +config.cflags += ' -fno-exceptions' +config.cxxflags += ' -fno-exceptions' +if config.small_problem_size: + config.exec_args += ' --cartvis 1.0 0.0 --rhomin 1e-8 -n 4 --domain 32 32 32' +else: + config.exec_args += ' --cartvis 1.0 0.0 --rhomin 1e-8 -n 10 --domain 32 32 32' Index: MultiSource/Examples/MultipleResults/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Examples/MultipleResults/lit.local.cfg @@ -0,0 +1,10 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +config.exec_args += ' %T/MultipleResults.extra-results.txt' Index: MultiSource/Examples/Noisy/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Examples/Noisy/lit.local.cfg @@ -0,0 +1,10 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +config.unsupported = True \ No newline at end of file Index: MultiSource/Examples/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/Examples/lit.local.cfg @@ -0,0 +1,10 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +config.unsupported = True \ No newline at end of file Index: MultiSource/UnitTests/Mips/Mips16/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/UnitTests/Mips/Mips16/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +if 'mips16' not in config.target: + config.unsupported = True \ No newline at end of file Index: MultiSource/UnitTests/Mips/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/UnitTests/Mips/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +if 'mips' not in config.target: + config.unsupported = True Index: MultiSource/lit.local.cfg =================================================================== --- /dev/null +++ MultiSource/lit.local.cfg @@ -0,0 +1,6 @@ +import os, sys + +sys.path.append(os.path.join(os.path.dirname(__file__), '..')) +from lit_local.formats import MultiSourceFormat + +config.test_format = MultiSourceFormat() Index: SingleSource/Benchmarks/BenchmarkGame/Large/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/BenchmarkGame/Large/lit.local.cfg @@ -0,0 +1,12 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +config.hash_output = True + +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/datamining/correlation/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/datamining/correlation/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + + +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/datamining/covariance/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/datamining/covariance/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + + +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/linear-algebra/kernels/2mm/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/linear-algebra/kernels/2mm/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + + +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/linear-algebra/kernels/3mm/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/linear-algebra/kernels/3mm/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + + +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/linear-algebra/kernels/atax/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/linear-algebra/kernels/atax/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + + +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/linear-algebra/kernels/bicg/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/linear-algebra/kernels/bicg/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + + +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/linear-algebra/kernels/cholesky/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/linear-algebra/kernels/cholesky/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + + +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/linear-algebra/kernels/doitgen/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/linear-algebra/kernels/doitgen/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + + +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemm/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemm/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + + +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemver/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemver/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + + +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gesummv/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gesummv/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + + +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/linear-algebra/kernels/mvt/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/linear-algebra/kernels/mvt/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + + +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/linear-algebra/kernels/symm/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/linear-algebra/kernels/symm/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + + +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syr2k/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syr2k/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + + +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syrk/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syrk/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + + +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trisolv/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trisolv/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + + +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trmm/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trmm/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + + +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/linear-algebra/solvers/durbin/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/linear-algebra/solvers/durbin/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + + +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/linear-algebra/solvers/dynprog/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/linear-algebra/solvers/dynprog/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + + +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/linear-algebra/solvers/gramschmidt/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/linear-algebra/solvers/gramschmidt/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + + +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/linear-algebra/solvers/lu/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/linear-algebra/solvers/lu/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + + +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/linear-algebra/solvers/ludcmp/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/linear-algebra/solvers/ludcmp/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +config.unsupported = True +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/lit.local.cfg @@ -0,0 +1,15 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +import os + +# TODO: Small problem size + +d = os.path.dirname(__file__) +config.cflags += ' -DPOLYBENCH_DUMP_ARRAYS -I%s/utilities/' % d Index: SingleSource/Benchmarks/Polybench/medley/floyd-warshall/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/medley/floyd-warshall/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + + +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/medley/reg_detect/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/medley/reg_detect/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + + +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/stencils/adi/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/stencils/adi/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + + +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/stencils/fdtd-2d/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/stencils/fdtd-2d/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + + +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/stencils/fdtd-apml/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/stencils/fdtd-apml/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + + +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/stencils/jacobi-1d-imper/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/stencils/jacobi-1d-imper/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + + +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/stencils/jacobi-2d-imper/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/stencils/jacobi-2d-imper/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + + +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/stencils/seidel-2d/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/stencils/seidel-2d/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + + +config.hash_output = True Index: SingleSource/Benchmarks/Polybench/utilities/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Polybench/utilities/lit.local.cfg @@ -0,0 +1,10 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +config.unsupported = True Index: SingleSource/Benchmarks/Stanford/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Benchmarks/Stanford/lit.local.cfg @@ -0,0 +1,10 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +config.abstol = 0.001 \ No newline at end of file Index: SingleSource/Regression/C/SSE/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/Regression/C/SSE/lit.local.cfg @@ -0,0 +1,14 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# TODO: I can't seem to get this test to pass. What am I missing? +import os + +if True: + config.unsupported = True Index: SingleSource/UnitTests/EH/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/UnitTests/EH/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# Are these tests even tested at all?? one at least doesn't #include for EXIT_FAILURE! +config.unsupported = True Index: SingleSource/UnitTests/Integer/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/UnitTests/Integer/lit.local.cfg @@ -0,0 +1,17 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +import os + +# Use a consistent seed value for the tests so they produce +# the same results regardless of whether you make clean or not. +config.exec_args += ' 31415926' + +# None of these seem to compile with clang-3.5 - lack of bignum builtins. +config.unsupported = True \ No newline at end of file Index: SingleSource/UnitTests/SignlessTypes/Large/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/UnitTests/SignlessTypes/Large/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + + +config.hash_output = True Index: SingleSource/UnitTests/SignlessTypes/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/UnitTests/SignlessTypes/lit.local.cfg @@ -0,0 +1,12 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +# Use a consistent seed value for the tests so they produce +# the same results regardless of whether you make clean or not. +config.exec_args += ' 31415926' Index: SingleSource/UnitTests/Threads/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/UnitTests/Threads/lit.local.cfg @@ -0,0 +1,21 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +import os + +stem = os.path.abspath(os.path.dirname(__file__)) + +if config.target == 'xcore': + config.skip += ['tls.c'] + +if config.os == 'darwin': + config.skip += ['tls.c', '2010-12-08-tls.c'] + +config.cflags += ' -lpthread' +config.cxxflags += ' -lpthread' Index: SingleSource/UnitTests/Vector/Altivec/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/UnitTests/Vector/Altivec/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +if not config.target.startswith('ppc') and not config.target.startswith('power'): + config.unsupported = True Index: SingleSource/UnitTests/Vector/NEON/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/UnitTests/Vector/NEON/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +if config.target not in ('armv7', 'armv8', 'aarch64'): + config.unsupported = True Index: SingleSource/UnitTests/Vector/SSE/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/UnitTests/Vector/SSE/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +if not config.target.startswith('i') and config.target != 'x86_64': + config.unsupported = True Index: SingleSource/UnitTests/Vector/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/UnitTests/Vector/lit.local.cfg @@ -0,0 +1,11 @@ +#===------- lit.local.cfg - configure file used by llvm-lit --------------===# +# +# The LLVM Test-suite Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See top level LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===# + +if config.cc_is_clang: + config.skip += ['constpool.c'] Index: SingleSource/lit.local.cfg =================================================================== --- /dev/null +++ SingleSource/lit.local.cfg @@ -0,0 +1,6 @@ +import os, sys + +sys.path.append(os.path.join(os.path.dirname(__file__), '..')) +from lit_local.formats import SingleSourceFormat + +config.test_format = SingleSourceFormat() Index: lit.cfg =================================================================== --- /dev/null +++ lit.cfg @@ -0,0 +1,109 @@ +# -*- Python -*- +import sys, os, hashlib, difflib, re, time +sys.path.append(os.path.dirname(__file__)) + +import lit.formats +import lit.util +from lit_local.discovery import detect_target, endianness_for_target, cc_is_clang + +# Configuration file for the 'lit' test runner. + +# name: The name of this test suite. +config.name = 'test-suite' + +################################################################################ +# Test format + +# This test suite uses its own format. The config variables available for use +# in lit.local.cfg files are: +# CFLAGS +config.cflags = "$CFLAGS -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -DNDEBUG" +# CXXFLAGS +config.cxxflags = "$CXXFLAGS -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -DNDEBUG" +# Extra arguments to run the test. Can use stderr redirection (2>&1). +config.exec_args = '' +# Is the test not supported? if True, the test will be skipped +config.unsupported = False +# List the tests in this directory that are also unsupported. +config.skip = [] +# Absolute floating-point tolerance. Floating point numbers can differ +# between implementations - the default is to be strict about all +# FP values parsed. +config.abstol = 0.0 +# Relative floating-point tolerance. +config.reltol = 0.0 +# Explicit list of source files. These are relative to the test directory. +config.sources = [] +# List of commands to run before executing the test, for example to set +# up or generate test inputs. +config.preexec = [] +# Target architecture. This is inferred from the compiler, if the compiler +# is clang. Otherwise, the user is required to explicitly set it by --param=target=XX. +config.target = '' +# Target operating system. This is inferred from the compiler, if the +# compiler is clang. Otherwise, the user is required to explicitly set it by --param=target=XX. +config.os = '' +# Firstly get target and os from --param +if lit_config.params.has_key('target') : + config.target = lit_config.params['target'] +if lit_config.params.has_key('os') : + config.os = lit_config.params['os'] +if not config.target or not config.os: + ret = detect_target(os.environ, config.cflags, config.cxxflags) + if ret == False: + raise RuntimeError("Runtime target/os detection failed - specify with --param=target=XX and --param=os=YY.") + config.target, config.os = ret + # FIXME: Propagate opts.quiet into TestingConfig in lit. + if not hasattr(config, 'quiet') or not config.quiet: + print "-- Inferred target: %s, OS: %s - use --param=target= or --param=os= to override." % ret +# Target endianness. Ditto above. +if lit_config.params.has_key('endianness'): + config.endianness = lit_config.params['endianness'] +else: + config.endianness = endianness_for_target(config.target) + # FIXME: Propagate opts.quiet into TestingConfig in lit. + if not hasattr(config, 'quiet') or not config.quiet: + print "-- Inferred endianness: %s - use --param=endianness=big|little to override." % config.endianness +config.cc_is_clang = cc_is_clang(os.environ) +# If set to true, use a smaller input set. +config.small_problem_size = False +# If set to true, use a larger input set. small_problem_size and +# large_problem_size must not both be set, but can both be unset. +config.large_problem_size = False +# Should we actually perform a comparison of the output [1]? Set to false +# if the output is nondeterminisic. +config.compare = True +# Should we ignore nonzero exit codes? +config.ignore_return_code = False +# Should we run the output [1] through md5sum to produce a hash to compare +# to the reference? +config.hash_output = False + +# [1] The output of the benchmark is defined as: +# stderr + stdout + 'exit %d\n' % exitCode + +# The above variables can be overridden by lit.local.cfg, so they should be +# by-value types like boolean, int and string. Reference types will work +# but only if they are not mutated in-place. For example: +# config.sources = [...] # Fine +# config.sources += [...] # Bad: config.sources is now set for all tests! + +# suffixes: A list of file extensions to treat as test files. This is overridden +# by individual lit.local.cfg files in the test subdirectories. +config.suffixes = ['.c', '.cpp', '.cc'] + +# excludes: A list of directories to exclude from the testsuite. +config.excludes = ['INPUT', 'Inputs', 'ABI-Testsuite', 'lit_local'] + +# test_source_root: The root path where tests are located. +config.test_source_root = os.path.dirname(__file__) + +# test_exec_root: The root path where tests should be run. +llvm_obj_root = getattr(config, 'llvm_obj_root', None) +if llvm_obj_root is not None: + config.test_exec_root = os.path.join(llvm_obj_root, 'test') + +# Propagate needed env vars. +for var in ['CC', 'CXX', 'CFLAGS', 'CXXFLAGS', 'LDFLAGS']: + if var in os.environ: + config.environment[var] = os.environ[var] Index: lit_local/__init__.py =================================================================== --- /dev/null +++ lit_local/__init__.py @@ -0,0 +1,49 @@ +def fpcmp(test, ref, abstol, reltol): + """Compare "test" and "ref", which are strings. Return True if + they are the same, and False if they differ. + + The strings are tokenized and floating point numbers are + compared against an absolute and relative tolerance for + equality.""" + # Early exit + if test == ref: + return True + + # Tokenize by splitting on whitespace. + test_tok = re.split(r'\s+', test) + ref_tok = re.split(r'\s+', ref) + + if len(test_tok) != len(ref_tok): + return False + + for i in range(len(ref_tok)): + try: + # Is this token a float? + ref_f = float(ref_tok[i]) + except ValueError: + # No? just use normal comparison then. + if ref_tok[i] != test_tok[i]: + return False + continue + try: + # ref_tok[i] was a float. Is this a float too? + test_f = float(test_tok[i]) + except ValueError: + # No? not the same then. + return False + + # Check to see if ref_f == test_f inside the absolute tolerance + # This code was taken from tools/fpcmp.c. + if abstol < abs(ref_f - test_f): + # Nope, check the relative tolerance... + if test_f != 0.0: + diff = abs(ref_f/test_f - 1.0) + elif ref_f != 0.0: + diff = abs(test_f/ref_f - 1.0) + else: + diff = 0.0 # Both zero. + + if diff > reltol: + return False + + return True Index: lit_local/discovery.py =================================================================== --- /dev/null +++ lit_local/discovery.py @@ -0,0 +1,67 @@ +import lit.util + +def detect_target(environ, cflags, cxxflags): + """ + Attempt to detect the compiler target architecture and operating system. + On success returns (arch, os); on failure returns False. + + Raises RuntimeError if neither environ[CC] or environ[CXX] are set. + """ + compiler = '' + is_clang = False + if "CC" in environ: + compiler = environ["CC"] + elif "CXX" in environ: + compiler = environ["CXX"] + else: + raise RuntimeError("you need to specify the compiler to test by setting environment variable CC and/or CXX.") + out, err, exitCode = lit.util.executeCommand([compiler, "-v"]) + if not err.startswith("clang"): + return False + + # Assemble the CFLAGS. + flags_list = environ.get("CFLAGS","").split(' ') + \ + environ.get("CXXFLAGS","").split(' ') + \ + cflags.split(' ') + cxxflags.split(' ') + + # Try to infer target from cflags or cxxflags. + try: + triple = flags_list[flags_list.index('-target') + 1] + triple_slices = triple.split('-') + target = triple_slices[0] + if len(triple_slices) > 3: + os = triple_slices[2] + else: + os = triple_slices[1] + return target, os + + except: + # Get default target and OS from 'clang -v'. + err_lines = err.splitlines() + if err_lines[1].startswith("Target:"): + triple = err_lines[1].split(' ')[1] + target = triple.split('-')[0] + os = triple.split('-')[2] + return target, os + else: + return False + +def endianness_for_target(target): + # FIXME: This is entirely heuristic based. Perhaps find a better way of doing this? + if "be" in target or "eb" in target: + return "big" + if ("ppc" in target or "power" in target) and \ + "le" not in target and "little" not in target: + return "big" + return "little" + +def cc_is_clang(environ): + if "CC" in environ: + compiler = environ["CC"] + elif "CXX" in environ: + compiler = environ["CXX"] + else: + raise RuntimeError("you need to specify the compiler to test by setting environment variable CC and/or CXX.") + out, err, exitCode = lit.util.executeCommand([compiler, "-v"]) + if not err.startswith("clang"): + return False Index: lit_local/formats.py =================================================================== --- /dev/null +++ lit_local/formats.py @@ -0,0 +1,231 @@ +import sys, os, hashlib, difflib, re, time +import lit.formats +import lit.util +from lit_local import fpcmp + +COMPILE_C = '%cc -o %t %cflags %s -lm' +COMPILE_CXX = '%cc -o %t %cxxflags %s -lm -lstdc++' +# FIXME: rununder +EXEC = '%t %a' + +# BaseFormat - helpers and common code +# / \ +# SingleSourceFormat - discovery and execution for single-source tests +# \ +# MultiSourceFormat - multi-source tests + +class BaseFormat: + def _make_cmds(self, test, sources, cxx): + """Takes a test and an implicit source list and returns the + commands to compile and exec along with the environment.""" + compile_cmd = COMPILE_C + if cxx: + compile_cmd = COMPILE_CXX + exec_cmd = EXEC + + # Stolen from lit.TestRunner + sourcepath = test.getSourcePath() + sourcedir = os.path.dirname(sourcepath) + execpath = test.getExecPath() + execdir,execbase = os.path.split(execpath) + tmpDir = os.path.join(execdir, 'Output') + tmpBase = os.path.join(tmpDir, execbase) + + substitutions = {'%cc': '$CC', '%cxx ': '$CXX ', + '%cflags': test.config.cflags, + '%cxxflags': test.config.cxxflags, + '%s': ' '.join(sources), + '%t': tmpBase + '.tmp', + '%S': sourcedir, + '%T': tmpDir, + '%a': test.config.exec_args, + '%%': '%'} + + # Perform substitutions for all commands. + for k,v in substitutions.items(): + compile_cmd = compile_cmd.replace(k, v) + exec_cmd = exec_cmd.replace(k, v) + # In case of recursive substituations, go again. + for k,v in substitutions.items(): + compile_cmd = compile_cmd.replace(k, v) + exec_cmd = exec_cmd.replace(k, v) + + preexec_cmds = [] + for pxc in test.config.preexec: + for k,v in substitutions.items(): + pxc = pxc.replace(k, v) + preexec_cmds.append(pxc) + + return preexec_cmds, compile_cmd, exec_cmd, execdir, tmpBase + + def _is_cxx_src(self, src): + return src.endswith('.cc') or src.endswith('.cpp') or src.endswith('.c++') + + def is_utf8(self, data): + "Return true if the data is encoded with utf-8." + try: + data.decode('utf-8') + return True + except UnicodeDecodeError: + return False + + def executeAndTimeScript (self, test, litConfig, tmpBase, commands, cwd): + """ Execute a script and time it.""" + # FIXME: Use perf to get the elapsed time? + elapsed = time.time() + res = lit.TestRunner.executeScript(test, litConfig, tmpBase, + commands, cwd) + elapsed = time.time() - elapsed + return res, elapsed + + def execute(self, test, litConfig, sources, ref_out): + """Execute a test. sources contains a list of source files, ref_out + contains an optional reference output file.""" + preexec_cmds, compile_cmd, exec_cmd, execdir, tmpBase = \ + self._make_cmds(test, sources, any([self._is_cxx_src(s) for s in sources])) + if litConfig.noExecute: + return lit.Test.Result(lit.Test.PASS) + + # Create the output directory if it does not already exist. + lit.util.mkdir_p(os.path.dirname(tmpBase)) + + status = lit.Test.PASS + output = "" + compile_time = 0.0 + exec_time = 0.0 + for cmd in preexec_cmds + [compile_cmd, exec_cmd]: + res, elapsed = self.executeAndTimeScript(test, litConfig, tmpBase, + [cmd], execdir) + if cmd == compile_cmd: + compile_time = elapsed + elif cmd == exec_cmd: + exec_time = elapsed + + if isinstance(res, lit.Test.Result): + return res + out, err, exitCode = res + if exitCode != 0: + # Even if we're told to ignore the return code, only do this + # if the command is the exec_cmd. Compile errors should still + # fail. + if cmd != exec_cmd or not test.config.ignore_return_code: + status = lit.Test.FAIL + + # Form the output log. + output += """Script:\n--\n%s\n--\nExit Code: %d\n\n""" % ( + cmd, exitCode) + + # Append the outputs, if present. + if out: + if self.is_utf8(out): + output += """Command Output (stdout):\n--\n%s\n--\n""" % (out[:2000],) + else: + output += """Command Output (stdout) is not readable.\n""" + if err: + if self.is_utf8(out): + output += """Command Output (stderr):\n--\n%s\n--\n""" % (err[:2000],) + else: + output += """Command Output (stderr) is not readable.\n""" + + if status != lit.Test.FAIL: + # Compare the output with the reference. + try: + if test.config.compare and ref_out: + ref_output = open(ref_out).read().strip() + comparison = ''.join([err, out, 'exit %d\n' % exitCode]) + + if test.config.hash_output: + comparison = hashlib.md5(comparison).hexdigest() + comparison = comparison.strip() + + if not fpcmp(comparison, ref_output, + test.config.abstol, test.config.reltol): + output += """Comparison against reference FAILED\n""" + numlines = 0 + diff_text = "" + for line in difflib.unified_diff(comparison.splitlines(), + ref_output.splitlines()): + diff_text += line + "\n" + # FIXME: Configurable? + if numlines >= 200: + break + numlines += 1 + if self.is_utf8(diff_text): + output += diff_text + else : + output += """diff result is not readable.\n""" + status = lit.Test.FAIL + except (IOError, TypeError): + output += ("Reference output file '%s' did not exist or was" + + " not readable\n") % ref_out + status = lit.Test.FAIL + output = """Compile Time: %.3fs\t\tExecution Time: %.3fs\n""" % ( + compile_time, exec_time) + output + return lit.Test.Result(status, output, exec_time) + +class SingleSourceFormat(lit.formats.base.FileBasedTest, BaseFormat): + """Each source file is a single testcase.""" + def execute(self, test, litConfig): + fp = test.getSourcePath() + + if test.config.unsupported or os.path.basename(fp) in test.config.skip: + return lit.Test.Result(lit.Test.UNSUPPORTED, + "Test skipped") + + # FIXME: '.reference_output_small'? + ref_out = fp[:fp.index('.')] + '.reference_output' + if not os.path.exists(ref_out): + ref_out = None + return BaseFormat.execute(self, test, litConfig, [fp], ref_out) + +class MultiSourceFormat(lit.formats.base.FileBasedTest, BaseFormat): + """Each leaf directory is a single testcase.""" + def getTestsInDirectory(self, testSuite, path_in_suite, + litConfig, localConfig): + source_path = testSuite.getSourcePath(path_in_suite) + + # Does the directory have one or more test files? + for filename in os.listdir(source_path): + # Ignore dot files and excluded tests. + if (filename.startswith('.') or + filename in localConfig.excludes): + continue + + filepath = os.path.join(source_path, filename) + if not os.path.isdir(filepath): + base,ext = os.path.splitext(filename) + if ext in localConfig.suffixes: + yield lit.Test.Test(testSuite, + path_in_suite + (os.path.basename(source_path),), + localConfig) + return + + def execute(self, test, litConfig): + dirname = os.path.dirname(test.getSourcePath()) + + if test.config.unsupported: + return lit.Test.Result(lit.Test.UNSUPPORTED, + "Test skipped") + + srcs = [] + ref_out = None + # Find the reference output, if it exists. Also enumerate all source files. + for f in os.listdir(dirname): + if f.endswith('.reference_output'): + ref_out = os.path.join(dirname, f) + elif f.endswith('.reference_output.%s-endian' % test.config.endianness): + ref_out = os.path.join(dirname, f) + # FIXME: '.reference_output-small' ? + elif '.' in f and '.'+f.rsplit('.',1)[1] in test.config.suffixes: + srcs.append(os.path.join(dirname, f)) + + # If there was an explicit source list, override the automatic one. + if test.config.sources: + srcs = [os.path.join(dirname, s) for s in test.config.sources] + + # Ungracefully bail out (test returns UNRESOLVED) if there are no + # no source files. + if not srcs: + return None + + return BaseFormat.execute(self, test, litConfig, srcs, ref_out)