diff --git a/expect.exp b/expect.exp new file mode 100755 index 000000000..cd52e3e24 --- /dev/null +++ b/expect.exp @@ -0,0 +1,9 @@ +#! /usr/bin/expect + +#exp_internal 1 + +set timeout 600 + +spawn grunt +expect "TypeScript compilation complete" +send \003 diff --git a/gruntfile.js b/gruntfile.js index dae465869..1c5e3f259 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -364,7 +364,27 @@ module.exports = function(grunt) { }, mochaNode: { cmd: "grunt simplemocha:node" - } + }, +// setupTestsApp: { +////TODO: TNS PATH MIGHT GET PASSED FROM OUTSIDE! +// cmd: [ +// "pkill emulator64-arm && true", +// "emulator -avd Api19 -no-skin -no-audio -no-window &", +// "tns create TestsApp", +// "cd TestsApp", +// "rm app/*.*", +// "cp -r " + pathModule.join(localCfg.outAppsDir, "tests") + "/* ./app/", +// "tns platform add android", +// DO THE REPLACEMENTS IN THE Info.plist and AndroidManifest.xml +// "tns build android", +// +// "adb kill-server", +// "adb start-server", +// +// "adb install ./platforms/android/build/outputs/apk/TestsApp-debug.apk", +// "adb shell am start -n org.nativescript.TestsApp/com.tns.NativeScriptActivity", +// "expect -c ' +// } }, multidest: { copyLicenseFiles: { @@ -557,4 +577,8 @@ module.exports = function(grunt) { "env:nodeTests", "exec:mochaNode", //spawn a new process to use the new NODE_PATH ]); + + grunt.registerTask("testsapp", [ + "exec:..." + ]); };