Created
July 8, 2010 18:09
-
-
Save sfiera/468371 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -o errexit | |
PERFTOOLS=google-perftools-1.5 | |
if (($# == 1)); then | |
VERSION=$1 | |
CONFIGFLAGS= | |
export CC=gcc-$VERSION | |
export CXX=g++-$VERSION | |
elif (($# == 2)); then | |
VERSION=$1 | |
BUILD=$2 | |
CONFIGFLAGS="$CONFIGFLAGS --build=$BUILD" | |
export CC=$BUILD-gcc-$VERSION | |
export CXX=$BUILD-g++-$VERSION | |
else | |
echo 1>&2 "usage: $0 VERSION [BUILD]" | |
exit 1 | |
fi | |
echo "Testing $CXX..." | |
( | |
exec > build-$CXX.log 2>&1 | |
rm -Rf $PERFTOOLS | |
unzip $PERFTOOLS.zip | |
cd $PERFTOOLS | |
./configure $CONFIGFLAGS | |
make | |
) | |
if DYLD_LIBRARY_PATH=$PERFTOOLS/.libs $PERFTOOLS/.libs/heap-profiler_unittest; then | |
echo "...SUCCESS" | |
else | |
echo "...FAILURE" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -o errexit | |
./test.sh 4.0 | |
./test.sh 4.2 | |
./test.sh 4.0.1 i686-apple-darwin10 | |
./test.sh 4.2.1 i686-apple-darwin10 | |
./test.sh 4.0.1 powerpc-apple-darwin10 | |
./test.sh 4.2.1 powerpc-apple-darwin10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% ./testall-10.6.sh | |
Testing g++-4.0... | |
Starting tracking the heap | |
Starting tracking the heap | |
DONE. | |
...SUCCESS | |
Testing g++-4.2... | |
Starting tracking the heap | |
Had other new/delete MallocHook-s set. Are you using the heap leak checker? Use --heap_check="" to avoid this conflict. | |
./test.sh: line 36: 28555 Abort trap DYLD_LIBRARY_PATH=$PERFTOOLS/.libs $PERFTOOLS/.libs/heap-profiler_unittest | |
...FAILURE | |
Testing i686-apple-darwin10-g++-4.0.1... | |
Starting tracking the heap | |
Starting tracking the heap | |
DONE. | |
...SUCCESS | |
Testing i686-apple-darwin10-g++-4.2.1... | |
Starting tracking the heap | |
Starting tracking the heap | |
DONE. | |
...SUCCESS | |
Testing powerpc-apple-darwin10-g++-4.0.1... | |
Starting tracking the heap | |
Starting tracking the heap | |
DONE. | |
...SUCCESS | |
Testing powerpc-apple-darwin10-g++-4.2.1... | |
Starting tracking the heap | |
Starting tracking the heap | |
DONE. | |
...SUCCESS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment