Commit Graph

21 Commits

Author SHA1 Message Date
Antonio Ospite
abb9ebed26 ci/android: download S3_ANDROID_ARTIFACT_NAME in cuttlefish-runner.sh
Downloading the android artifacts separately is really a peculiarity of
cuttlefish jobs, where we need mesa artifacts for both the host and the
guest.

So move the separate download of android artifacts to
cuttlefish-runner.sh

This aligns with the .test-android definition being cuttlefish specific,
and it also matches the original comment in that definition regarding
S3_ANDROID_ARTIFACT_NAME.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35380>
2025-06-27 09:27:45 +00:00
Antonio Ospite
00ea50d964 ci/android: download mesa artifacts in a more robust way
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35380>
2025-06-27 09:27:45 +00:00
Antonio Ospite
d49653e4a3 ci/android: trust system GLES if ANGLE_TAG is not specified
In commit c99c67c490 (ci/android: Only replace ANGLE if needed,
2025-06-05) ANGLE is replaced in the Android device only when ANGLE_TAG
is specified.

However it can still happen that the device was using ANGLE all along,
and not replacing it means that the original version would not match the
one built by mesa-ci, making the GLES version check fail unnecessarily.

In case ANGLE_TAG is not specified the GLES version check can be skipped
altogether, the rationale for this approach is that ANGLE can be
considered the  default GLES implementation for Android going forward,
so if android-runner.sh has not replaced it we can just trust that the
original one is in place.

There might still be some fancy setups in the wild where the GLES
implementation is mesa and not ANGLE, but we are not testing those in
mesa-ci for now, so skipping the test for non-ANGLE GLES too is
acceptable.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35380>
2025-06-27 09:27:45 +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
9a52a25a9e ci: Allow ANGLE_TAG to be unset in -runner scripts
The android-runner scripts use `set -u`, which causes them to fail if
ANGLE_TAG is not defined. This issue went unnoticed because all current
Android jobs set ANGLE_TAG.

Update all -runner scripts to tolerate ANGLE_TAG being unset.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35362>
2025-06-05 15:18:23 +00:00
Valentine Burley
c99c67c490 ci/android: Only replace ANGLE if needed
Only replace the stock ANGLE libraries if the job inherits .test-angle.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35362>
2025-06-05 15:18:23 +00:00
Antonio Ospite
47619ef538 ci/android: silence mesa error about //.cache
Pass XDG_CACHE_HOME=/data/local/tmp to binaries that load mesa
libraries to avoid the following message on the stderr:

  Failed to create //.cache for shader cache (Read-only file system)---disabling.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35335>
2025-06-04 13:25:21 +00:00
Antonio Ospite
bdcdfe8b33 ci/android: show also the device name when printing GLES and VK info
This can give an indication in the logs about what driver is being
picked up.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35335>
2025-06-04 13:25:21 +00:00
Antonio Ospite
76a73ba263 ci/android: get only the first device from eglinfo and vulkaninfo
It is possible that `eglinfo` and `vulkaninfo` provide info on multiple
devices.

Consider only the first device, which is going to be the default one
used by other components, when checking the versions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35335>
2025-06-04 13:25:20 +00:00
Antonio Ospite
e12aa9a49e ci/android: fix printing the original GLES and Vulkan versions
New mechanisms to retrieve the GLES and Vulkan driver versions have been
introduced in

  - 3029fdde65 (ci/android: Switch to using eglinfo to check GLES implementation, 2025-05-28)
  - 3ba9038648 (ci/android: Check Vulkan driver using vulkaninfo, 2025-05-28)

These mechanisms are more robust than the previous one but they do
change the behavior in that the version is not retrieved by an already
running process (e.g. SurfaceFlinger), but by creating new processes
that load the libraries available on the filesystem.

Because of this change of behavior the original version should be
printed **before** pushing the new libraries to the Android guest, so
that developers are able to compare the old and new versions in the logs.

Moreover, the runtime checks do not answer the original question anymore:

  "what GLES/VK libraries is surfaceflinger currently using?"

but rather new question:

  "what GLES/VK libraries are services going to use when they load?"

So the shell start/stop can very well performed after the version check,
accompanied by a new check on the PID of SurfaceFlinger to be sure that
it has reloaded consequently picking up the new libraries.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35335>
2025-06-04 13:25:20 +00:00
Valentine Burley
5b60cae2af ci/android: Make android-runner scripts safe for set -u
Also make having VK_DRIVER set mandatory for Cuttlefish.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35277>
2025-06-03 13:58:11 +00:00
Valentine Burley
3ba9038648 ci/android: Check Vulkan driver using vulkaninfo
Add a step to detect the active Vulkan driver by parsing `vulkaninfo`.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35232>
2025-06-02 06:27:31 +00:00
Valentine Burley
3029fdde65 ci/android: Switch to using eglinfo to check GLES implementation
In newer Android versions, SurfaceFlinger uses Vulkan by default,
so `dumpsys SurfaceFlinger` no longer reveals the GLES implementation.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35232>
2025-06-02 06:27:31 +00:00
Valentine Burley
9d11a8304e ci/android: Remove platform-tools from test-android container
Cuttlefish comes with the required tools (under /cuttlefish/bin),
downloading platform-tools isn't necessary.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34320>
2025-04-05 09:28:21 +00:00
Antonio Ospite
4ee3c302ce ci/android: factor out GLES runtime version retrieval to a function
Different versions of Android might have different ways of getting the
GLES runtime version, so factor this out to a function, so that the
mechanism can be changed in a centralized way.

Also rename MESA_RUNTIME_VERSION to GLES_RUNTIME_VERSION because this is
really what is being retrieved, in the future we might have a similar
check for the vulkan Mesa driver.

While at it remove mentions of SurfaceFlinger in some comments since the
mechanism to retrieve the versions is irrelevant for the purposes of the
checks.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
2025-03-26 17:25:56 +00:00
Antonio Ospite
3af15abd68 ci/android: handle ANGLE being installed under /system on Android 15+
The ANGLE library is installed under /system rather than /vendor
starting from Android 15, so handle this difference in the
android-runner.sh script.

See also:
d964482310

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
2025-03-26 17:25:56 +00:00
Antonio Ospite
c953e90e23 ci/android: push also the intel vulkan driver
The intel vulkan driver is always built by the `debian-android` job,
since it may be needed for some future job, push it unconditionally, it
does not hurt to have it in the Android system.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
2025-03-26 17:25:56 +00:00
Antonio Ospite
9ce3d9c933 ci/android: always push ANGLE libraries
Since ANGLE is always built for Android, always push it even if it is
not going to be tested directly.

Besides simplifying the script, this is also because ANGLE is going to
be mandatory anyway starting from Android 15+ and not having it in the
Android system might cause unexpected failures.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
2025-03-26 17:25:56 +00:00
Antonio Ospite
e346b5786d ci/android: remove old mesa and ANGLE libraries before pushing new ones
Remove old mesa and ANGLE libraries before pushing new ones, and do this
using a trailing wildcard, because some versions of Android might have
versioned libraries like /vendor/lib64/egl/libEGL_mesa.so.1 which should
also be removed to avoid any confusion when loading the freshly pushed
ones.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
2025-03-26 17:25:56 +00:00
Antonio Ospite
2eaf1818a3 ci/android: remove some unnecessary adb commands from android-runner.sh
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
2025-03-26 17:25:55 +00:00
Antonio Ospite
e774584faa ci/android: factor out a generic android-runner.sh from cuttlefish-runner.sh
Some of the commands in cuttlefish-runner.sh, like updating mesa and
ANGLE, are not specific to cuttlefish, in general they can be executed
on any Android device under test.

So split those commands out of cuttlefish-runner.sh and put them into an
android-runner.sh script.

For example, when testing a physical Android device instead of a virtual
device, a mesa-ci job will call android-runner.sh directly instead of
cuttlefish-runner.sh

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
2025-03-26 17:25:55 +00:00