ci/deqp: Backport Android logcat commit
Instead of manually applying the patch, backport the version that landed in main, which requires a cmake argument to enable. Signed-off-by: Valentine Burley <valentine.burley@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38071>
This commit is contained in:
committed by
Marge Bot
parent
4cbf5062b7
commit
a265cdaa18
@@ -46,6 +46,8 @@ main_cts_patch_files=(
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
vk_cts_commits_to_backport=(
|
||||
# Add an option to print to logcat in Android executable builds
|
||||
fc51668efdfd0dffa30b3eddee34aa26172969fb
|
||||
)
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
@@ -66,6 +68,8 @@ gl_cts_patch_files=(
|
||||
gles_cts_commits_to_backport=(
|
||||
# CMake: Include FindPkgConfig before using pkg_check_modules()
|
||||
e09e0a210b041d0bf7b525620d0068eab3ffa66a
|
||||
# Add an option to print to logcat in Android executable builds
|
||||
fc51668efdfd0dffa30b3eddee34aa26172969fb
|
||||
)
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
@@ -73,15 +77,6 @@ gles_cts_patch_files=(
|
||||
build-deqp-gl_Build-Don-t-build-Vulkan-utilities-for-GL-builds.patch
|
||||
)
|
||||
|
||||
if [ "${DEQP_TARGET}" = 'android' ]; then
|
||||
gles_cts_patch_files+=(
|
||||
build-deqp-Print-to-logcat-in-Android-executable-builds.patch
|
||||
)
|
||||
vk_cts_patch_files+=(
|
||||
build-deqp-Print-to-logcat-in-Android-executable-builds.patch
|
||||
)
|
||||
fi
|
||||
|
||||
|
||||
### Careful editing anything below this line
|
||||
|
||||
|
||||
@@ -101,12 +101,12 @@ EXTRA_CMAKE_ARGS="-DDEQP_ANDROID_EXE=ON -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DAND
|
||||
|
||||
DEQP_API=GLES \
|
||||
DEQP_TARGET="android" \
|
||||
EXTRA_CMAKE_ARGS="-DDEQP_ANDROID_EXE=ON -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=x86_64 -DDE_ANDROID_API=$ANDROID_SDK_VERSION" \
|
||||
EXTRA_CMAKE_ARGS="-DDEQP_ANDROID_EXE=ON -DDEQP_ANDROID_EXE_LOGCAT=ON -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=x86_64 -DDE_ANDROID_API=$ANDROID_SDK_VERSION" \
|
||||
. .gitlab-ci/container/build-deqp.sh
|
||||
|
||||
DEQP_API=VK \
|
||||
DEQP_TARGET="android" \
|
||||
EXTRA_CMAKE_ARGS="-DDEQP_ANDROID_EXE=ON -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=x86_64 -DDE_ANDROID_API=$ANDROID_SDK_VERSION" \
|
||||
EXTRA_CMAKE_ARGS="-DDEQP_ANDROID_EXE=ON -DDEQP_ANDROID_EXE_LOGCAT=ON -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=x86_64 -DDE_ANDROID_API=$ANDROID_SDK_VERSION" \
|
||||
. .gitlab-ci/container/build-deqp.sh
|
||||
|
||||
rm -rf /VK-GL-CTS
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
From 2826f97e5e78a76a61bf7e18e320feee727fb982 Mon Sep 17 00:00:00 2001
|
||||
From: Valentine Burley <valentine.burley@collabora.com>
|
||||
Date: Fri, 17 Oct 2025 08:11:11 +0200
|
||||
Subject: [PATCH] Print to logcat in Android executable builds.
|
||||
|
||||
Print to both stdout and logcat for debugging.
|
||||
|
||||
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
|
||||
---
|
||||
framework/qphelper/qpDebugOut.c | 17 ++++++++++++++++-
|
||||
1 file changed, 16 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/framework/qphelper/qpDebugOut.c b/framework/qphelper/qpDebugOut.c
|
||||
index 1e88371..dd87f8c 100644
|
||||
--- a/framework/qphelper/qpDebugOut.c
|
||||
+++ b/framework/qphelper/qpDebugOut.c
|
||||
@@ -98,7 +98,7 @@ void qpDiev(const char *format, va_list args)
|
||||
}
|
||||
|
||||
/* print() implementation. */
|
||||
-#if defined(DEQP_IS_ANDROID_APP)
|
||||
+#if (DE_OS == DE_OS_ANDROID)
|
||||
|
||||
#include <android/log.h>
|
||||
|
||||
@@ -115,6 +115,10 @@ static android_LogPriority getLogPriority(MessageType type)
|
||||
}
|
||||
}
|
||||
|
||||
+#endif
|
||||
+
|
||||
+#if defined(DEQP_IS_ANDROID_APP)
|
||||
+
|
||||
void printRaw(MessageType type, const char *message)
|
||||
{
|
||||
if (writeRedirect && !writeRedirect(type, message))
|
||||
@@ -146,6 +150,10 @@ void printRaw(MessageType type, const char *message)
|
||||
if (writeRedirect && !writeRedirect(type, message))
|
||||
return;
|
||||
|
||||
+#if (DE_OS == DE_OS_ANDROID)
|
||||
+ __android_log_write(getLogPriority(type), "dEQP", message);
|
||||
+#endif
|
||||
+
|
||||
FILE *out = getOutFile(type);
|
||||
|
||||
if (type == MESSAGETYPE_ERROR)
|
||||
@@ -165,6 +173,13 @@ void printFmt(MessageType type, const char *format, va_list args)
|
||||
if (writeFtmRedirect && !writeFtmRedirect(type, format, args))
|
||||
return;
|
||||
|
||||
+#if (DE_OS == DE_OS_ANDROID)
|
||||
+ va_list args_copy;
|
||||
+ va_copy(args_copy, args);
|
||||
+ __android_log_vprint(getLogPriority(type), "dEQP", format, args_copy);
|
||||
+ va_end(args_copy);
|
||||
+#endif
|
||||
+
|
||||
FILE *out = getOutFile(type);
|
||||
|
||||
if (type == MESSAGETYPE_ERROR)
|
||||
--
|
||||
2.48.1
|
||||
|
||||
Reference in New Issue
Block a user