Skip to content

Commit

Permalink
Revert to API 33 GMD and fail empty screen tests
Browse files Browse the repository at this point in the history
Change-Id: Ib0aeb35aa43b5e1d949652123ae9a5a480c40822
  • Loading branch information
keyboardsurfer committed Apr 18, 2024
1 parent 29243cf commit 3ce9d45
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions benchmarks/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ android {
}

testOptions.managedDevices.devices {
create<ManagedVirtualDevice>("pixel6Api31") {
create<ManagedVirtualDevice>("pixel6Api33") {
device = "Pixel 6"
apiLevel = 31
apiLevel = 33
systemImageSource = "aosp"
}
}
Expand All @@ -60,7 +60,7 @@ android {

baselineProfile {
// 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.
useConnectedDevices = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import androidx.test.uiautomator.untilHasChildren
import com.google.samples.apps.nowinandroid.flingElementDownUp
import com.google.samples.apps.nowinandroid.waitAndFindObject
import com.google.samples.apps.nowinandroid.waitForObjectOnTopAppBar
import org.junit.Assert.fail

private const val TAG = "ForYouActions"

Expand All @@ -46,8 +47,8 @@ fun MacrobenchmarkScope.forYouSelectTopics(recheckTopicsIfChecked: Boolean = fal
val withChildren = topics.childCount != 0
if (!withChildren) {
// TODO: Ensure ForYou has topics.
Log.w(TAG, "no topics found, can't scroll for baseline profile generation.")
return
Log.e(TAG, "no topics found, can't scroll for baseline profile generation.")
fail()
}

// Set gesture margin from sides not to trigger system gesture navigation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import androidx.test.uiautomator.By
import androidx.test.uiautomator.Until
import com.google.samples.apps.nowinandroid.flingElementDownUp
import com.google.samples.apps.nowinandroid.waitForObjectOnTopAppBar
import org.junit.Assert.fail

private const val TAG = "InterestsActions"

Expand All @@ -42,7 +43,8 @@ fun MacrobenchmarkScope.interestsScrollTopicsDownUp() {
// TODO: Ensure topics are availble.
device.flingElementDownUp(topicsList)
} 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()
}
}

Expand Down

0 comments on commit 3ce9d45

Please sign in to comment.