mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Introduce a separate group task to make the runApp work as expected
This commit is contained in:
@@ -63,6 +63,7 @@ module.exports = {
|
||||
|
||||
if (localCfg.runAppOnly) {
|
||||
localCfg.pathToApp = localCfg.pathToApk = args.pathToApp;
|
||||
localCfg.applicationDir = "./";
|
||||
}
|
||||
|
||||
grunt.initConfig({
|
||||
@@ -200,7 +201,7 @@ module.exports = {
|
||||
},
|
||||
startiOSApp: {
|
||||
cmd: "xcrun simctl launch " + localCfg.emuAvdName + " org.nativescript." + localCfg.testsAppName
|
||||
},
|
||||
}
|
||||
},
|
||||
untar: {
|
||||
modules: {
|
||||
@@ -305,13 +306,20 @@ module.exports = {
|
||||
|
||||
]);
|
||||
|
||||
grunt.registerTask("runApp", [
|
||||
grunt.registerTask("runOnly", [
|
||||
getPlatformSpecificTask("doPreUninstallApp{platform}"),
|
||||
|
||||
getPlatformSpecificTask("exec:uninstallExisting{platform}App"),
|
||||
getPlatformSpecificTask("exec:installNew{platform}App"),
|
||||
getPlatformSpecificTask("exec:start{platform}App"),
|
||||
getPlatformSpecificTask("collectLog{platform}"),
|
||||
]);
|
||||
|
||||
grunt.registerTask("runApp", [
|
||||
"cleanup",
|
||||
getPlatformSpecificTask("startEmulator{platform}"),
|
||||
"runOnly",
|
||||
"cleanup"
|
||||
|
||||
]);
|
||||
|
||||
@@ -323,7 +331,7 @@ module.exports = {
|
||||
"mkdir:workingDir",
|
||||
getPlatformSpecificTask("startEmulator{platform}"),
|
||||
"buildOnly",
|
||||
"runApp",
|
||||
"runOnly",
|
||||
"cleanup"
|
||||
];
|
||||
}
|
||||
|
||||
5
run.sh
5
run.sh
@@ -1,6 +1,7 @@
|
||||
#! /bin/bash
|
||||
|
||||
androidRuntimePath=realpath ../../../LATEST_RUNTIMES/tns-android.tgz
|
||||
androidRuntimePath=$(realpath ../../../LATEST_RUNTIMES/tns-android.tgz)
|
||||
builtApkPath=$(realpath ../../../THE_APK/TestsApp-debug.apk)
|
||||
|
||||
#grunt testsapp --verbose --platform=Android --emuPId=".*emulator64-x86" --avd="Api19" --logFilePath="./TestRunResult.txt" --runtimePath="/Users/erjan/tns-android.tgz" --showEmu=true --modulesPath=/Volumes/distributions/DailyBuilds/NativeScript/tns-modules/Stable/tns-core-modules.tgz
|
||||
|
||||
@@ -11,4 +12,4 @@ androidRuntimePath=realpath ../../../LATEST_RUNTIMES/tns-android.tgz
|
||||
#grunt testsapp --verbose --platform=iOS --runAppOnly --logFilePath="./TestRunResult.txt" --runtimePath="/Users/erjan/tns-ios.tgz" --showEmu=true --modulesPath=/Volumes/distributions/DailyBuilds/NativeScript/tns-modules/Stable/tns-core-modules.tgz --avd="'iPhone 6 (9.0) ['"
|
||||
|
||||
|
||||
grunt buildTestsApp --verbose --platform=Android --emuPId=".*emulator64-x86" --avd="Api21" --logFilePath="./TestRunResult.txt" --runtimePath=$androidRuntimePath --showEmu=true #--modulesPath=/Volumes/distributions/DailyBuilds/NativeScript/tns-modules/Stable/tns-core-modules.tgz
|
||||
grunt testsapp --runAppOnly --verbose --pathToApp="$builtApkPath" --platform=Android --emuPId=".*emulator64-x86" --avd="Api21" --logFilePath="./TestRunResult.txt" --runtimePath=$androidRuntimePath --showEmu=true #--modulesPath=/Volumes/distributions/DailyBuilds/NativeScript/tns-modules/Stable/tns-core-modules.tgz
|
||||
|
||||
Reference in New Issue
Block a user