compiler-builtins-zynq/ci/script.sh

34 lines
533 B
Bash
Raw Normal View History

2016-08-08 05:55:30 +08:00
set -ex
. $(dirname $0)/env.sh
2016-08-08 06:03:44 +08:00
build() {
cargo build --target $TARGET
cargo build --target $TARGET --release
2016-08-08 05:55:30 +08:00
}
2016-08-08 06:03:44 +08:00
run_tests() {
if [[ $QEMU_LD_PREFIX ]]; then
export RUST_TEST_THREADS=1
2016-08-08 05:55:30 +08:00
fi
2016-08-08 06:03:44 +08:00
cargo test --target $TARGET
cargo test --target $TARGET --release
}
2016-08-08 05:55:30 +08:00
2016-08-08 06:03:44 +08:00
inspect() {
2016-08-08 06:29:31 +08:00
$PREFIX$NM -g --defined-only target/**/debug/*.rlib
2016-08-08 06:13:29 +08:00
set +e
2016-08-08 06:29:31 +08:00
$PREFIX$OBJDUMP -Cd target/**/debug/*.rlib
$PREFIX$OBJDUMP -Cd target/**/release/*.rlib
2016-08-08 06:13:29 +08:00
set -e
2016-08-08 05:55:30 +08:00
}
main() {
2016-08-08 06:03:44 +08:00
build
run_tests
inspect
2016-08-08 05:55:30 +08:00
}
main