From 1b973278bd86e383507e76810210e5444e92bc75 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Thu, 21 Nov 2024 11:57:15 +0100 Subject: [PATCH] ci/deqp: make sure the main commit is actually from the main branch Part-of: --- .gitlab-ci/container/build-deqp.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitlab-ci/container/build-deqp.sh b/.gitlab-ci/container/build-deqp.sh index 13d707304bf..e176bde7e75 100644 --- a/.gitlab-ci/container/build-deqp.sh +++ b/.gitlab-ci/container/build-deqp.sh @@ -107,6 +107,14 @@ git fetch --depth 1 origin "$DEQP_VERSION" git checkout FETCH_HEAD DEQP_COMMIT=$(git rev-parse FETCH_HEAD) +if [ "$DEQP_VERSION" = "$DEQP_MAIN_COMMIT" ]; then + git fetch origin main + if ! git merge-base --is-ancestor "$DEQP_MAIN_COMMIT" origin/main; then + echo "VK-GL-CTS commit $DEQP_MAIN_COMMIT is not a commit from the main branch." + exit 1 + fi +fi + mkdir -p /deqp if [ "$DEQP_API" = tools ]; then