mirror of
https://github.com/apache/cordova-android.git
synced 2026-05-11 00:00:05 +08:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user