-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test apks, config & generate_duplicated_names_apks.sh
- Loading branch information
Showing
19 changed files
with
313 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euxo pipefail | ||
|
||
DIR=`dirname "$BASH_SOURCE"` | ||
TEST_APP_DIR="$DIR/.." | ||
|
||
"$TEST_APP_DIR/gradlew" -p "$TEST_APP_DIR" \ | ||
app:assemble \ | ||
dir0:testModule:assembleAndroidTest \ | ||
dir1:testModule:assembleAndroidTest \ | ||
dir2:testModule:assembleAndroidTest \ | ||
dir3:testModule:assembleAndroidTest \ | ||
|
||
APKS_DIR="$TEST_APP_DIR/../test_runner/src/test/kotlin/ftl/fixtures/tmp/apk/duplicated_names" | ||
for INDEX in 0 1 2 3 | ||
do | ||
DIR_NAME="dir$INDEX" | ||
APK_DIR="$APKS_DIR/$DIR_NAME/" | ||
mkdir -p "$APK_DIR" | ||
cp $TEST_APP_DIR/$DIR_NAME/testModule/build/outputs/apk/**/debug/*.apk "$APK_DIR" | ||
done | ||
|
||
cp "$TEST_APP_DIR/app/build/outputs/apk/singleSuccess/debug/app-single-success-debug.apk" "$APKS_DIR/app-debug.apk" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
apply plugin: 'com.android.library' | ||
apply plugin: 'kotlin-android' | ||
apply plugin: 'kotlin-android-extensions' | ||
|
||
android { | ||
compileSdkVersion 29 | ||
buildToolsVersion "29.0.3" | ||
|
||
defaultConfig { | ||
minSdkVersion 16 | ||
targetSdkVersion 29 | ||
versionCode 1 | ||
versionName "1.0" | ||
|
||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
consumerProguardFiles "consumer-rules.pro" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | ||
implementation 'androidx.appcompat:appcompat:1.3.0-alpha01' | ||
implementation 'androidx.core:core-ktx:1.5.0-alpha01' | ||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' | ||
|
||
// Espresso. | ||
// https://developer.android.com/jetpack/androidx/releases/test | ||
androidTestUtil 'androidx.test:orchestrator:1.2.0' | ||
androidTestImplementation 'pl.pragmatists:JUnitParams:1.1.1' | ||
androidTestImplementation("androidx.test:runner:1.3.0-rc01") | ||
androidTestImplementation("androidx.test.ext:junit:1.1.2-rc01") | ||
androidTestImplementation("androidx.test.ext:junit-ktx:1.1.2-rc01") | ||
androidTestImplementation("androidx.test.ext:truth:1.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso.idling:idling-concurrent:3.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso.idling:idling-net:3.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso:espresso-accessibility:3.3.0-rc01") | ||
androidTestImplementation("androidx.test:rules:1.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso:espresso-core:3.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso:espresso-contrib:3.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso:espresso-idling-resource:3.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso:espresso-intents:3.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso:espresso-web:3.3.0-rc01") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<manifest | ||
package="com.example.test"> | ||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
apply plugin: 'com.android.library' | ||
apply plugin: 'kotlin-android' | ||
apply plugin: 'kotlin-android-extensions' | ||
|
||
android { | ||
compileSdkVersion 29 | ||
buildToolsVersion "29.0.3" | ||
|
||
defaultConfig { | ||
minSdkVersion 16 | ||
targetSdkVersion 29 | ||
versionCode 1 | ||
versionName "1.0" | ||
|
||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
consumerProguardFiles "consumer-rules.pro" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | ||
implementation 'androidx.appcompat:appcompat:1.3.0-alpha01' | ||
implementation 'androidx.core:core-ktx:1.5.0-alpha01' | ||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' | ||
|
||
// Espresso. | ||
// https://developer.android.com/jetpack/androidx/releases/test | ||
androidTestUtil 'androidx.test:orchestrator:1.2.0' | ||
androidTestImplementation 'pl.pragmatists:JUnitParams:1.1.1' | ||
androidTestImplementation("androidx.test:runner:1.3.0-rc01") | ||
androidTestImplementation("androidx.test.ext:junit:1.1.2-rc01") | ||
androidTestImplementation("androidx.test.ext:junit-ktx:1.1.2-rc01") | ||
androidTestImplementation("androidx.test.ext:truth:1.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso.idling:idling-concurrent:3.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso.idling:idling-net:3.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso:espresso-accessibility:3.3.0-rc01") | ||
androidTestImplementation("androidx.test:rules:1.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso:espresso-core:3.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso:espresso-contrib:3.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso:espresso-idling-resource:3.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso:espresso-intents:3.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso:espresso-web:3.3.0-rc01") | ||
} |
18 changes: 18 additions & 0 deletions
18
test_app/dir1/testModule/src/androidTest/java/com/example/test1/DuplicatedApkNameTests.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.example.test1 | ||
|
||
import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
|
||
@RunWith(AndroidJUnit4::class) | ||
class DuplicatedApkNameTests { | ||
|
||
@Test | ||
fun test0() = Unit | ||
|
||
@Test | ||
fun test1() = Unit | ||
|
||
@Test | ||
fun test2() = Unit | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<manifest | ||
package="com.example.test"> | ||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
apply plugin: 'com.android.library' | ||
apply plugin: 'kotlin-android' | ||
apply plugin: 'kotlin-android-extensions' | ||
|
||
android { | ||
compileSdkVersion 29 | ||
buildToolsVersion "29.0.3" | ||
|
||
defaultConfig { | ||
minSdkVersion 16 | ||
targetSdkVersion 29 | ||
versionCode 1 | ||
versionName "1.0" | ||
|
||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
consumerProguardFiles "consumer-rules.pro" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | ||
implementation 'androidx.appcompat:appcompat:1.3.0-alpha01' | ||
implementation 'androidx.core:core-ktx:1.5.0-alpha01' | ||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' | ||
|
||
// Espresso. | ||
// https://developer.android.com/jetpack/androidx/releases/test | ||
androidTestUtil 'androidx.test:orchestrator:1.2.0' | ||
androidTestImplementation 'pl.pragmatists:JUnitParams:1.1.1' | ||
androidTestImplementation("androidx.test:runner:1.3.0-rc01") | ||
androidTestImplementation("androidx.test.ext:junit:1.1.2-rc01") | ||
androidTestImplementation("androidx.test.ext:junit-ktx:1.1.2-rc01") | ||
androidTestImplementation("androidx.test.ext:truth:1.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso.idling:idling-concurrent:3.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso.idling:idling-net:3.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso:espresso-accessibility:3.3.0-rc01") | ||
androidTestImplementation("androidx.test:rules:1.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso:espresso-core:3.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso:espresso-contrib:3.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso:espresso-idling-resource:3.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso:espresso-intents:3.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso:espresso-web:3.3.0-rc01") | ||
} |
18 changes: 18 additions & 0 deletions
18
test_app/dir2/testModule/src/androidTest/java/com/example/test2/DuplicatedApkNameTests.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.example.test2 | ||
|
||
import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
|
||
@RunWith(AndroidJUnit4::class) | ||
class DuplicatedApkNameTests { | ||
|
||
@Test | ||
fun test0() = Unit | ||
|
||
@Test | ||
fun test1() = Unit | ||
|
||
@Test | ||
fun test2() = Unit | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<manifest | ||
package="com.example.test"> | ||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
apply plugin: 'com.android.library' | ||
apply plugin: 'kotlin-android' | ||
apply plugin: 'kotlin-android-extensions' | ||
|
||
android { | ||
compileSdkVersion 29 | ||
buildToolsVersion "29.0.3" | ||
|
||
defaultConfig { | ||
minSdkVersion 16 | ||
targetSdkVersion 29 | ||
versionCode 1 | ||
versionName "1.0" | ||
|
||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
consumerProguardFiles "consumer-rules.pro" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | ||
implementation 'androidx.appcompat:appcompat:1.3.0-alpha01' | ||
implementation 'androidx.core:core-ktx:1.5.0-alpha01' | ||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' | ||
|
||
// Espresso. | ||
// https://developer.android.com/jetpack/androidx/releases/test | ||
androidTestUtil 'androidx.test:orchestrator:1.2.0' | ||
androidTestImplementation 'pl.pragmatists:JUnitParams:1.1.1' | ||
androidTestImplementation("androidx.test:runner:1.3.0-rc01") | ||
androidTestImplementation("androidx.test.ext:junit:1.1.2-rc01") | ||
androidTestImplementation("androidx.test.ext:junit-ktx:1.1.2-rc01") | ||
androidTestImplementation("androidx.test.ext:truth:1.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso.idling:idling-concurrent:3.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso.idling:idling-net:3.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso:espresso-accessibility:3.3.0-rc01") | ||
androidTestImplementation("androidx.test:rules:1.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso:espresso-core:3.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso:espresso-contrib:3.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso:espresso-idling-resource:3.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso:espresso-intents:3.3.0-rc01") | ||
androidTestImplementation("androidx.test.espresso:espresso-web:3.3.0-rc01") | ||
} |
18 changes: 18 additions & 0 deletions
18
test_app/dir3/testModule/src/androidTest/java/com/example/test3/DuplicatedApkNameTests.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.example.test3 | ||
|
||
import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
|
||
@RunWith(AndroidJUnit4::class) | ||
class DuplicatedApkNameTests { | ||
|
||
@Test | ||
fun test0() = Unit | ||
|
||
@Test | ||
fun test1() = Unit | ||
|
||
@Test | ||
fun test2() = Unit | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<manifest | ||
package="com.example.test"> | ||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
include ':app' | ||
include ':app', | ||
':dir0:testModule', | ||
':dir1:testModule', | ||
':dir2:testModule', | ||
':dir3:testModule' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
test_runner/src/test/kotlin/ftl/fixtures/test_app_cases/flank-multiple-duplicated.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
gcloud: | ||
app: ./src/test/kotlin/ftl/fixtures/tmp/apk/duplicated_names/app-debug.apk | ||
test: ./src/test/kotlin/ftl/fixtures/tmp/apk/duplicated_names/dir0/testModule-debug-androidTest.apk | ||
use-orchestrator: false | ||
flank: | ||
disable-sharding: false | ||
max-test-shards: 3 | ||
additional-app-test-apks: | ||
- test: ./src/test/kotlin/ftl/fixtures/tmp/apk/duplicated_names/dir1/testModule-debug-androidTest.apk | ||
- test: ./src/test/kotlin/ftl/fixtures/tmp/apk/duplicated_names/dir2/testModule-debug-androidTest.apk | ||
- test: ./src/test/kotlin/ftl/fixtures/tmp/apk/duplicated_names/dir3/testModule-debug-androidTest.apk |