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,14 +36,13 @@ then ...@@ -36,14 +36,13 @@ 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" != "" ]
then
# The binaries should be in third_party/valgrind # The binaries should be in third_party/valgrind
# (checked out from deps/third_party/valgrind/binaries). # (checked out from deps/third_party/valgrind/binaries).
CHROME_VALGRIND="$THISDIR/../../third_party/valgrind/$PLATFORM" CHROME_VALGRIND="$THISDIR/../../third_party/valgrind/$PLATFORM"
...@@ -54,14 +53,7 @@ then ...@@ -54,14 +53,7 @@ then
[ "$PLATFORM" != "mac_10.7" ] [ "$PLATFORM" != "mac_10.7" ]
then then
# Get rid of all "../" dirs # Get rid of all "../" dirs
CHROME_VALGRIND=`readlink -f $CHROME_VALGRIND` CHROME_VALGRIND=$(readlink -f $CHROME_VALGRIND)
fi
if ! test -x $CHROME_VALGRIND/bin/valgrind
then
# We couldn't find the binaries in third_party/valgrind
CHROME_VALGRIND=""
fi
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