]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Manage exceed maximum duration for our test
authorJohann-S <johann.servoire@gmail.com>
Fri, 29 Sep 2017 09:23:27 +0000 (11:23 +0200)
committerXhmikosR <xhmikosr@gmail.com>
Fri, 29 Sep 2017 16:39:25 +0000 (19:39 +0300)
build/saucelabs-unit-test.js

index 7607b6d9480e3510881638e00b3cd5e5326e34a5..09096b1468a8d9e9ffc58a105f470aed1ec3f4f9 100644 (file)
@@ -34,17 +34,25 @@ const waitingCallback = (error, body, id) => {
         })
       }, 2000)
     } else {
-      const test = body['js tests'][0]
-      let passed = false
+      const test   = body['js tests'][0]
+      let passed   = false
+      let errorStr = false
 
       if (test.result !== null) {
-        passed = test.result.total === test.result.passed
+        if (typeof test.result === 'string' && test.result === 'Test exceeded maximum duration') {
+          errorStr = test.result
+        } else {
+          passed = test.result.total === test.result.passed
+        }
       }
 
       console.log(`Tested ${testURL}`)
       console.log(`Platform: ${test.platform.join(',')}`)
       console.log(`Passed: ${passed.toString()}`)
       console.log(`Url ${test.url} \n`)
+      if (errorStr) {
+        console.error(errorStr)
+      }
 
       if (passed) {
         jobsSuccess++