Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build and run isl_test as part of check-polly
Running isl tests is important to gain confidence that the isl build we created works as expected. Besides the actual isl tests, there are also isl AST generation tests shipped with isl. This change only adds support for the isl unit tests. AST generation test support is left for a later commit. There is a choice to run tests directly through the build system or in the context of lit. We choose to run tests as part of lit to as this allows us to easily set environment variables, print output only on error and generally run the tests directly from the lit command. Reviewers: brad.king, Meinersbur Subscribers: modocache, brad.king, pollydev, beanz, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D25155 llvm-svn: 283245
- Loading branch information
1 parent
c43fa4f
commit e84ee85
Showing
5 changed files
with
94 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
; RUN: polly-isl-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# -*clang- Python -*- | ||
|
||
import os | ||
import platform | ||
import re | ||
|
||
import lit.formats | ||
import lit.util | ||
|
||
# Configuration file for the 'lit' test runner. | ||
|
||
# name: The name of this test suite. | ||
config.name = 'Polly - isl unit tests' | ||
|
||
# testFormat: The test format to use to interpret tests. | ||
# | ||
# For now we require '&&' between commands, until they get globally killed and | ||
# the test runner updated. | ||
execute_external = platform.system() != 'Windows' | ||
config.test_format = lit.formats.ShTest(execute_external) | ||
|
||
# suffixes: A list of file extensions to treat as test files. | ||
config.suffixes = ['.sh'] | ||
|
||
# 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. | ||
polly_obj_root = getattr(config, 'polly_obj_root', None) | ||
if polly_obj_root is not None: | ||
config.test_exec_root = os.path.join(polly_obj_root, 'test') | ||
|
||
# Set llvm_{src,obj}_root for use by others. | ||
config.llvm_src_root = getattr(config, 'llvm_src_root', None) | ||
config.llvm_obj_root = getattr(config, 'llvm_obj_root', None) | ||
|
||
# Tweak the PATH to include the tools dir and the scripts dir. | ||
if polly_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.environment['srcdir'] = os.path.join(config.test_source_root, | ||
'../../lib/External/isl') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
@LIT_SITE_CFG_IN_HEADER@ | ||
|
||
import sys | ||
|
||
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" | ||
config.polly_obj_root = "@POLLY_BINARY_DIR@" | ||
|
||
# Let the main config do the real work. | ||
lit_config.load_config(config, "@POLLY_SOURCE_DIR@/test/UnitIsl/lit.cfg") |