CB-12640: support for android sdk tools 26.0.1. simplified target parsing by using avdmanager instead of sdkmanager. flipped target parsing logic so that it always tries to use avdmanager to retrieve targets first, then falls back to android command if avdmanager cannot be found (and errors with ENOENT). updated tests.

This commit is contained in:
filmaj
2017-04-06 13:13:38 -07:00
parent 814aca2b68
commit 46e47a3c5c
8 changed files with 47 additions and 1217 deletions
+2 -2
View File
@@ -28,7 +28,7 @@ describe("emulator", function () {
it("should properly parse details of SDK Tools 25.3.1 `avdmanager` output", function(done) {
var deferred = Q.defer();
spyOn(cc.superspawn, "spawn").and.returnValue(deferred.promise);
deferred.resolve(fs.readFileSync(path.join("spec", "fixtures", "avdmanager_list_avd.txt"), "utf-8"));
deferred.resolve(fs.readFileSync(path.join("spec", "fixtures", "sdk25.3-avdmanager_list_avd.txt"), "utf-8"));
return emu.list_images_using_avdmanager()
.then(function(list) {
expect(list).toBeDefined();
@@ -47,7 +47,7 @@ describe("emulator", function () {
it("should properly parse details of SDK Tools pre-25.3.1 `android list avd` output", function(done) {
var deferred = Q.defer();
spyOn(cc.superspawn, "spawn").and.returnValue(deferred.promise);
deferred.resolve(fs.readFileSync(path.join("spec", "fixtures", "android_list_avd.txt"), "utf-8"));
deferred.resolve(fs.readFileSync(path.join("spec", "fixtures", "sdk25.2-android_list_avd.txt"), "utf-8"));
return emu.list_images_using_android()
.then(function(list) {
expect(list).toBeDefined();