Files
NativeScript/build/travis-scripts/check-testrun-broken.js
Erjan Gavalji 130780482e Fix the tests, failing on an Arm device
Increase the timeouts of the failing webview tests
Account for fractions in time taken (run result checker)
Specify a skin to improve grid calculations
Modify the duration report to have a strict test pass detection string
2016-04-13 17:01:39 +03:00

26 lines
714 B
JavaScript
Executable File

#!/usr/bin/env node
var fsModule = require('fs');
var resultsFile = 'TestRunResult.txt';
var successMarker = /=== ALL TESTS COMPLETE ===/;
var passMarker = /=== ALL TESTS COMPLETE ===\s+[^\n]*OK,\s+0\s+failed/mg;
var messages = {
crash: 'TEST RUN CRASHED!',
runGood: 'Test run exited successfully',
pass: 'NativeScript Cross-Platform Module Tests passed',
fail: 'TEST FAILURES FOUND!'
};
var results = fsModule.readFileSync(resultsFile, 'utf-8');
if (!results.match(successMarker)) {
console.log(messages.crash);
process.exit(1);
} else if (results.match(passMarker)) {
console.log(messages.pass);
process.exit(0);
} else {
console.log(messages.fail);
process.exit(1);
}