# -*- Python -*- import os import platform import re import subprocess import lit.formats import lit.util # Configuration file for the 'lit' test runner. # name: The name of this test suite. config.name = 'hipify' # suffixes: CUDA source is only supported config.suffixes = ['.cu'] # testFormat: The test format to use to interpret tests. config.test_format = lit.formats.ShTest() # test_source_root: The root path where tests are located. config.test_source_root = os.path.dirname(__file__) # test_exec_root: The path where tests are located (default is the test suite root). #config.test_exec_root = config.test_source_root # target_triple: Used by ShTest and TclTest formats for XFAIL checks. config.target_triple = '(unused)' # available_features: Used by ShTest and TclTest formats for REQUIRES checks. config.available_features = [] site_cfg = lit_config.params.get('site_config', None) lit_config.load_config(config, site_cfg) obj_root = getattr(config, 'obj_root', None) if obj_root is not None: config.test_exec_root = obj_root if obj_root is not None: llvm_tools_dir = getattr(config, 'llvm_tools_dir', None) if not llvm_tools_dir: lit_config.fatal('No LLVM tools dir set!') path = os.path.pathsep.join((llvm_tools_dir, config.environment['PATH'])) config.environment['PATH'] = path config.substitutions.append(("hipify", obj_root+"/hipify-clang"))