Bug 987849 - Temporary solution to raise an Exception if 'fail-if' encountered. r=ahal
authorVaibhav Agrawal <vaibhavmagarwal@gmail.com>
Wed, 24 Sep 2014 14:12:00 -0400
changeset 230486 30bb63e163b7ec874d2a8a4f34db1c441b0c404c
parent 230485 caf6c61b1ea0fee6277eea212ce0dc2a70036197
child 230487 9a5d04a8d5d22bce551484fc011f2bc6bf59ed69
push id4187
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:29:12 +0000
treeherdermozilla-beta@f23cc6a30c11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal
bugs987849
milestone35.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 987849 - Temporary solution to raise an Exception if 'fail-if' encountered. r=ahal
testing/mochitest/runtests.py
--- a/testing/mochitest/runtests.py
+++ b/testing/mochitest/runtests.py
@@ -1585,16 +1585,18 @@ class Mochitest(MochitestUtilsMixin):
           for test in tests:
               if 'disabled' in test:
                   del test['disabled']
       else:
           tests = manifest.active_tests(disabled=disabled, options=options, **info)
     paths = []
 
     for test in tests:
+      if test.get('expected') == 'fail':
+        raise Exception('fail-if encountered for test: %s. There is no support for fail-if in Mochitests.' % test['name'])
       pathAbs = os.path.abspath(test['path'])
       assert pathAbs.startswith(self.testRootAbs)
       tp = pathAbs[len(self.testRootAbs):].replace('\\', '/').strip('/')
 
       # Filter out tests if we are using --test-path
       if testPath and not tp.startswith(testPath):
         continue