Skip to content

Add travis build: the third try #5614

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Oct 11, 2017
Merged
34 changes: 34 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
sudo: required

language: python

env:
- TEST_TARGET=ALL.test_a*
- TEST_TARGET=ALL.test_b*
- TEST_TARGET=ALL.test_c*
- TEST_TARGET="default.test_d* asm1.test_d* asm2.test_d* asm2f.test_d* asm2g.test_d*"
- TEST_TARGET=asm2i.test_d*
- TEST_TARGET="asm2nn.test_d* asm3.test_d*"
- TEST_TARGET=ALL.test_e*
- TEST_TARGET=ALL.test_f*
- TEST_TARGET="ALL.test_g* ALL.test_h* ALL.test_i*"
- TEST_TARGET="ALL.test_j* ALL.test_k* ALL.test_l* ALL.test_m* ALL.test_n* ALL.test_o*"
- TEST_TARGET="default.test_p* asm1.test_p* asm2.test_p* asm2f.test_p* asm2g.test_p*"
- TEST_TARGET=asm2i.test_p*
- TEST_TARGET="asm2nn.test_p* asm3.test_p*"
- TEST_TARGET="ALL.test_q* ALL.test_r* ALL.test_s*"
- TEST_TARGET="ALL.test_t* ALL.test_u* ALL.test_v* ALL.test_x* ALL.test_y* ALL.test_z*"
- TEST_TARGET=other

services:
- docker

before_install:
- docker pull ubuntu:16.04

script:
- echo $TEST_TARGET
- docker build --build-arg TEST_TARGET="$TEST_TARGET" .

notifications:
email: false
28 changes: 28 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# For travis
FROM ubuntu:16.04
SHELL ["/bin/bash", "-c"]
ENV DEBIAN_FRONTEND noninteractive
RUN mkdir -p /root/emscripten/
COPY . /root/emscripten/

RUN cd /root/ \
&& apt-get update \
&& apt-get install -y python python-pip wget git cmake build-essential software-properties-common \
&& pip install --upgrade pip \
&& pip install lit \
&& add-apt-repository ppa:webupd8team/java \
&& apt-get update \
&& echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections \
&& echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections \
&& apt-get install -y oracle-java9-installer \
&& wget https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz \
&& tar -xf emsdk-portable.tar.gz \
&& pushd emsdk-portable \
&& ./emsdk update \
&& ./emsdk install latest \
&& ./emsdk activate latest \
&& popd \
&& echo EMSCRIPTEN_ROOT="'/root/emscripten/'" >> .emscripten

ARG TEST_TARGET
RUN python /root/emscripten/tests/runner.py $TEST_TARGET skip:ALL.test_sse1_full skip:ALL.test_sse2_full skip:ALL.test_sse3_full skip:ALL.test_ssse3_full skip:ALL.test_sse4_1_full skip:other.test_native_link_error_message skip:other.test_bad_triple skip:ALL.test_binaryen skip:other.test_binaryen* skip:other.test_on_abort skip:other.test_sysconf_phys_pages skip:other.test_wasm_targets skip:other.test_symbol_map skip:other.test_legalize_js_ffi
4 changes: 3 additions & 1 deletion tests/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -1150,14 +1150,16 @@ def skip_requested_tests(args, modules):
for m in modules:
try:
suite = getattr(m, suite_name)
setattr(suite, test_name, RunnerCore("skipme"))
setattr(suite, test_name, lambda ignored:RunnerCore("skipme")())
break
except:
pass
args[i] = None
return filter(lambda arg: arg is not None, args)

def args_for_random_tests(args, modules):
if len(args) <= 1:
return args
first = args[1]
if first.startswith('random'):
random_arg = first[6:]
Expand Down