Skip to content

Commit 72c3148

Browse files
committed
More test fixes from rollup
1 parent 5e8d7a4 commit 72c3148

File tree

13 files changed

+162
-53
lines changed

13 files changed

+162
-53
lines changed

.travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ git:
99
submodules: false
1010

1111
matrix:
12+
fast_finish: true
1213
include:
1314
# Linux builders, all docker images
1415
- env: IMAGE=android DEPLOY=1
@@ -23,6 +24,7 @@ matrix:
2324
- env: IMAGE=dist-powerpc64-linux DEPLOY=1
2425
- env: IMAGE=dist-s390x-linux-netbsd DEPLOY=1
2526
- env: IMAGE=dist-x86-linux DEPLOY=1
27+
- env: IMAGE=emscripten
2628
- env: IMAGE=i686-gnu
2729
- env: IMAGE=i686-gnu-nopt
2830
- env: IMAGE=x86_64-gnu

appveyor.yml

+3
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ environment:
7373
MINGW_DIR: mingw64
7474
DEPLOY: 1
7575

76+
matrix:
77+
fast_finish: true
78+
7679
clone_depth: 1
7780
build: false
7881

src/bootstrap/compile.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,11 @@ pub fn rustc(build: &Build, target: &str, compiler: &Compiler) {
213213
if let Some(s) = target_config.and_then(|c| c.llvm_config.as_ref()) {
214214
cargo.env("CFG_LLVM_ROOT", s);
215215
}
216-
if build.config.llvm_static_stdcpp {
216+
// Building with a static libstdc++ is only supported on linux right now,
217+
// not for MSVC or OSX
218+
if build.config.llvm_static_stdcpp &&
219+
!target.contains("windows") &&
220+
!target.contains("apple") {
217221
cargo.env("LLVM_STATIC_STDCPP",
218222
compiler_file(build.cxx(target), "libstdc++.a"));
219223
}

src/ci/docker/cross/build-arm-musl.sh

+27-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.
@@ -13,48 +13,64 @@ set -ex
1313

1414
MUSL=1.1.16
1515

16+
hide_output() {
17+
set +x
18+
on_err="
19+
echo ERROR: An error was encountered with the build.
20+
cat /tmp/build.log
21+
exit 1
22+
"
23+
trap "$on_err" ERR
24+
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
25+
PING_LOOP_PID=$!
26+
$@ &> /tmp/build.log
27+
trap - ERR
28+
kill $PING_LOOP_PID
29+
rm /tmp/build.log
30+
set -x
31+
}
32+
1633
curl -O https://www.musl-libc.org/releases/musl-$MUSL.tar.gz
1734
tar xf musl-$MUSL.tar.gz
1835
cd musl-$MUSL
1936
CC=arm-linux-gnueabi-gcc \
2037
CFLAGS="-march=armv6 -marm" \
21-
./configure \
38+
hide_output ./configure \
2239
--prefix=/usr/local/arm-linux-musleabi \
2340
--enable-wrapper=gcc
24-
make -j$(nproc)
25-
make install
41+
hide_output make -j$(nproc)
42+
hide_output make install
2643
cd ..
2744
rm -rf musl-$MUSL
2845

2946
tar xf musl-$MUSL.tar.gz
3047
cd musl-$MUSL
3148
CC=arm-linux-gnueabihf-gcc \
3249
CFLAGS="-march=armv6 -marm" \
33-
./configure \
50+
hide_output ./configure \
3451
--prefix=/usr/local/arm-linux-musleabihf \
3552
--enable-wrapper=gcc
36-
make -j$(nproc)
37-
make install
53+
hide_output make -j$(nproc)
54+
hide_output make install
3855
cd ..
3956
rm -rf musl-$MUSL
4057

4158
tar xf musl-$MUSL.tar.gz
4259
cd musl-$MUSL
4360
CC=arm-linux-gnueabihf-gcc \
4461
CFLAGS="-march=armv7-a" \
45-
./configure \
62+
hide_output ./configure \
4663
--prefix=/usr/local/armv7-linux-musleabihf \
4764
--enable-wrapper=gcc
48-
make -j$(nproc)
49-
make install
65+
hide_output make -j$(nproc)
66+
hide_output make install
5067
cd ..
5168
rm -rf musl-$MUSL*
5269

5370
ln -nsf ../arm-linux-musleabi/bin/musl-gcc /usr/local/bin/arm-linux-musleabi-gcc
5471
ln -nsf ../arm-linux-musleabihf/bin/musl-gcc /usr/local/bin/arm-linux-musleabihf-gcc
5572
ln -nsf ../armv7-linux-musleabihf/bin/musl-gcc /usr/local/bin/armv7-linux-musleabihf-gcc
5673

57-
5874
curl -L https://github.com/llvm-mirror/llvm/archive/release_39.tar.gz | tar xzf -
5975
curl -L https://github.com/llvm-mirror/libunwind/archive/release_39.tar.gz | tar xzf -
6076

src/ci/docker/cross/build-rumprun.sh

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ exit 1
2828
set -x
2929
}
3030

31-
3231
git clone https://github.com/rumpkernel/rumprun
3332
cd rumprun
3433
git reset --hard 39a97f37a85e44c69b662f6b97b688fbe892603b

src/ci/docker/dist-arm-linux/Dockerfile

+2-16
Original file line numberDiff line numberDiff line change
@@ -58,22 +58,8 @@ RUN mkdir /x-tools && chown rustbuild:rustbuild /x-tools
5858
USER rustbuild
5959
WORKDIR /tmp
6060

61-
COPY arm-linux-gnueabi.config /tmp/
62-
RUN mkdir build && \
63-
cd build && \
64-
cp ../arm-linux-gnueabi.config .config && \
65-
ct-ng oldconfig && \
66-
ct-ng build && \
67-
cd .. && \
68-
rm -rf build
69-
COPY arm-linux-gnueabihf.config /tmp/
70-
RUN mkdir build && \
71-
cd build && \
72-
cp ../arm-linux-gnueabihf.config .config && \
73-
ct-ng oldconfig && \
74-
ct-ng build && \
75-
cd .. && \
76-
rm -rf build
61+
COPY arm-linux-gnueabihf.config arm-linux-gnueabi.config build-toolchains.sh /tmp/
62+
RUN ./build-toolchains.sh
7763

7864
USER root
7965

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/bin/bash
2+
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
3+
# file at the top-level directory of this distribution and at
4+
# http://rust-lang.org/COPYRIGHT.
5+
#
6+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
7+
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
8+
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
9+
# option. This file may not be copied, modified, or distributed
10+
# except according to those terms.
11+
12+
set -ex
13+
14+
hide_output() {
15+
set +x
16+
on_err="
17+
echo ERROR: An error was encountered with the build.
18+
cat /tmp/build.log
19+
exit 1
20+
"
21+
trap "$on_err" ERR
22+
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
23+
PING_LOOP_PID=$!
24+
$@ &> /tmp/build.log
25+
rm /tmp/build.log
26+
trap - ERR
27+
kill $PING_LOOP_PID
28+
set -x
29+
}
30+
31+
mkdir build
32+
cd build
33+
cp ../arm-linux-gnueabi.config .config
34+
ct-ng oldconfig
35+
hide_output ct-ng build
36+
cd ..
37+
rm -rf build
38+
39+
mkdir build
40+
cd build
41+
cp ../arm-linux-gnueabihf.config .config
42+
ct-ng oldconfig
43+
hide_output ct-ng build
44+
cd ..
45+
rm -rf build

src/ci/docker/dist-armv7-aarch64-linux/Dockerfile

+2-15
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,8 @@ USER rustbuild
5959
WORKDIR /tmp
6060

6161
COPY armv7-linux-gnueabihf.config /tmp/
62-
RUN mkdir build && \
63-
cd build && \
64-
cp ../armv7-linux-gnueabihf.config .config && \
65-
ct-ng oldconfig && \
66-
ct-ng build && \
67-
cd .. && \
68-
rm -rf build
69-
COPY aarch64-linux-gnu.config /tmp/
70-
RUN mkdir build && \
71-
cd build && \
72-
cp ../aarch64-linux-gnu.config .config && \
73-
ct-ng oldconfig && \
74-
ct-ng build && \
75-
cd .. && \
76-
rm -rf build
62+
COPY armv7-linux-gnueabihf.config aarch64-linux-gnu.config build-toolchains.sh /tmp/
63+
RUN ./build-toolchains.sh
7764

7865
USER root
7966

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/bin/bash
2+
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
3+
# file at the top-level directory of this distribution and at
4+
# http://rust-lang.org/COPYRIGHT.
5+
#
6+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
7+
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
8+
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
9+
# option. This file may not be copied, modified, or distributed
10+
# except according to those terms.
11+
12+
set -ex
13+
14+
hide_output() {
15+
set +x
16+
on_err="
17+
echo ERROR: An error was encountered with the build.
18+
cat /tmp/build.log
19+
exit 1
20+
"
21+
trap "$on_err" ERR
22+
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
23+
PING_LOOP_PID=$!
24+
$@ &> /tmp/build.log
25+
rm /tmp/build.log
26+
trap - ERR
27+
kill $PING_LOOP_PID
28+
set -x
29+
}
30+
31+
mkdir build
32+
cd build
33+
cp ../armv7-linux-gnueabihf.config .config
34+
ct-ng oldconfig
35+
hide_output ct-ng build
36+
cd ..
37+
rm -rf build
38+
39+
mkdir build
40+
cd build
41+
cp ../aarch64-linux-gnu.config .config
42+
ct-ng oldconfig
43+
hide_output ct-ng build
44+
cd ..
45+
rm -rf build

src/ci/docker/emscripten/build-emscripten.sh

+20-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,26 @@
1111

1212
set -ex
1313

14+
hide_output() {
15+
set +x
16+
on_err="
17+
echo ERROR: An error was encountered with the build.
18+
cat /tmp/build.log
19+
exit 1
20+
"
21+
trap "$on_err" ERR
22+
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
23+
PING_LOOP_PID=$!
24+
$@ &> /tmp/build.log
25+
trap - ERR
26+
kill $PING_LOOP_PID
27+
rm /tmp/build.log
28+
set -x
29+
}
30+
1431
curl https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz | \
1532
tar xzf -
1633
source emsdk_portable/emsdk_env.sh
17-
emsdk update
18-
emsdk install --build=Release sdk-tag-1.37.1-32bit
19-
emsdk activate --build=Release sdk-tag-1.37.1-32bit
34+
hide_output emsdk update
35+
hide_output emsdk install --build=Release sdk-tag-1.37.1-32bit
36+
hide_output emsdk activate --build=Release sdk-tag-1.37.1-32bit

src/ci/docker/linux-tested-targets/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ ENV RUST_CONFIGURE_ARGS \
3232
--musl-root-x86_64=/musl-x86_64 \
3333
--musl-root-i686=/musl-i686
3434

35+
# FIXME should also test i686-unknown-linux-musl
3536
ENV SCRIPT \
3637
python2.7 ../x.py test \
3738
--target x86_64-unknown-linux-musl \
38-
--target i686-unknown-linux-musl \
3939
--target i586-unknown-linux-gnu \
4040
&& \
4141
python2.7 ../x.py dist \

src/librustc_trans/back/write.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,8 @@ pub fn run_passes(sess: &Session,
668668
// Sanity check
669669
assert!(trans.modules.len() == sess.opts.cg.codegen_units ||
670670
sess.opts.debugging_opts.incremental.is_some() ||
671-
!sess.opts.output_types.should_trans());
671+
!sess.opts.output_types.should_trans() ||
672+
sess.opts.debugging_opts.no_trans);
672673

673674
let tm = create_target_machine(sess);
674675

src/test/run-pass/sse2.rs

+8-4
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,14 @@
1313
use std::env;
1414

1515
fn main() {
16-
// Skip this tests on i586-unknown-linux-gnu where sse2 is disabled
17-
let real_target = env::var("TARGET").unwrap();
18-
if real_target.contains("i586") {
19-
return
16+
match env::var("TARGET") {
17+
Ok(s) => {
18+
// Skip this tests on i586-unknown-linux-gnu where sse2 is disabled
19+
if s.contains("i586") {
20+
return
21+
}
22+
}
23+
Err(_) => return,
2024
}
2125
if cfg!(any(target_arch = "x86", target_arch = "x86_64")) {
2226
assert!(cfg!(target_feature = "sse2"),

0 commit comments

Comments
 (0)