summaryrefslogtreecommitdiff
path: root/android/testSrc
diff options
context:
space:
mode:
authorBradley Smith <smithbradley@google.com>2022-02-09 11:15:27 -0800
committerBradley Smith <smithbradley@google.com>2022-02-18 15:36:52 +0000
commitbbe9c52015e1365351782fc387e1f1fd555148be (patch)
tree8b9a4b3e28855b35569808d971ef0fce8e7fc00d /android/testSrc
parentb2d66ff333f03aac40f7782f644295a149fca451 (diff)
downloadidea-bbe9c52015e1365351782fc387e1f1fd555148be.tar.gz
Use main modules in Android run configurations
This is to allow things that try to get information from the module in the run configuration to have a none empty module. This is also the more "correct" setup as we are building from the sources of this main module. We also remove patching of run configurations from pre-qualified name versions since with this we can no longer guess the module of the runconfiguration. This was also broken in general after MPSS since we run over all module based configuration whichs will set any none android configuration to the empty holder module. We also fix a small issue with Android test run configurations being wrongly marked as invalid by adjusting the accepted modules for these configurations. Fixes: 217847811 Test: snapshots Change-Id: Ib68d3f5e9b0a6740f111789900d41448c6804302
Diffstat (limited to 'android/testSrc')
-rw-r--r--android/testSrc/com/android/tools/idea/run/AndroidTestRunConfigurationTest.java2
-rw-r--r--android/testSrc/com/android/tools/idea/run/editor/AndroidRunConfigurationEditorTest.java1
2 files changed, 2 insertions, 1 deletions
diff --git a/android/testSrc/com/android/tools/idea/run/AndroidTestRunConfigurationTest.java b/android/testSrc/com/android/tools/idea/run/AndroidTestRunConfigurationTest.java
index 56bfe5ff367..bd1c7076dbe 100644
--- a/android/testSrc/com/android/tools/idea/run/AndroidTestRunConfigurationTest.java
+++ b/android/testSrc/com/android/tools/idea/run/AndroidTestRunConfigurationTest.java
@@ -89,6 +89,6 @@ public class AndroidTestRunConfigurationTest extends AndroidGradleTestCase {
errors = androidTestRunConfiguration.validate(null);
assertThat(errors).isNotEmpty();
assertThat(errors.stream().map(ValidationError::getMessage).collect(Collectors.toList()))
- .contains("Active build variant \"release\" does not have a test artifact.");
+ .contains("Module 'testCannotRunLibTestsInReleaseBuild.lib.androidTest' doesn't exist in project");
}
}
diff --git a/android/testSrc/com/android/tools/idea/run/editor/AndroidRunConfigurationEditorTest.java b/android/testSrc/com/android/tools/idea/run/editor/AndroidRunConfigurationEditorTest.java
index d3328f4f34f..1c541f62ed3 100644
--- a/android/testSrc/com/android/tools/idea/run/editor/AndroidRunConfigurationEditorTest.java
+++ b/android/testSrc/com/android/tools/idea/run/editor/AndroidRunConfigurationEditorTest.java
@@ -55,6 +55,7 @@ public final class AndroidRunConfigurationEditorTest {
facet -> false,
configuration1,
true,
+ false,
moduleSelector -> configurationSpecificEditor);
DeployTargetContext deployTargetContext = new DeployTargetContext(providers);