Bug 799216 - allow leaving out head/tail entries in xpcshell manifests, r=ted
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Thu, 01 May 2014 00:56:22 +0100
changeset 181559 7f7abc547fb9fc435063572e9b36839dc0604d9e
parent 181558 d4b2e930ecd52c6be982783ee83a7b0fc68a5918
child 181560 720a660bac20c8d11822ca99606e6f33eda87380
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewersted
bugs799216
milestone32.0a1
Bug 799216 - allow leaving out head/tail entries in xpcshell manifests, r=ted
testing/xpcshell/runxpcshelltests.py
--- a/testing/xpcshell/runxpcshelltests.py
+++ b/testing/xpcshell/runxpcshelltests.py
@@ -353,18 +353,20 @@ class XPCShellTestThread(Thread):
                 if not os.path.exists(path):
                     raise Exception('%s file does not exist: %s' % (kind, path))
 
                 if not os.path.isfile(path):
                     raise Exception('%s file is not a file: %s' % (kind, path))
 
                 yield path
 
-        return (list(sanitize_list(test_object['head'], 'head')),
-                list(sanitize_list(test_object['tail'], 'tail')))
+        headlist = test_object['head'] if 'head' in test_object else ''
+        taillist = test_object['tail'] if 'tail' in test_object else ''
+        return (list(sanitize_list(headlist, 'head')),
+                list(sanitize_list(taillist, 'tail')))
 
     def buildXpcsCmd(self, testdir):
         """
           Load the root head.js file as the first file in our test path, before other head, test, and tail files.
           On a remote system, we overload this to add additional command line arguments, so this gets overloaded.
         """
         # - NOTE: if you rename/add any of the constants set here, update
         #   do_load_child_test_harness() in head.js