ARM-software / workload-automation

A framework for automating workload execution and measurement collection on ARM devices.
Apache License 2.0
152 stars 120 forks source link

Geekbench-corporate 6.3.0 - `waitForResultsv3onwards` is broken #1271

Open chrisswinchatt-arm opened 1 month ago

chrisswinchatt-arm commented 1 month ago

In wa/workloads/geekbench/uiauto/app/src/main/java/com/arm/wa/uiauto/geekbench/UiAutomation.java method UiAutomation.waitForResultsv3onwards:

The method looks for the TextView containing the word Running which is on the test progress modal. Presumably in previous versions this simply said Running so the same TextView was present for the duration of the test, but in more recent versions the text is updated with the current test stage (e.g. Running file compression) and the "update" apparently happens by removing the previous TextView and creating a new one. This results in the UI automation detecting that the test has completed early (<1s on my Pixel 6).

A, possibly non-ideal, fix is to rewrite the function like this:

    public void waitForResultsv3onwards() throws Exception {
        UiSelector selector = new UiSelector();
        UiObject runningTextView;
        while (true) {
            runningTextView = mDevice.findObject(selector.textContains("Running")
                                                        .className("android.widget.TextView"));
            if (!runningTextView.waitForExists(WAIT_TIMEOUT_5SEC)) {
                break;
            }
        }
    }

This will wait for the final Running to be removed.