summaryrefslogtreecommitdiffstats
path: root/openmp/testsuite/LLVM-IR
diff options
context:
space:
mode:
Diffstat (limited to 'openmp/testsuite/LLVM-IR')
-rw-r--r--openmp/testsuite/LLVM-IR/lit.cfg78
-rw-r--r--openmp/testsuite/LLVM-IR/lit.site.cfg.in30
-rw-r--r--openmp/testsuite/LLVM-IR/lit.tmp1
3 files changed, 109 insertions, 0 deletions
diff --git a/openmp/testsuite/LLVM-IR/lit.cfg b/openmp/testsuite/LLVM-IR/lit.cfg
new file mode 100644
index 00000000000..195781989e5
--- /dev/null
+++ b/openmp/testsuite/LLVM-IR/lit.cfg
@@ -0,0 +1,78 @@
+# -*- Python -*-
+
+# Configuration file for the 'lit' test runner.
+
+import os
+import sys
+import re
+import platform
+
+try:
+ import lit.util
+ import lit.formats
+except ImportError:
+ pass
+
+# name: The name of this test suite.
+config.name = 'OpenMPValidationSuite'
+
+# testFormat: The test format to use to interpret tests.
+config.test_format = lit.formats.ShTest(execute_external=False)
+
+# suffixes: A list of file extensions to treat as test files
+# Note this can be overridden by lit.local.cfg files
+config.suffixes = ['.ll']
+
+# test_source_root: The root path where tests are located.
+#config.test_source_root = "/home/ichoyjx/install/openmp/testsuite/bin"
+#os.path.dirname(__file__)
+
+# test_exec_root: The root path where tests should be run.
+#mpvs_obj_root = getattr(config, 'mpvs_obj_root', None)
+#if mpvs_obj_root is not None:
+config.test_exec_root = "./"
+#os.path.join(mpvs_obj_root, 'src')
+
+# Discover the 'clang' and 'clangcc' to use.
+
+import os
+
+def inferClang(PATH):
+ # Determine which clang to use.
+ clang = os.getenv('CLANG')
+
+ # If the user set clang in the environment, definitely use that and don't
+ # try to validate.
+ if clang:
+ return clang
+
+ # Otherwise look in the path.
+ clang = lit.util.which('clang', PATH)
+
+ if not clang:
+ lit_config.fatal("couldn't find 'clang' program, try setting "
+ "CLANG in your environment")
+
+ return clang
+
+config.clang = inferClang(config.environment['PATH']).replace('\\', '/')
+config.substitutions.append( ('%clang', ' ' + config.clang + ' ') )
+
+# Propogate some environment variable to test environment.
+def addEnv(name):
+ if name in os.environ:
+ config.environment[name] = os.environ[name]
+
+addEnv('HOME')
+addEnv('PWD')
+
+
+addEnv('C_INCLUDE_PATH')
+addEnv('CPLUS_INCLUDE_PATH')
+addEnv('LIBRARY_PATH')
+addEnv('LD_LIBRARY_PATH')
+addEnv('DYLD_LIBRARY_PATH')
+
+# Check that the object root is known.
+if config.test_exec_root is None:
+ lit.fatal('test execution root not set!')
diff --git a/openmp/testsuite/LLVM-IR/lit.site.cfg.in b/openmp/testsuite/LLVM-IR/lit.site.cfg.in
new file mode 100644
index 00000000000..11866d4dd58
--- /dev/null
+++ b/openmp/testsuite/LLVM-IR/lit.site.cfg.in
@@ -0,0 +1,30 @@
+## Autogenerated by LLVM/Clang configuration.
+#config.mpvs_src_root = "/home/ichoyjx/install/openmp/testsuite/bin/c"
+config.mpvs_obj_root = "/tmp"
+config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
+
+
+# Needed to check if a hack needs to be applied
+config.llvm_version_major = "@LLVM_VERSION_MAJOR@"
+
+# Compilers
+# FIXME: use llvmcc not llvmgcc
+config.llvmclang = "clang"
+
+# Features
+config.enable_uclibc = True if @ENABLE_UCLIBC@ == 1 else False
+config.enable_posix_runtime = True if @ENABLE_POSIX_RUNTIME@ == 1 else False
+config.have_selinux = True if @HAVE_SELINUX@ == 1 else False
+
+# Current target
+config.target_triple = "@TARGET_TRIPLE@"
+
+# Let the main config do the real work.
+try:
+ lit
+except NameError:
+ # Use lit_config class
+ lit_config.load_config(config, "@MPVS_SOURCE_DIR@/lit.cfg")
+else:
+ # Use old lit class
+ lit.load_config(config, "@MPVS_SOURCE_DIR@/lit.cfg")
diff --git a/openmp/testsuite/LLVM-IR/lit.tmp b/openmp/testsuite/LLVM-IR/lit.tmp
new file mode 100644
index 00000000000..81d30fb0a4e
--- /dev/null
+++ b/openmp/testsuite/LLVM-IR/lit.tmp
@@ -0,0 +1 @@
+../LLVM-IR/lin_32e/
OpenPOWER on IntegriCloud