Bug 614992. Document test-masters.sh. r=catlee
authorArmen Zambrano Gasparnian <armenzg@mozilla.com>
Wed, 01 Dec 2010 11:22:31 -0500
changeset 3335 5aa6b4e211bffe7125860259424b6fd6361595ea
parent 3334 707172cdbacbf455f32b005f9d4a2e417d46a253
child 3336 f63c8b15a100d862e53a172f09a23be1d37e5c2a
push id2635
push userarmenzg@mozilla.com
push dateWed, 01 Dec 2010 16:22:40 +0000
reviewerscatlee
bugs614992
Bug 614992. Document test-masters.sh. r=catlee
test-masters.sh
--- a/test-masters.sh
+++ b/test-masters.sh
@@ -1,19 +1,41 @@
 #!/bin/bash
+#
+# Script:
+#   test-masters.sh
+#
+# Purpose:
+#   This script will make sure that any changes on buildbot-configs
+#   are valid. The script will call setup-master.py for each master
+#   to make sure that they will be able to run 'buildbot checkconfig'.
+#   This script defaults to checking 0.7.x masters, and will test
+#   0.8.x masters when the -8 switch is passed.
+#
+# Requirements:
+#   You have to have buildbot installed.
+#   Include buildbotcustom and tools/lib/python in your PYTHONPATH.
+#
+# Author:
+#   Chris AtLee <catlee@mozilla.com>
+#
 set -e
 master_dir=master_dir
+# $extra_args determines if you will iterate through the 0.8.x
+# based masters or the 0.7.x ones
 if [ "$1" = "-8" ]; then
     extra_args=-8
 fi
 
 exit_code=0
 
-for master_name in $(python setup-master.py $extra_args -l); do
+# It will iterate through list of masters and checkconfig for each one of them
+for master_name in $(python setup-master.py $extra_args --list); do
     rm -rf $master_dir
     mkdir $master_dir
     echo -n "${master_name}... "
     python setup-master.py $extra_args $master_dir $master_name
-    (cd $master_dir; buildbot checkconfig > /dev/null && echo OK) || { echo "Broken pieces are in $master_dir"; exit_code=1; false; }
+    (cd $master_dir; buildbot checkconfig > /dev/null && echo OK) || \
+        { echo "Broken pieces are in $master_dir"; exit_code=1; false; }
     rm -rf $master_dir
 done
 
 exit $exit_code