-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from AnyDSL/ctest
* Revision of impala regression tests * use cmake -DBUILD_TESTING=ON to enable ctest * then run ctest -R codegen
- Loading branch information
Showing
7 changed files
with
474 additions
and
115 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,5 @@ | ||
*.bc | ||
*.out | ||
*.cl | ||
*.cu | ||
*.ll | ||
*.nvvm | ||
*.pyc | ||
*.vcg | ||
CMakeCache.txt | ||
CMakeFiles/ | ||
build* | ||
html | ||
test/impala | ||
test/lib.o | ||
test/config* | ||
test/__pycache__ |
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,34 @@ | ||
cmake_minimum_required(VERSION 3.1 FATAL_ERROR) | ||
|
||
find_package(PythonInterp 3.0 REQUIRED) | ||
set(PYTHON_BIN ${PYTHON_EXECUTABLE}) | ||
|
||
find_path(LLVM_DIR LLVMConfig.cmake PATHS ${LLVM_DIR} $ENV{LLVM_DIR}) | ||
find_package(LLVM QUIET) | ||
find_path(Clang_DIR ClangConfig.cmake PATHS ${Clang_DIR} ${LLVM_DIR} PATH_SUFFIXES ../clang) | ||
find_package(Clang QUIET) | ||
if(TARGET clang AND NOT Clang_BIN) | ||
get_target_property(Clang_BIN clang LOCATION) | ||
set(Clang_BIN ${Clang_BIN} CACHE FILEPATH "path to clang executable") | ||
endif() | ||
find_program(Clang_BIN clang | ||
PATHS ${LLVM_TOOLS_BINARY_DIR} ${LLVM_INSTALL_PREFIX}/bin | ||
PATH_SUFFIXES Release ${CMAKE_CONFIGURATION_TYPES} | ||
) | ||
|
||
# add_library(rtmock STATIC rtmock.cpp) | ||
|
||
set(TEST_SCRIPT perform.py) | ||
set(TEST_ARGS --impala $<TARGET_FILE:impala> --clang ${Clang_BIN} --temp ${CMAKE_CURRENT_BINARY_DIR} --rtmock "${CMAKE_CURRENT_SOURCE_DIR}/rtmock.cpp") | ||
|
||
file(GLOB_RECURSE _testcases RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.impala") | ||
|
||
foreach(_test ${_testcases}) | ||
add_test(NAME ${_test} COMMAND ${PYTHON_BIN} ${TEST_SCRIPT} ${TEST_ARGS} ${_test} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) | ||
set_tests_properties(${_test} PROPERTIES SKIP_RETURN_CODE 77) | ||
endforeach() | ||
|
||
set(_content | ||
"CONFIGURATION = \"$<CONFIG>\"\nIMPALA_BIN = \"$<TARGET_FILE:impala>\"\nCLANG_BIN = \"${Clang_BIN}\"\nLIBRTMOCK = \"${CMAKE_CURRENT_SOURCE_DIR}/rtmock.cpp\"\nTEMP_DIR = \"${CMAKE_CURRENT_BINARY_DIR}\"\n") | ||
file(GENERATE OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/config$<CONFIG>.py CONTENT ${_content}) | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.