Commit e7c0b90a authored by timurrrr's avatar timurrrr Committed by Commit bot

Simplify tools/valgrind/locate_valgrind.sh: only allow whitelisted platforms

TEST=./tools/valgrind/chrome_tests.sh -t cmdline -- echo "hello"

Review URL: https://codereview.chromium.org/966363003

Cr-Commit-Position: refs/heads/master@{#318904}
parent c9182205
...@@ -36,32 +36,24 @@ then ...@@ -36,32 +36,24 @@ then
PLATFORM="mac_10.7" PLATFORM="mac_10.7"
;; ;;
*) *)
echo "Unknown platform:" >&2 (echo "Sorry, your platform is not supported:" &&
uname -a >&2 uname -a
echo "We'll try to search for valgrind binaries installed in /usr/local" >&2 echo
PLATFORM= echo "If you're on Mac OS X, please see http://crbug.com/441425") >&2
exit 42
esac esac
if [ "$PLATFORM" != "" ] # The binaries should be in third_party/valgrind
then # (checked out from deps/third_party/valgrind/binaries).
# The binaries should be in third_party/valgrind CHROME_VALGRIND="$THISDIR/../../third_party/valgrind/$PLATFORM"
# (checked out from deps/third_party/valgrind/binaries).
CHROME_VALGRIND="$THISDIR/../../third_party/valgrind/$PLATFORM"
# TODO(timurrrr): readlink -f is not present on Mac...
if [ "$PLATFORM" != "mac" ] && \
[ "$PLATFORM" != "mac_10.6" ] && \
[ "$PLATFORM" != "mac_10.7" ]
then
# Get rid of all "../" dirs
CHROME_VALGRIND=`readlink -f $CHROME_VALGRIND`
fi
if ! test -x $CHROME_VALGRIND/bin/valgrind # TODO(timurrrr): readlink -f is not present on Mac...
then if [ "$PLATFORM" != "mac" ] && \
# We couldn't find the binaries in third_party/valgrind [ "$PLATFORM" != "mac_10.6" ] && \
CHROME_VALGRIND="" [ "$PLATFORM" != "mac_10.7" ]
fi then
# Get rid of all "../" dirs
CHROME_VALGRIND=$(readlink -f $CHROME_VALGRIND)
fi fi
fi fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment