use the gist crate

but not on OSX because it doesn't work there

closes #53
cc #51
This commit is contained in:
Jorge Aparicio 2016-08-22 18:03:21 -05:00
parent 5c9bfabcdf
commit 316f5cb9ba
3 changed files with 22 additions and 27 deletions

View File

@ -21,9 +21,8 @@ test_script:
on_success: on_success:
- cmd: | - cmd: |
CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
dumpbin /disasm target/release/librustc_builtins.rlib | dumpbin /disasm target/release/librustc_builtins.rlib | gist -d "'%TARGET%/rustc-builtins.rlib' from commit '%APPVEYOR_REPO_COMMIT%' on branch '%APPVEYOR_REPO_branch%'"
gist -d "'%TARGET%/rustc-builtins.rlib' from commit '%APPVEYOR_REPO_COMMIT%' on branch '%APPVEYOR_REPO_branch%'"
branches: branches:
only: only:

View File

@ -42,17 +42,6 @@ install_xargo() {
fi fi
} }
install_wgetpaste() {
if [[ $TRAVIS_OS_NAME == "osx" ]]; then
brew install wgetpaste
else
curl -O http://wgetpaste.zlin.dk/wgetpaste-2.28.tar.bz2
tar -xvf wgetpaste-2.28.tar.bz2
sudo mv ./wgetpaste-2.28/wgetpaste /usr/bin
rm -r wgetpaste-2.28*
fi
}
main() { main() {
if [[ $TRAVIS_OS_NAME == "osx" || ${IN_DOCKER_CONTAINER:-n} == "y" ]]; then if [[ $TRAVIS_OS_NAME == "osx" || ${IN_DOCKER_CONTAINER:-n} == "y" ]]; then
install_qemu install_qemu
@ -60,7 +49,6 @@ main() {
install_rust install_rust
add_rustup_target add_rustup_target
install_xargo install_xargo
install_wgetpaste
fi fi
} }

View File

@ -2,8 +2,8 @@ set -ex
. $(dirname $0)/env.sh . $(dirname $0)/env.sh
gist() { gist_it() {
wgetpaste -s gists -d "'$1' from commit '$TRAVIS_COMMIT' on branch '$TRAVIS_BRANCH'" gist -ap -f "'$1' from commit '$TRAVIS_COMMIT' on branch '$TRAVIS_BRANCH'"
echo "Disassembly available at the above URL." echo "Disassembly available at the above URL."
} }
@ -16,18 +16,24 @@ inspect() {
$PREFIX$NM -g --defined-only target/**/debug/*.rlib $PREFIX$NM -g --defined-only target/**/debug/*.rlib
set +e set +e
$PREFIX$OBJDUMP -Cd target/**/release/*.rlib | gist "$TARGET/rustc-builtins.rlib" case $TRAVIS_OS_NAME in
linux)
$PREFIX$OBJDUMP -Cd target/**/release/*.rlib | gist_it "$TARGET/rustc-builtins.rlib"
;;
osx)
$PREFIX$OBJDUMP -Cd target/**/release/*.rlib
;;
esac
set -e set -e
# Check presence of weak symbols # Check presence of weak symbols
case $TRAVIS_OS_NAME in if [[ $TRAVIS_OS_NAME = "linux" ]]; then
linux) local symbols=( memcmp memcpy memmove memset )
local symbols=( memcmp memcpy memmove memset ) for symbol in "${symbols[@]}"; do
for symbol in "${symbols[@]}"; do $PREFIX$NM target/**/debug/deps/librlibc*.rlib | grep -q "W $symbol"
$PREFIX$NM target/**/debug/deps/librlibc*.rlib | grep -q "W $symbol" done
done fi
;;
esac
} }
run_tests() { run_tests() {
@ -43,12 +49,14 @@ run_tests() {
main() { main() {
if [[ $TRAVIS_OS_NAME == "linux" && ${IN_DOCKER_CONTAINER:-n} == "n" ]]; then if [[ $TRAVIS_OS_NAME == "linux" && ${IN_DOCKER_CONTAINER:-n} == "n" ]]; then
local tag=2016-08-13 local tag=2016-08-22
docker run \ docker run \
--privileged \ --privileged \
-e IN_DOCKER_CONTAINER=y \ -e IN_DOCKER_CONTAINER=y \
-e TARGET=$TARGET \ -e TARGET=$TARGET \
-e TRAVIS_BRANCH=$TRAVIS_BRANCH \
-e TRAVIS_COMMIT=$TRAVIS_COMMIT \
-e TRAVIS_OS_NAME=$TRAVIS_OS_NAME \ -e TRAVIS_OS_NAME=$TRAVIS_OS_NAME \
-v $(pwd):/mnt \ -v $(pwd):/mnt \
japaric/rustc-builtins:$tag \ japaric/rustc-builtins:$tag \