1 # -*- Python -*- 2 3 # Configuration file for the 'lit' test runner. 4 5 def getRoot(config): 6 if not config.parent: 7 return config 8 return getRoot(config.parent) 9 10 root = getRoot(config) 11 12 # testFormat: The test format to use to interpret tests. 13 target_obj_root = root.llvm_obj_root 14 cxxflags = ['-D__STDC_LIMIT_MACROS', 15 '-D__STDC_CONSTANT_MACROS', 16 '-Wno-sign-compare', 17 '-I%s/include' % root.llvm_src_root, 18 '-I%s/include' % root.llvm_obj_root, 19 '-I%s/lib/Target/ARM' % root.llvm_src_root, 20 '-I%s/lib/Target/CellSPU' % root.llvm_src_root, 21 '-I%s/lib/Target/CppBackend' % root.llvm_src_root, 22 '-I%s/lib/Target/Mips' % root.llvm_src_root, 23 '-I%s/lib/Target/MSIL' % root.llvm_src_root, 24 '-I%s/lib/Target/MSP430' % root.llvm_src_root, 25 '-I%s/lib/Target/PIC16' % root.llvm_src_root, 26 '-I%s/lib/Target/PowerPC' % root.llvm_src_root, 27 '-I%s/lib/Target/Sparc' % root.llvm_src_root, 28 '-I%s/lib/Target/X86' % root.llvm_src_root, 29 '-I%s/lib/Target/XCore' % root.llvm_src_root, 30 '-I%s/lib/Target/ARM' % target_obj_root, 31 '-I%s/lib/Target/CellSPU' % target_obj_root, 32 '-I%s/lib/Target/CppBackend' % target_obj_root, 33 '-I%s/lib/Target/Mips' % target_obj_root, 34 '-I%s/lib/Target/MSIL' % target_obj_root, 35 '-I%s/lib/Target/MSP430' % target_obj_root, 36 '-I%s/lib/Target/PIC16' % target_obj_root, 37 '-I%s/lib/Target/PowerPC' % target_obj_root, 38 '-I%s/lib/Target/Sparc' % target_obj_root, 39 '-I%s/lib/Target/X86' % target_obj_root, 40 '-I%s/lib/Target/XCore' % target_obj_root]; 41 42 kScript = os.path.join(os.path.dirname(__file__), "check-symbols") 43 config.test_format = \ 44 lit.formats.OneCommandPerFileTest(command=[kScript, root.clang] + cxxflags, 45 dir='%s/lib' % root.llvm_src_root, 46 recursive=True, 47 pattern='^(.*\\.cpp)$') 48 49