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
This commit is contained in:
Erjan Gavalji
2016-04-13 17:01:39 +03:00
parent fa13b4feaa
commit 130780482e
3 changed files with 12 additions and 7 deletions

View File

@@ -4,7 +4,7 @@ env:
- PACKAGE_VERSION=$DATE-$TRAVIS_BUILD_NUMBER
- PACKAGE_NAME=tns-core-modules
- NODE_VERSION=5.10.1
- EMULATOR_API_VER=21
- EMULATOR_API_VER=22
- RUNTIMEVERSION=next
- AVD_NAME=Arm$EMULATOR_API_VER
addons:
@@ -34,7 +34,7 @@ before_script:
- npm install
- (cd build/platform-declarations && npm install)
- echo no | android create avd --force -n $AVD_NAME -t android-$EMULATOR_API_VER -b armeabi-v7a -c 12M
- emulator -avd $AVD_NAME -no-skin -no-audio -no-window &
- emulator -avd $AVD_NAME -skin WXGA720 -no-audio -no-window &
- android-wait-for-emulator
script:
- jdk_switcher use oraclejdk8

View File

@@ -106,8 +106,10 @@ var testsWithLongDelay = {
testLocationOnce: 10000,
testLocationOnceMaximumAge: 10000,
//web-view-tests
testLoadExistingUrl: 10000,
testLoadInvalidUrl: 10000
testLoadExistingUrl: 10000 * 5,
testLoadLocalFile: 10000 * 5,
testLoadInvalidUrl: 10000,
testLoadUpperCaseSrc: 10000 * 5
}
var startTime;
@@ -150,7 +152,10 @@ function printRunTestStats() {
testFileContent = testFileContent.concat(testCases);
let finalMessage = `=== ALL TESTS COMPLETE for ${totalTime} ms === \n${(allTests.length - failedTestCount)} OK, ${failedTestCount} failed\n`;
// DO NOT CHANGE THE FIRST ROW! Used as an indicator for test run pass detection.
let finalMessage = `=== ALL TESTS COMPLETE ===\n` +
`${(allTests.length - failedTestCount)} OK, ${failedTestCount} failed\n` +
`DURATION: ${totalTime} ms`;
TKUnit.write(finalMessage, messageType.info);
for (j = 0; j < failedTestInfo.length; j++) {
let failureMessage = failedTestInfo[j];

View File

@@ -1,8 +1,8 @@
#!/usr/bin/env node
var fsModule = require('fs');
var resultsFile = 'TestRunResult.txt';
var successMarker = /=== ALL TESTS COMPLETE for \d+ ms ===/;
var passMarker = /=== ALL TESTS COMPLETE for \d+ ms ===\s+[^\n]*OK,\s+0\s+failed/mg;
var successMarker = /=== ALL TESTS COMPLETE ===/;
var passMarker = /=== ALL TESTS COMPLETE ===\s+[^\n]*OK,\s+0\s+failed/mg;
var messages = {
crash: 'TEST RUN CRASHED!',