Commit 70f48632 authored by Daniel Agar's avatar Daniel Agar

cmake add check-deps to split check-pyston

-travis-ci will timeout with no output after 10 minutes, running ctest
manually will produce output as it runs
parent 26c402ad
......@@ -47,15 +47,17 @@ install:
- mkdir ~/pyston-build && cd ~/pyston-build
- make -C $TRAVIS_BUILD_DIR llvm_up
- cmake -GNinja -DTEST_THREADS=4 -DENABLE_EXTRA_TESTS=ON $TRAVIS_BUILD_DIR
- ninja libunwind ext_cpython
before_script:
- mysql -e 'create database mysqldb_test charset utf8;'
script:
- echo 'Building Pyston' && echo -en 'travis_fold:start:compiling\\r'
- ccache -z
- PYSTON_RUN_ARGS=G travis_wait ninja -j4 check-pyston
- PYSTON_RUN_ARGS=G ninja -j4 check-deps
- ccache -s
- echo -en 'travis_fold:end:compiling\\r'
- ctest --output-on-failure
os:
- linux
......
......@@ -247,7 +247,7 @@ add_test(NAME pyston_defaults_cpython_tests COMMAND ${PYTHON_EXE} ${CMAKE_SOURCE
add_test(NAME pyston_defaults_integration_tests COMMAND ${PYTHON_EXE} ${CMAKE_SOURCE_DIR}/tools/tester.py -R ./pyston -j${TEST_THREADS} -k -a=-S --exit-code-only --skip-failing -t600 ${CMAKE_SOURCE_DIR}/test/integration)
if(ENABLE_EXTRA_TESTS)
add_test(NAME extra_tests COMMAND ${PYTHON_EXE} ${CMAKE_SOURCE_DIR}/tools/tester.py -R ./pyston -j${TEST_THREADS} -a=-S -k -t600 --exit-code-only ${CMAKE_SOURCE_DIR}/test/extra)
add_test(NAME pyston_defaults_extra_tests COMMAND ${PYTHON_EXE} ${CMAKE_SOURCE_DIR}/tools/tester.py -R ./pyston -j${TEST_THREADS} -k -a=-S -t600 --exit-code-only ${CMAKE_SOURCE_DIR}/test/extra)
endif()
......@@ -260,7 +260,8 @@ add_custom_target(check-format ${CMAKE_SOURCE_DIR}/tools/check_format.sh ${LLVM_
add_custom_target(lint ${PYTHON_EXE} ${CMAKE_SOURCE_DIR}/tools/lint.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
# check
add_custom_target(check-pyston COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure DEPENDS pyston copy_stdlib copy_libpyston clang-format ext_cpython ext_pyston unittests sharedmods)
add_custom_target(check-deps DEPENDS pyston copy_stdlib copy_libpyston clang-format ext_cpython ext_pyston unittests sharedmods)
add_custom_target(check-pyston COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure DEPENDS check-deps)
# {run,dbg,perf,memcheck,memleaks,cachegrind}_TESTNAME
file(GLOB RUNTARGETS ${CMAKE_SOURCE_DIR}/test/tests/*.py ${CMAKE_SOURCE_DIR}/microbenchmarks/*.py ${CMAKE_SOURCE_DIR}/minibenchmarks/*.py)
......
......@@ -443,7 +443,8 @@ RUN_DEPS := ext_pyston
# The set of dependencies (beyond the executable) required to do `make check` / `make check_foo`.
# The tester bases all paths based on the executable, so in cmake mode we need to have cmake
# build all of the shared modules.
CHECK_DEPS :=
check-deps:
$(NINJA) -C $(CMAKE_DIR_DBG) check-deps
.PHONY: small_all
small_all: pyston_dbg $(RUN_DEPS)
......@@ -453,7 +454,7 @@ small_all: pyston_dbg $(RUN_DEPS)
# @# have to do this in a recursive make so that dependency is enforced:
# $(MAKE) pyston_all
# all: pyston_dbg pyston_release pyston_oprof pyston_prof $(OPTIONAL_SRCS:.cpp=.o) ext_python ext_pyston
all: pyston_dbg pyston_release pyston_gcc unittests $(RUN_DEPS) $(CHECK_DEPS)
all: pyston_dbg pyston_release pyston_gcc unittests check-deps $(RUN_DEPS)
ALL_HEADERS := $(wildcard src/*/*.h) $(wildcard src/*/*/*.h) $(wildcard from_cpython/Include/*.h)
tags: $(SRCS) $(OPTIONAL_SRCS) $(FROM_CPYTHON_SRCS) $(ALL_HEADERS)
......@@ -513,7 +514,7 @@ cpplint:
check:
@# These are ordered roughly in decreasing order of (chance will expose issue) / (time to run test)
$(MAKE) pyston_dbg $(CHECK_DEPS)
$(MAKE) pyston_dbg check-deps
( cd $(CMAKE_DIR_DBG) && ctest -V )
$(MAKE) pyston_release
......@@ -525,7 +526,7 @@ check:
# Travis-CI do the full test.
.PHONY: quick_check
quick_check:
$(MAKE) pyston_dbg $(CHECK_DEPS)
$(MAKE) pyston_dbg check-deps
$(MAKE) check_format
$(MAKE) unittests
$(PYTHON) $(TOOLS_DIR)/tester.py -R pyston_dbg -j$(TEST_THREADS) -a=-S -k --order-by-mtime $(TESTS_DIR) $(ARGS)
......@@ -952,7 +953,7 @@ endef
define make_target
$(eval \
.PHONY: test$1 check$1
check$1 test$1: $(PYTHON_EXE_DEPS) pyston$1 $(CHECK_DEPS)
check$1 test$1: $(PYTHON_EXE_DEPS) pyston$1
$(PYTHON) $(TOOLS_DIR)/tester.py -R pyston$1 -j$(TEST_THREADS) -a=-S -k $(TESTS_DIR) $(ARGS)
@# we pass -I to cpython tests and skip failing ones because they are sloooow otherwise
$(PYTHON) $(TOOLS_DIR)/tester.py -R pyston$1 -j$(TEST_THREADS) -a=-S -k --exit-code-only --skip-failing -t30 $(TEST_DIR)/cpython $(ARGS)
......@@ -1029,7 +1030,7 @@ $(call make_search,runpy_%)
$(call make_search,pyrun_%)
$(call make_search,pypyrun_%)
nosearch_check_%: %.py pyston_dbg $(CHECK_DEPS)
nosearch_check_%: %.py pyston_dbg check-deps
$(MAKE) check_dbg ARGS="$(patsubst %.py,%,$(notdir $<)) -K"
$(call make_search,check_%)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment