Commit Graph

16 Commits

Author SHA1 Message Date
Valentine Burley
2260681572 ci/android: Use aapt from Debian packages again
The package in trixie is new enough to use again.

This reverts commit c9a8e1f49a.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35853>
2025-09-16 06:16:21 +00:00
Antonio Ospite
8f2715c333 ci/android: fix exit code from android-cts-runner.sh and android-deqp-runner.sh
The android-cts-runner.sh and android-deqp-runner.sh scripts are usually
sourced from android-runner.sh which then propagates the EXIT_CODE value
set in the scripts.

However this scheme does not cover the case where android-cts-runner.sh
and android-deqp-runner.sh are called directly, in that case they will
not return the previously saved EXIT_CODE appropriately in the last
command.

Fix that, allowing developers to call the scripts directly with the
intended behavior.

After this change android-runner.sh does not need to know about the
EXIT_CODE variable anymore, which was a slight layering violation, but
it can just rely on the exit code of the last executed commands.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36286>
2025-07-22 20:49:12 +00:00
Antonio Ospite
f118c6062a ci/android: have a cleaner structure for results from Android CTS
Have a cleaner structure for results from Android CTS, this serves
multiple purposes:

- separate Android CTS specific results from other generic files under
  RESULTS_DIR

- keep Android CTS test results and Android CTS execution logs separate,
  to follow a structure more familiar to people used to Android CTS.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35971>
2025-07-09 09:18:08 +00:00
Antonio Ospite
924027865b ci/android: allow unbound ARTIFACTS_BASE_URL in android-cts-runner.sh
It may happen that `android-cts-runner.sh` is launched from a pure LAVA
job which may not define `ARTIFACTS_BASE_URL`.

Allow the script to continue even in that case.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35937>
2025-07-04 12:30:35 +00:00
Valentine Burley
9a25d6c00f ci/android: Add link to Android CTS results
The Android CTS results are saved as an HTML page in the CI artifacts.
Add a direct link to make them easier to access.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35792>
2025-06-30 10:15:15 +00:00
Valentine Burley
f56be74be6 ci/android: Add separate log section for Android CTS
The Android CTS logs were previously buried under the `cuttlefish: setup`
section. Add an uncollapsed section to improve visibility.

Also remove the `gathering the results` section, which was empty in the logs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35792>
2025-06-30 10:15:15 +00:00
Antonio Ospite
59ecbaaac0 ci/android: support issuing custom commands before running Android CTS
Some Android build may require some specific setup before running
Android CTS, for example switching to a user different than 0, or
setting some properties.

Add a mechanism to issue such commands in a generic way.

The job definition will have to set the `ANDROID_CTS_PREPARE_COMMAND`
variable with the desired command to execute right before running
Android CTS.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35380>
2025-06-27 09:27:45 +00:00
Guilherme Gallo
545727f97c ci/android: Move ANDROID_CTS_MODULES to build script
Rely on the include files (-android-cts-include.txt) to filter both
tests and modules from Android CTS during test time.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35706>
2025-06-26 23:21:12 +00:00
Antonio Ospite
c9a8e1f49a ci/android: get aapt from the build-tools from Google instead of Debian
The aapt package form Debian might not be recent enough to install the
packages from Android CTS.

Resulting in an error like:

```
03:12:09.302: Module(s) with run failure(s):
03:12:09.302:     x86_64 CtsGraphicsTestCases: com.android.tradefed.targetprep.TargetSetupError[AAPT_PARSER_FAILED|520050|DEPENDENCY_ISSUE]: AaptParser failed for file CtsGraphicsTestCases.apk. The APK won't be installed
```

So get aapt from the build-tools matching the ANDROID_SDK_VERSION
corresponding to the Android version and CTS version used in the tests,
to ensure compatibility.

This effectively reverts the changes from commit b3c07fe722
(ci/android: Use aapt from Debian packages, 2025-04-21), but moving the
code around a bit.

The build-tools are not taken as LAVA overlay because LAVA is not able
to handle zip files, and the file in not big enough to be worth any
repacking effort.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35688>
2025-06-24 08:21:18 +00:00
Antonio Ospite
8383d28b44 ci/android: test that all available modules ran in android-cts-runner.sh
If an Android CTS module does not even start the amount of `FAILED`
tests in the invocation summary could still show up as 0, passing the
sanity check on the completion status, and `cts-tradefed` would not
reflect the module-level failure in the return value either.

So explicitly check that all included modules completed and, in case
they didn't, propagate this kind of failure to `EXIT_CODE`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35688>
2025-06-24 08:21:17 +00:00
Guilherme Gallo
969bb7bd70 ci/android: Use structured tag for Android CTS version
Structured tagging ensures that we are building and testing the current
component version specified in the commit by matching the checksum of
the related build script file.

In this case, it is worthy to isolate the Android CTS version part,
because we don't need to rebuild the entire test-android container when
we change the CTS version or the CTS modules filtering.

PS: actually the new file `build-android-cts.sh` is not building
anything, it is just downloads, filters, compress and reupload the
stripped version to S3. The `build-` prefix is to make it work
transparently with `bin/ci/update_tag.py` script.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35596>
2025-06-23 15:22:45 +00:00
Valentine Burley
118a4c5872 ci/android: Remove redundant android-tools folder
Since we no longer download the Android build or platform tools,
there's no need for a separate android-tools subfolder. The CTS
archive is now extracted directly to /android-cts.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
b3c07fe722 ci/android: Use aapt from Debian packages
Switch to using the aapt Debian package, which includes up-to-date
versions of both aapt and aapt2. This removes the need to manually
download and install the Android build-tools, eliminating one of the
blockers for a hypothetical arm64 test-android container.

Verified versions:
aapt: Android Asset Packaging Tool, v0.2-debian
aapt2: Android Asset Packaging Tool (aapt) 2.19-debian

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Antonio Ospite
fbc715200e ci/android: strip tailing spaces in Android CTS expectation files
Trailing spaces in include and exclude filters can confuse cts-tradefed,
so make sure to strip those from the lines in Android CTS expectation
files, since those are used to build the filter arguments.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34479>
2025-04-17 11:50:07 +00:00
Antonio Ospite
8f41667b37 ci/android: specify EXCLUDE_FILTERS after INCLUDE_FILTERS when launching Android CTS
Specify EXCLUDE_FILTERS after INCLUDE_FILTERS when launching Android
CTS, to make it clearer that exclude filters take the precedence on
include filters.

This change is not strictly necessary, according to the documentation
exclude filters take the precedence anyway, see
https://source.android.com/docs/core/tests/tradefed/testing/through-suite/option-passing#pass_filters_to_the_suite

So this change is added only to document the behavior rather then to
control it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34479>
2025-04-17 11:50:07 +00:00
Antonio Ospite
bac77bb30d ci/android: add a job using android-cts instead of deqp-runner
We also want to run Android CTS in the Android jobs.

Since the Android CTS is quite large, download it and strip it down to
only contain the interesting tests, so to reduce the space taken in the
container image.

Eventually we might want to have android-cts be run via deqp-runner
itself, but for now add a proof-of-concept mechanism which calls the
android-cts directly and uses an ad-hoc handling of expectations.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33499>
2025-03-12 10:29:17 +00:00