Commit 5ff16de6 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Merge pull request #704 from kmod/travis_additions

travis-ci fixes
parents cf04e092 1ed0cf75
...@@ -6,22 +6,22 @@ compiler: ...@@ -6,22 +6,22 @@ compiler:
env: env:
matrix: matrix:
- TRAVIS_BUILD_TYPE=Debug - TRAVIS_BUILD_TYPE=Debug CCACHE_DIR=$HOME/.ccache_debug
- TRAVIS_BUILD_TYPE=Release - TRAVIS_BUILD_TYPE=Release CCACHE_DIR=$HOME/.ccache_release
global: global:
- PYSTON_RUN_ARGS=G - PYSTON_RUN_ARGS=G
matrix: matrix:
exclude: exclude:
- compiler: gcc - compiler: gcc
env: TRAVIS_BUILD_TYPE=Debug env: TRAVIS_BUILD_TYPE=Debug CCACHE_DIR=$HOME/.ccache_debug
# use travis-ci docker based infrastructure # use travis-ci docker based infrastructure
sudo: false sudo: false
cache: cache:
directories: directories:
- $HOME/.ccache - ${CCACHE_DIR}
addons: addons:
apt: apt:
...@@ -51,6 +51,7 @@ addons: ...@@ -51,6 +51,7 @@ addons:
before_install: before_install:
- if [ "$CC" = "clang" ]; then export CC="clang-3.5" CXX="clang++-3.5"; fi - if [ "$CC" = "clang" ]; then export CC="clang-3.5" CXX="clang++-3.5"; fi
- if [ "$CC" = "gcc" ]; then export CC="gcc-4.8" CXX="g++-4.8"; fi - if [ "$CC" = "gcc" ]; then export CC="gcc-4.8" CXX="g++-4.8"; fi
- $CXX --version
install: install:
- git clone git://github.com/llvm-mirror/llvm.git ~/pyston_deps/llvm-trunk - git clone git://github.com/llvm-mirror/llvm.git ~/pyston_deps/llvm-trunk
......
...@@ -252,9 +252,9 @@ endmacro() ...@@ -252,9 +252,9 @@ endmacro()
# tests testname directory arguments # tests testname directory arguments
add_pyston_test(defaults tests --order-by-mtime) add_pyston_test(defaults tests --order-by-mtime)
add_pyston_test(old_parser tests -a=-n -a=-x) add_pyston_test(old_parser tests -a=-n -a=-x -t50)
if(${CMAKE_BUILD_TYPE} STREQUAL "Release") if(${CMAKE_BUILD_TYPE} STREQUAL "Release")
add_pyston_test(max_compilation_tier tests -a=-O -a=-x) add_pyston_test(max_compilation_tier tests -a=-O -a=-x -t50)
endif() endif()
add_pyston_test(defaults cpython --exit-code-only --skip-failing -t50) add_pyston_test(defaults cpython --exit-code-only --skip-failing -t50)
add_pyston_test(defaults integration --exit-code-only --skip-failing -t600) add_pyston_test(defaults integration --exit-code-only --skip-failing -t600)
......
...@@ -81,8 +81,8 @@ else ...@@ -81,8 +81,8 @@ else
endif endif
TOOLS_DIR := ./tools TOOLS_DIR := ./tools
TEST_DIR := ./test TEST_DIR := $(abspath ./test)
TESTS_DIR := ./test/tests TESTS_DIR := $(abspath ./test/tests)
GPP := $(GCC_DIR)/bin/g++ GPP := $(GCC_DIR)/bin/g++
GCC := $(GCC_DIR)/bin/gcc GCC := $(GCC_DIR)/bin/gcc
......
...@@ -151,6 +151,9 @@ private: ...@@ -151,6 +151,9 @@ private:
struct Storage { struct Storage {
PerThreadSet<T, CtorArgs...>* self; PerThreadSet<T, CtorArgs...>* self;
#ifndef NDEBUG
pthread_t my_tid;
#endif
T val; T val;
}; };
...@@ -164,6 +167,8 @@ private: ...@@ -164,6 +167,8 @@ private:
auto* self = s->self; auto* self = s->self;
LOCK_REGION(&self->lock); LOCK_REGION(&self->lock);
assert(s->my_tid == pthread_self());
// I assume this destructor gets called on the same thread // I assume this destructor gets called on the same thread
// that this data is bound to: // that this data is bound to:
assert(self->map.count(pthread_self())); assert(self->map.count(pthread_self()));
...@@ -173,7 +178,11 @@ private: ...@@ -173,7 +178,11 @@ private:
} }
template <int... S> Storage* make(impl::seq<S...>) { template <int... S> Storage* make(impl::seq<S...>) {
return new Storage{.self = this, .val = T(std::get<S>(ctor_args)...) }; return new Storage{.self = this,
#ifndef NDEBUG
.my_tid = pthread_self(),
#endif
.val = T(std::get<S>(ctor_args)...) };
} }
public: public:
......
...@@ -155,8 +155,16 @@ static void enableGdbSegfaultWatcher() { ...@@ -155,8 +155,16 @@ static void enableGdbSegfaultWatcher() {
int rtncode = 0; int rtncode = 0;
if (WIFEXITED(status)) if (WIFEXITED(status))
rtncode = WEXITSTATUS(status); rtncode = WEXITSTATUS(status);
else else {
rtncode = 128 + WTERMSIG(status); int from_signal = WTERMSIG(status);
// Try to die in the same way that the child did:
signal(from_signal, SIG_DFL);
raise(from_signal);
// If somehow that didn't work, fall back to this:
exit(128 + from_signal);
}
exit(rtncode); exit(rtncode);
} }
......
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