diff --git a/.travis.yml b/.travis.yml index 49312cf3e..c6aa9443f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,12 +39,12 @@ before_script: - adb shell input keyevent 82 & script: - jdk_switcher use oraclejdk8 - - grunt default && + - grunt default --verbose && FULL_PACKAGE_VERSION=`node -e 'console.log(require("./bin/dist/tns-core-modules/package.json").version);'` && (cd build/platform-declarations && grunt) && echo no | npm install nativescript@next -g > /dev/null && - grunt buildOnlyTestsApp --platform=Android --modulesPath=./bin/dist/$PACKAGE_NAME-$FULL_PACKAGE_VERSION.tgz --runtimeVersion=$RUNTIMEVERSION --emuPId=.*emulator.* --avd=$AVD_NAME --showEmu=false > /dev/null && - grunt runOnlyTestsApp --platform=Android --modulesPath=./bin/dist/$PACKAGE_NAME-$FULL_PACKAGE_VERSION.tgz --emuPId=.*emulator.* --avd=$AVD_NAME --showEmu=false + grunt buildOnlyTestsApp --verbose --platform=Android --modulesPath=./bin/dist/$PACKAGE_NAME-$FULL_PACKAGE_VERSION.tgz --runtimeVersion=$RUNTIMEVERSION --emuPId=.*emulator.* --avd=$AVD_NAME --showEmu=false > /dev/null && + grunt runOnlyTestsApp --verbose --platform=Android --modulesPath=./bin/dist/$PACKAGE_NAME-$FULL_PACKAGE_VERSION.tgz --emuPId=.*emulator.* --avd=$AVD_NAME --showEmu=false - node ./build/travis-scripts/check-testrun-broken.js - adb pull /data/data/org.nativescript.TestsApp/files/test-results.xml && mv test-results.xml ~/test-run-results$PACKAGE_VERSION.xml diff --git a/apps/app/css-perf-test/app.ts b/apps/app/css-perf-test/app.ts new file mode 100644 index 000000000..2858b0cb8 --- /dev/null +++ b/apps/app/css-perf-test/app.ts @@ -0,0 +1,12 @@ +import application = require("application"); + + global.time = function(): number { + if (global.android) { + return java.lang.System.nanoTime() / 1000000; // 1 ms = 1000000 ns + } + else { + return CACurrentMediaTime() * 1000; + } +} + +application.start({ moduleName: "css-perf-test/root" }); \ No newline at end of file diff --git a/apps/app/css-perf-test/main-page.css b/apps/app/css-perf-test/main-page.css new file mode 100644 index 000000000..115f58fbc --- /dev/null +++ b/apps/app/css-perf-test/main-page.css @@ -0,0 +1,29 @@ +.title { + font-size: 20; + margin: 3; +} + +.author { + font-size: 14; + horizontal-align: left; + vertical-align: bottom; + margin: 3; +} + +.comments { + color: #10C2B0; + font-size: 14; + vertical-align: bottom; + margin: 3; +} + +.thumbnail { + width: 72; + height: 72; + margin: 3; + vertical-align: top; +} + +TabView { + background-color: white; +} \ No newline at end of file diff --git a/apps/app/css-perf-test/main-page.ts b/apps/app/css-perf-test/main-page.ts new file mode 100644 index 000000000..0833dcc32 --- /dev/null +++ b/apps/app/css-perf-test/main-page.ts @@ -0,0 +1,7 @@ +import {EventData as ObservableEventData} from "data/observable"; + +export function navigatedTo(args: ObservableEventData) { + setTimeout(() => { + console.log(`Time: ${global.time() - global.startTime} ms`); + }); +} \ No newline at end of file diff --git a/apps/app/css-perf-test/main-page.xml b/apps/app/css-perf-test/main-page.xml new file mode 100644 index 000000000..a66a5ffcd --- /dev/null +++ b/apps/app/css-perf-test/main-page.xml @@ -0,0 +1,307 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/apps/app/css-perf-test/main-page2.css b/apps/app/css-perf-test/main-page2.css new file mode 100644 index 000000000..115f58fbc --- /dev/null +++ b/apps/app/css-perf-test/main-page2.css @@ -0,0 +1,29 @@ +.title { + font-size: 20; + margin: 3; +} + +.author { + font-size: 14; + horizontal-align: left; + vertical-align: bottom; + margin: 3; +} + +.comments { + color: #10C2B0; + font-size: 14; + vertical-align: bottom; + margin: 3; +} + +.thumbnail { + width: 72; + height: 72; + margin: 3; + vertical-align: top; +} + +TabView { + background-color: white; +} \ No newline at end of file diff --git a/apps/app/css-perf-test/res/logo.png b/apps/app/css-perf-test/res/logo.png new file mode 100644 index 000000000..de99da231 Binary files /dev/null and b/apps/app/css-perf-test/res/logo.png differ diff --git a/apps/app/css-perf-test/root.ts b/apps/app/css-perf-test/root.ts new file mode 100644 index 000000000..b67d9911a --- /dev/null +++ b/apps/app/css-perf-test/root.ts @@ -0,0 +1,7 @@ +import {Page} from "ui/page"; + +export function onTap(args: any) { + global.startTime = global.time(); + let page = args.object.page; + page.frame.navigate("css-perf-test/main-page"); +} \ No newline at end of file diff --git a/apps/app/css-perf-test/root.xml b/apps/app/css-perf-test/root.xml new file mode 100644 index 000000000..6088b5d07 --- /dev/null +++ b/apps/app/css-perf-test/root.xml @@ -0,0 +1,3 @@ + +