diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2019-04-02 11:44:28 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2019-04-02 11:54:20 -0700 |
| commit | 742b0330c55f70ba4bc5075a656f62ca881b4898 (patch) | |
| tree | eeb7536b4b616e60ae16b4f5866f1c8261093597 /library/compiler-builtins/ci/run.sh | |
| parent | a2b87a1a7fdba9c76f4c4d1b6ee273fb1b1ecfe4 (diff) | |
| download | rust-742b0330c55f70ba4bc5075a656f62ca881b4898.tar.gz rust-742b0330c55f70ba4bc5075a656f62ca881b4898.zip | |
Try to handle thumb targets and xargo
Diffstat (limited to 'library/compiler-builtins/ci/run.sh')
| -rwxr-xr-x | library/compiler-builtins/ci/run.sh | 65 |
1 files changed, 29 insertions, 36 deletions
diff --git a/library/compiler-builtins/ci/run.sh b/library/compiler-builtins/ci/run.sh index b77752288d9..589553adbf2 100755 --- a/library/compiler-builtins/ci/run.sh +++ b/library/compiler-builtins/ci/run.sh @@ -3,14 +3,10 @@ set -ex # FIXME(japarix/xargo#186) this shouldn't be necessary export RUST_TARGET_PATH=`pwd` -case $1 in - thumb*) - cargo=xargo - ;; - *) - cargo=cargo - ;; -esac +cargo=cargo +if [ "$XARGO" = "1" ]; then + cargo=xargo +fi INTRINSICS_FEATURES="c" @@ -22,34 +18,31 @@ if [ -z "$INTRINSICS_FAILS_WITH_MEM_FEATURE" ]; then fi # Test our implementation -case $1 in - thumb*) - run="xargo test --manifest-path testcrate/Cargo.toml --target $1" - for t in $(ls testcrate/tests); do - t=${t%.rs} - - RUSTFLAGS="-C debug-assertions=no -C lto" \ - CARGO_INCREMENTAL=0 \ - $run --test $t --no-default-features --features 'mem c' --no-run - qemu-arm-static target/${1}/debug/$t-* - done - - for t in $(ls testcrate/tests); do - t=${t%.rs} - RUSTFLAGS="-C lto" \ - CARGO_INCREMENTAL=0 \ - $run --test $t --no-default-features --features 'mem c' --no-run --release - qemu-arm-static target/${1}/release/$t-* - done - ;; - *) - run="cargo test --manifest-path testcrate/Cargo.toml --target $1" - $run - $run --release - $run --features c - $run --features c --release - ;; -esac +if [ "$XARGO" = "1" ]; then + run="xargo test --manifest-path testcrate/Cargo.toml --target $1" + for t in $(ls testcrate/tests); do + t=${t%.rs} + + RUSTFLAGS="-C debug-assertions=no -C lto" \ + CARGO_INCREMENTAL=0 \ + $run --test $t --no-default-features --features 'mem c' --no-run + qemu-arm-static target/${1}/debug/$t-* + done + + for t in $(ls testcrate/tests); do + t=${t%.rs} + RUSTFLAGS="-C lto" \ + CARGO_INCREMENTAL=0 \ + $run --test $t --no-default-features --features 'mem c' --no-run --release + qemu-arm-static target/${1}/release/$t-* + done +else + run="cargo test --manifest-path testcrate/Cargo.toml --target $1" + $run + $run --release + $run --features c + $run --features c --release +fi PREFIX=$(echo $1 | sed -e 's/unknown-//')- case $1 in |
