Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(627)

Unified Diff: tools/check-static-initializers.sh

Issue 10383128: Prepare for using GYP build on buildbots (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/test262/testcfg.py ('k') | tools/presubmit.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/check-static-initializers.sh
diff --git a/tools/check-static-initializers.sh b/tools/check-static-initializers.sh
index e6da8287657e3d9417cbb5bbb4d28d4943809342..1103a9778775dc86e8b59ee4f804670192533f70 100755
--- a/tools/check-static-initializers.sh
+++ b/tools/check-static-initializers.sh
@@ -37,14 +37,19 @@
expected_static_init_count=3
v8_root=$(readlink -f $(dirname $BASH_SOURCE)/../)
-d8="${v8_root}/d8"
+
+if [ -n "$1" ] ; then
+ d8="${v8_root}/$1"
+else
+ d8="${v8_root}/d8"
+fi
if [ ! -f "$d8" ]; then
- echo "Please build the project with SCons."
+ echo "d8 binary not found: $d8"
exit 1
fi
-static_inits=$(nm "$d8" | grep _GLOBAL__I | awk '{ print $NF; }')
+static_inits=$(nm "$d8" | grep _GLOBAL_ | grep _I_ | awk '{ print $NF; }')
static_init_count=$(echo "$static_inits" | wc -l)
@@ -52,4 +57,7 @@ if [ $static_init_count -gt $expected_static_init_count ]; then
echo "Too many static initializers."
echo "$static_inits"
exit 1
+else
+ echo "Static initializer check passed ($static_init_count initializers)."
+ exit 0
fi
« no previous file with comments | « test/test262/testcfg.py ('k') | tools/presubmit.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698