Index: tools/valgrind-webrtc/webrtc_tests.sh |
diff --git a/tools/valgrind-webrtc/webrtc_tests.sh b/tools/valgrind-webrtc/webrtc_tests.sh |
index 7d752dfec446e08f0924dabd96e727d05d07e248..02b67c3b8a04965d7ae86363e8f561c29d685bcf 100755 |
--- a/tools/valgrind-webrtc/webrtc_tests.sh |
+++ b/tools/valgrind-webrtc/webrtc_tests.sh |
@@ -13,11 +13,30 @@ |
# This script is a copy of the chrome_tests.sh wrapper script with the following |
# changes: |
# - The locate_valgrind.sh of Chromium's Valgrind scripts dir is used to locate |
-# the Valgrind framework install. |
+# the Valgrind framework install. If it fails a fallback path is used instead |
+# (../../chromium/src/third_party/valgrind/linux_x64) and a warning message |
+# is showed by |show_locate_valgrind_failed_warning|. |
# - webrtc_tests.py is invoked instead of chrome_tests.py. |
# - Chromium's Valgrind scripts directory is added to the PYTHONPATH to make it |
# possible to execute the Python scripts properly. |
+show_locate_valgrind_failed_warning() { |
+ echo |
+ echo "-------------------- WARNING ------------------------" |
+ echo "locate_valgrind.sh failed." |
+ echo "Using $CHROME_VALGRIND as a fallback location." |
+ echo "Please make sure you have followed the instructions at" |
+ echo "http://www.chromium.org/developers/how-tos/using-valgrind/get-valgrind" |
+ echo "Notice: In the .gclient file, you need to add this for the 'src'" |
+ echo "solution since our directory structure is different from Chromium's:" |
+ echo "\"custom_deps\": {" |
+ echo " \"src/chromium/src/third_party/valgrind\":" |
+ echo " \"https://chromium.googlesource.com/chromium/deps/valgrind/binaries\"," |
+ echo "}," |
+ echo "-----------------------------------------------------" |
+ echo |
+} |
+ |
export THISDIR=`dirname $0` |
ARGV_COPY="$@" |
@@ -51,13 +70,15 @@ esac |
# scripts dir to locate the Valgrind framework install |
CHROME_VALGRIND_SCRIPTS=$THISDIR/../valgrind |
+SHOW_WARNING=0 |
if [ "$NEEDS_VALGRIND" == "1" ] |
then |
CHROME_VALGRIND=`sh $CHROME_VALGRIND_SCRIPTS/locate_valgrind.sh` |
if [ "$CHROME_VALGRIND" = "" ] |
then |
- # locate_valgrind.sh failed |
- exit 1 |
+ CHROME_VALGRIND=../../chromium/src/third_party/valgrind/linux_x64 |
+ SHOW_WARNING=1 |
+ show_locate_valgrind_failed_warning |
kjellander_webrtc
2016/11/24 18:58:19
What's the point with showing the warning twice?
ehmaldonado_webrtc
2016/11/24 19:52:31
Just thought it would be almost impossible to miss
|
fi |
echo "Using valgrind binaries from ${CHROME_VALGRIND}" |
@@ -82,3 +103,7 @@ fi |
# the scripts that are needed for this script to run |
PYTHONPATH=$THISDIR/../python/google:$CHROME_VALGRIND_SCRIPTS python \ |
"$THISDIR/webrtc_tests.py" $ARGV_COPY |
+if [ $SHOW_WARNING ] |
+then |
+ show_locate_valgrind_failed_warning |
+fi |