bustage - fail when missing shared memory; r=aki
authorHal Wine <hwine@mozilla.com>
Tue, 14 Jan 2014 12:50:14 -0800
changeset 9686 c0151ac9e04bf6ce3570b49dc23b4d44afb25e51
parent 9685 60c3a0fe663d9700c50859b9e14e93db149a843a
child 9687 a51cd0264dc3536a95783c01e7c188cdeb61245f
push id7196
push userhwine@mozilla.com
push dateTue, 14 Jan 2014 22:15:59 +0000
bustage - fail when missing shared memory; r=aki
--- a/test-masters.sh
+++ b/test-masters.sh
@@ -1,13 +1,31 @@
 # This script has been rewritten in setup_master.py using
 # the -t option.  We use that now
+# even though it isn't fully used, the config check does require a valid
+# shared memory setup AT THE DEFAULT LOCATION. If you're running on a
+# laptop, that may not exist. Fail early.
+# OSX note: it "works" (for test-masters purposes) to just create the
+#           directory, even though that isn't how shared memory is
+#           handled on OSX. The directories must be owned by the id
+#           running the tests.
+for needed_dir in ${shm[@]}; do
+    if ! test -w $needed_dir; then
+        echo 1>&2 "No shm setup, please create writable directory '$needed_dir'"
+        good_shm=false
+    fi
+$good_shm || exit 1
 mkdir $WORK 2>/dev/null
 trap 'for cmd in "${atexit[@]}"; do eval $cmd; done' EXIT