Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-26338

Entering Emulator Executable value does not work

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Entering Emulator Executable in Common emulator options -> Emulator executable values does not cause any change in the execution.
      We tried to enter "emulator64-arm" but "emulator" was always used.

        Attachments

          Activity

          Hide
          kul3r4 chiara chiappini added a comment -

          Please use this as a reference:
          public class EmulatorConfigTest {
          //does not work
          @Test
          public void shouldSelectExecutor64WhenPassedAsExecutorAndAvdIsSelected()

          { EmulatorConfig emulatorConfigWithAvdName = EmulatorConfig.create( "hudson_en-US_160_WVGA_android-21", "5.0", "160", "WVGA", "", "", false, false, false, "", "", "", "emulator64-arm", ""); assertEquals(Tool.EMULATOR64_ARM, emulatorConfigWithAvdName.getExecutable()); }

          //does work
          @Test
          public void shouldSelectExecutor64WhenPassedAsExecutorAndAvdIsEmpty()

          { EmulatorConfig emulatorConfigWithNoAvdName = EmulatorConfig.create("", "5.0", "160", "WVGA", "", "", false, false, false, "", "", "", "emulator64-arm", ""); assertEquals(Tool.EMULATOR64_ARM, emulatorConfigWithNoAvdName.getExecutable()); }
          Show
          kul3r4 chiara chiappini added a comment - Please use this as a reference: public class EmulatorConfigTest { //does not work @Test public void shouldSelectExecutor64WhenPassedAsExecutorAndAvdIsSelected() { EmulatorConfig emulatorConfigWithAvdName = EmulatorConfig.create( "hudson_en-US_160_WVGA_android-21", "5.0", "160", "WVGA", "", "", false, false, false, "", "", "", "emulator64-arm", ""); assertEquals(Tool.EMULATOR64_ARM, emulatorConfigWithAvdName.getExecutable()); } //does work @Test public void shouldSelectExecutor64WhenPassedAsExecutorAndAvdIsEmpty() { EmulatorConfig emulatorConfigWithNoAvdName = EmulatorConfig.create("", "5.0", "160", "WVGA", "", "", false, false, false, "", "", "", "emulator64-arm", ""); assertEquals(Tool.EMULATOR64_ARM, emulatorConfigWithNoAvdName.getExecutable()); }
          Hide
          kul3r4 chiara chiappini added a comment - - edited

          Could you explain why when fixing the avd the executable is ignored?

          if (Util.fixEmptyAndTrim(avdName) == null)

          { return new EmulatorConfig(osVersion, screenDensity, screenResolution, deviceLocale, sdCardSize, wipeData, showWindow, useSnapshots, commandLineOptions, targetAbi, androidSdkHome, executable, avdNameSuffix); }

          return new EmulatorConfig(avdName, wipeData, showWindow, useSnapshots, commandLineOptions, androidSdkHome,
          avdNameSuffix);

          Show
          kul3r4 chiara chiappini added a comment - - edited Could you explain why when fixing the avd the executable is ignored? if (Util.fixEmptyAndTrim(avdName) == null) { return new EmulatorConfig(osVersion, screenDensity, screenResolution, deviceLocale, sdCardSize, wipeData, showWindow, useSnapshots, commandLineOptions, targetAbi, androidSdkHome, executable, avdNameSuffix); } return new EmulatorConfig(avdName, wipeData, showWindow, useSnapshots, commandLineOptions, androidSdkHome, avdNameSuffix);
          Hide
          orrc Christopher Orr added a comment -

          The explanation is that it's a bug.

          I believe virtually nobody uses a fixed AVD name, so I can understand that it hasn't been noticed in the past couple of years. Thanks for pinpointing it.

          Show
          orrc Christopher Orr added a comment - The explanation is that it's a bug. I believe virtually nobody uses a fixed AVD name, so I can understand that it hasn't been noticed in the past couple of years. Thanks for pinpointing it.
          Hide
          kul3r4 chiara chiappini added a comment -

          Ok, I am gonna fix that and issue a pull request.
          Thanks.

          Show
          kul3r4 chiara chiappini added a comment - Ok, I am gonna fix that and issue a pull request. Thanks.
          Show
          kul3r4 chiara chiappini added a comment - I Issued https://github.com/jenkinsci/android-emulator-plugin/pull/43
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Christopher Orr
          Path:
          src/main/java/hudson/plugins/android_emulator/EmulatorConfig.java
          src/test/java/hudson/plugins/android_emulator/EmulatorConfigTest.java
          http://jenkins-ci.org/commit/android-emulator-plugin/53fbfdf677e41dad1246a892f18a715e1abca9dd
          Log:
          Merge pull request #43 from eBay-European-Product-Development/master

          [FIXED JENKINS-26338] Also use configured executable when using named emulators.

          Compare: https://github.com/jenkinsci/android-emulator-plugin/compare/9bfa98a0b1fb...53fbfdf677e4

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christopher Orr Path: src/main/java/hudson/plugins/android_emulator/EmulatorConfig.java src/test/java/hudson/plugins/android_emulator/EmulatorConfigTest.java http://jenkins-ci.org/commit/android-emulator-plugin/53fbfdf677e41dad1246a892f18a715e1abca9dd Log: Merge pull request #43 from eBay-European-Product-Development/master [FIXED JENKINS-26338] Also use configured executable when using named emulators. Compare: https://github.com/jenkinsci/android-emulator-plugin/compare/9bfa98a0b1fb...53fbfdf677e4
          Hide
          orrc Christopher Orr added a comment -

          Version 2.13 of the plugin has been released, which includes this fix.

          Show
          orrc Christopher Orr added a comment - Version 2.13 of the plugin has been released, which includes this fix.

            People

            • Assignee:
              orrc Christopher Orr
              Reporter:
              kul3r4 chiara chiappini
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: