Revert to API 33 GMD and fail empty screen tests

Change-Id: Ib0aeb35aa43b5e1d949652123ae9a5a480c40822
pull/1060/head
Ben Weiss 1 year ago
parent 29243cfdf6
commit b007f9c678
No known key found for this signature in database
GPG Key ID: 8424F9C1E763A74C

@ -52,7 +52,7 @@ android {
// To publish on the Play store a private signing key is required, but to allow anyone // To publish on the Play store a private signing key is required, but to allow anyone
// who clones the code to sign and run the release variant, use the debug signing key. // who clones the code to sign and run the release variant, use the debug signing key.
// TODO: Abstract the signing configuration to a separate file to avoid hardcoding this. // TODO: Abstract the signing configuration to a separate file to avoid hardcoding this.
signingConfig = signingConfigs.getByName("debug").get() signingConfig = signingConfigs.getByName("debug")
} }
} }

@ -47,9 +47,9 @@ android {
} }
testOptions.managedDevices.devices { testOptions.managedDevices.devices {
create<ManagedVirtualDevice>("pixel6Api31") { create<ManagedVirtualDevice>("pixel6Api33") {
device = "Pixel 6" device = "Pixel 6"
apiLevel = 31 apiLevel = 33
systemImageSource = "aosp" systemImageSource = "aosp"
} }
} }
@ -60,7 +60,7 @@ android {
baselineProfile { baselineProfile {
// This specifies the managed devices to use that you run the tests on. // This specifies the managed devices to use that you run the tests on.
managedDevices += "pixel6Api31" managedDevices += "pixel6Api33"
// Don't use a connected device but rely on a GMD for consistency between local and CI builds. // Don't use a connected device but rely on a GMD for consistency between local and CI builds.
useConnectedDevices = false useConnectedDevices = false

@ -24,6 +24,7 @@ import androidx.test.uiautomator.untilHasChildren
import com.google.samples.apps.nowinandroid.flingElementDownUp import com.google.samples.apps.nowinandroid.flingElementDownUp
import com.google.samples.apps.nowinandroid.waitAndFindObject import com.google.samples.apps.nowinandroid.waitAndFindObject
import com.google.samples.apps.nowinandroid.waitForObjectOnTopAppBar import com.google.samples.apps.nowinandroid.waitForObjectOnTopAppBar
import org.junit.Assert.fail
private const val TAG = "ForYouActions" private const val TAG = "ForYouActions"
@ -46,8 +47,8 @@ fun MacrobenchmarkScope.forYouSelectTopics(recheckTopicsIfChecked: Boolean = fal
val withChildren = topics.childCount != 0 val withChildren = topics.childCount != 0
if (!withChildren) { if (!withChildren) {
// TODO: Ensure ForYou has topics. // TODO: Ensure ForYou has topics.
Log.w(TAG, "no topics found, can't scroll for baseline profile generation.") Log.e(TAG, "no topics found, can't scroll for baseline profile generation.")
return fail()
} }
// Set gesture margin from sides not to trigger system gesture navigation // Set gesture margin from sides not to trigger system gesture navigation

@ -22,6 +22,7 @@ import androidx.test.uiautomator.By
import androidx.test.uiautomator.Until import androidx.test.uiautomator.Until
import com.google.samples.apps.nowinandroid.flingElementDownUp import com.google.samples.apps.nowinandroid.flingElementDownUp
import com.google.samples.apps.nowinandroid.waitForObjectOnTopAppBar import com.google.samples.apps.nowinandroid.waitForObjectOnTopAppBar
import org.junit.Assert.fail
private const val TAG = "InterestsActions" private const val TAG = "InterestsActions"
@ -42,7 +43,8 @@ fun MacrobenchmarkScope.interestsScrollTopicsDownUp() {
// TODO: Ensure topics are availble. // TODO: Ensure topics are availble.
device.flingElementDownUp(topicsList) device.flingElementDownUp(topicsList)
} else { } else {
Log.w(TAG, "No topics found, can't scroll during baseline profile generation.") Log.e(TAG, "No topics found, can't scroll during baseline profile generation.")
fail()
} }
} }

Loading…
Cancel
Save