Skip to content

Commit cf50894

Browse files
saschanazkripken
authored andcommitted
Add travis CI (#5614)
1 parent 1ff7294 commit cf50894

File tree

3 files changed

+65
-1
lines changed

3 files changed

+65
-1
lines changed

.travis.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
sudo: required
2+
3+
language: python
4+
5+
env:
6+
- TEST_TARGET=ALL.test_a*
7+
- TEST_TARGET=ALL.test_b*
8+
- TEST_TARGET=ALL.test_c*
9+
- TEST_TARGET="default.test_d* asm1.test_d* asm2.test_d* asm2f.test_d* asm2g.test_d*"
10+
- TEST_TARGET=asm2i.test_d*
11+
- TEST_TARGET="asm2nn.test_d* asm3.test_d*"
12+
- TEST_TARGET=ALL.test_e*
13+
- TEST_TARGET=ALL.test_f*
14+
- TEST_TARGET="ALL.test_g* ALL.test_h* ALL.test_i*"
15+
- TEST_TARGET="ALL.test_j* ALL.test_k* ALL.test_l* ALL.test_m* ALL.test_n* ALL.test_o*"
16+
- TEST_TARGET="default.test_p* asm1.test_p* asm2.test_p* asm2f.test_p* asm2g.test_p*"
17+
- TEST_TARGET=asm2i.test_p*
18+
- TEST_TARGET="asm2nn.test_p* asm3.test_p*"
19+
- TEST_TARGET="ALL.test_q* ALL.test_r* ALL.test_s*"
20+
- TEST_TARGET="ALL.test_t* ALL.test_u* ALL.test_v* ALL.test_x* ALL.test_y* ALL.test_z*"
21+
- TEST_TARGET=other
22+
23+
services:
24+
- docker
25+
26+
before_install:
27+
- docker pull ubuntu:16.04
28+
29+
script:
30+
- echo $TEST_TARGET
31+
- docker build --build-arg TEST_TARGET="$TEST_TARGET" .
32+
33+
notifications:
34+
email: false

Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# For travis
2+
FROM ubuntu:16.04
3+
SHELL ["/bin/bash", "-c"]
4+
ENV DEBIAN_FRONTEND noninteractive
5+
RUN mkdir -p /root/emscripten/
6+
COPY . /root/emscripten/
7+
8+
RUN cd /root/ \
9+
&& apt-get update \
10+
&& apt-get install -y python python-pip wget git cmake build-essential software-properties-common \
11+
&& pip install --upgrade pip \
12+
&& pip install lit \
13+
&& add-apt-repository ppa:webupd8team/java \
14+
&& apt-get update \
15+
&& echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections \
16+
&& echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections \
17+
&& apt-get install -y oracle-java9-installer \
18+
&& wget https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz \
19+
&& tar -xf emsdk-portable.tar.gz \
20+
&& pushd emsdk-portable \
21+
&& ./emsdk update \
22+
&& ./emsdk install latest \
23+
&& ./emsdk activate latest \
24+
&& popd \
25+
&& echo EMSCRIPTEN_ROOT="'/root/emscripten/'" >> .emscripten
26+
27+
ARG TEST_TARGET
28+
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

tests/runner.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1150,14 +1150,16 @@ def skip_requested_tests(args, modules):
11501150
for m in modules:
11511151
try:
11521152
suite = getattr(m, suite_name)
1153-
setattr(suite, test_name, RunnerCore("skipme"))
1153+
setattr(suite, test_name, lambda ignored:RunnerCore("skipme")())
11541154
break
11551155
except:
11561156
pass
11571157
args[i] = None
11581158
return filter(lambda arg: arg is not None, args)
11591159

11601160
def args_for_random_tests(args, modules):
1161+
if len(args) <= 1:
1162+
return args
11611163
first = args[1]
11621164
if first.startswith('random'):
11631165
random_arg = first[6:]

0 commit comments

Comments
 (0)