mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Remove the unnecessary emulator start for the buildTestsApp command
This commit is contained in:
@@ -279,12 +279,12 @@ module.exports = {
|
|||||||
"clean:simulatorLog"
|
"clean:simulatorLog"
|
||||||
]);
|
]);
|
||||||
|
|
||||||
grunt.registerTask("buildTestsApp", [
|
grunt.registerTask("cleanup", [
|
||||||
"clean:workingDir",
|
|
||||||
"mkdir:workingDir",
|
|
||||||
getPlatformSpecificTask("exec:kill{platform}Emulator"),
|
getPlatformSpecificTask("exec:kill{platform}Emulator"),
|
||||||
getPlatformSpecificTask("startEmulator{platform}"),
|
"clean:workingDir"
|
||||||
|
]);
|
||||||
|
|
||||||
|
grunt.registerTask("buildOnly", [
|
||||||
"exec:createApp",
|
"exec:createApp",
|
||||||
"clean:originalAppDir",
|
"clean:originalAppDir",
|
||||||
"copy:testsAppToRunDir",
|
"copy:testsAppToRunDir",
|
||||||
@@ -298,6 +298,13 @@ module.exports = {
|
|||||||
"shell:buildApp",
|
"shell:buildApp",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
grunt.registerTask("buildTestsApp", [
|
||||||
|
"cleanup",
|
||||||
|
"mkdir:workingDir",
|
||||||
|
"buildOnly"
|
||||||
|
|
||||||
|
]);
|
||||||
|
|
||||||
grunt.registerTask("runApp", [
|
grunt.registerTask("runApp", [
|
||||||
getPlatformSpecificTask("doPreUninstallApp{platform}"),
|
getPlatformSpecificTask("doPreUninstallApp{platform}"),
|
||||||
|
|
||||||
@@ -308,15 +315,14 @@ module.exports = {
|
|||||||
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
grunt.registerTask("cleanup", [
|
|
||||||
getPlatformSpecificTask("exec:kill{platform}Emulator"),
|
|
||||||
"clean:workingDir"
|
|
||||||
]);
|
|
||||||
|
|
||||||
var tasksToExecute = ["runApp"];
|
var tasksToExecute = ["runApp"];
|
||||||
if (!localCfg.runAppOnly) {
|
if (!localCfg.runAppOnly) {
|
||||||
tasksToExecute = [
|
tasksToExecute = [
|
||||||
"buildTestsApp",
|
"cleanup",
|
||||||
|
"mkdir:workingDir",
|
||||||
|
getPlatformSpecificTask("startEmulator{platform}"),
|
||||||
|
"buildOnly",
|
||||||
"runApp",
|
"runApp",
|
||||||
"cleanup"
|
"cleanup"
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
module.exports = function(grunt) {
|
module.exports = function(grunt) {
|
||||||
|
|
||||||
if (grunt.cli.tasks.indexOf("testsapp") >= 0 || grunt.cli.tasks.indexOf("buildtestsapp")>= 0) {
|
if (grunt.cli.tasks.indexOf("testsapp") >= 0 || grunt.cli.tasks.indexOf("buildTestsApp")>= 0) {
|
||||||
var tsTester = require("./build/run-testsapp.grunt.js");
|
var tsTester = require("./build/run-testsapp.grunt.js");
|
||||||
tsTester.run(grunt);
|
tsTester.run(grunt);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
2
run.sh
2
run.sh
@@ -11,4 +11,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 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 testsapp --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 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
|
||||||
|
|||||||
Reference in New Issue
Block a user