Skip to content

Commit

Permalink
Android: properly configure deprecated instrumented tests
Browse files Browse the repository at this point in the history
Signed-off-by: Patryk Miś <foss@patrykmis.com>
  • Loading branch information
PatrykMis committed Jul 23, 2023
1 parent c1f2dbb commit 21ee81d
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 3 deletions.
5 changes: 2 additions & 3 deletions android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ android {
versionCode = 22
versionName = "1.52-dev"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunner = "android.test.InstrumentationTestRunner"
testApplicationId = "com.reecedunn.espeak.test"
externalNativeBuild {
cmake {
Expand Down Expand Up @@ -61,9 +61,8 @@ android {
}

dependencies {
testImplementation("junit:junit:4.13.2")
androidTestImplementation("com.google.android:android-test:4.1.1.4")
androidTestImplementation("org.hamcrest:hamcrest-all:1.3")
androidTestImplementation("org.hamcrest:hamcrest-library:1.3")
}

tasks.register("checkData") {
Expand Down
16 changes: 16 additions & 0 deletions android/app/src/androidTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="1"
android:versionName="1.0" >

<instrumentation
android:name="android.test.InstrumentationTestRunner"
android:targetPackage="com.reecedunn.espeak" />

<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<uses-library android:name="android.test.runner" />
</application>

</manifest>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions android/app/src/androidTest/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<string name="app_name">ESpeakTestsTest</string>

</resources>

0 comments on commit 21ee81d

Please sign in to comment.