Commit 76c24028 authored by Robin Newhouse's avatar Robin Newhouse Committed by Andrew Hutchings

Fix build failure in sanitizer on GitLab-CI

Sanitizer tests were introduced in 617f45b for GitLab CI, but started
failing on latest Fedora version with error:

    $ yum install -y /usr/lib64/libasan.so.6.0.0 /usr/lib64/libtsan.so.0.0.0 /usr/lib64/libubsan.so.1.0.0
    Last metadata expiration check: 0:00:51 ago on Fri Dec  9 20:05:01 2022.
    No match for argument: /usr/lib64/libasan.so.6.0.0
    No match for argument: /usr/lib64/libtsan.so.0.0.0
    Error: Unable to find a match: /usr/lib64/libasan.so.6.0.0 /usr/lib64/libtsan.so.0.0.0

The reason for using specific library versions is unknown. Switch to
simply using latest package versions, as is works and is likely to work
best in the long run.

Also, enclose "../rpmlist-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log" in
quotes to avoid `ambiguous redirect` error when $CI_JOB_NAME has spaces.

Additionally use "needs" statements to allow tests to run immediately
after dependent jobs passed instead of waiting for the full stage to
complete.

All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the BSD-new
license. I am contributing on behalf of my employer Amazon Web Services
parent 0a67daad
...@@ -71,7 +71,7 @@ variables: ...@@ -71,7 +71,7 @@ variables:
echo "$package" echo "$package"
rpm -qlpv "$package" | awk '{print $1 " " $3 "/" $4 " ." $9 " " $10 " " $11}' | sort -k 3 rpm -qlpv "$package" | awk '{print $1 " " $3 "/" $4 " ." $9 " " $10 " " $11}' | sort -k 3
echo "------------------------------------------------" echo "------------------------------------------------"
done >> ../rpmlist-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log done >> "../rpmlist-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log"
# CPackRPM lists contents in build log, so no need to show the output of this, # CPackRPM lists contents in build log, so no need to show the output of this,
# just store it as a build artifact that can be downloaded and diffed against # just store it as a build artifact that can be downloaded and diffed against
# other builds to detect which files where added/removed/moved # other builds to detect which files where added/removed/moved
...@@ -182,7 +182,7 @@ fedora-sanitizer: ...@@ -182,7 +182,7 @@ fedora-sanitizer:
GIT_SUBMODULE_STRATEGY: normal GIT_SUBMODULE_STRATEGY: normal
script: script:
- yum install -y yum-utils rpm-build openssl-devel clang - yum install -y yum-utils rpm-build openssl-devel clang
- yum install -y /usr/lib64/libasan.so.6.0.0 /usr/lib64/libtsan.so.0.0.0 /usr/lib64/libubsan.so.1.0.0 - yum install -y libasan libtsan libubsan
# This repository does not have any .spec files, so install dependencies based on Fedora spec file # This repository does not have any .spec files, so install dependencies based on Fedora spec file
- yum-builddep -y mariadb-server - yum-builddep -y mariadb-server
- mkdir builddir; cd builddir - mkdir builddir; cd builddir
...@@ -305,6 +305,8 @@ mysql-test-run: ...@@ -305,6 +305,8 @@ mysql-test-run:
stage: test stage: test
dependencies: dependencies:
- fedora - fedora
needs:
- fedora
<<: *mysql-test-run-def <<: *mysql-test-run-def
artifacts: artifacts:
when: always # Also show results when tests fail when: always # Also show results when tests fail
...@@ -326,6 +328,8 @@ mysql-test-run-asan: ...@@ -326,6 +328,8 @@ mysql-test-run-asan:
RESTART_POLICY: "--force-restart" RESTART_POLICY: "--force-restart"
dependencies: dependencies:
- "fedora-sanitizer: [-DWITH_ASAN=YES]" - "fedora-sanitizer: [-DWITH_ASAN=YES]"
needs:
- "fedora-sanitizer: [-DWITH_ASAN=YES]"
<<: *mysql-test-run-def <<: *mysql-test-run-def
artifacts: artifacts:
when: always # Also show results when tests fail when: always # Also show results when tests fail
...@@ -339,6 +343,8 @@ mysql-test-run-tsan: ...@@ -339,6 +343,8 @@ mysql-test-run-tsan:
RESTART_POLICY: "--force-restart" RESTART_POLICY: "--force-restart"
dependencies: dependencies:
- "fedora-sanitizer: [-DWITH_TSAN=YES]" - "fedora-sanitizer: [-DWITH_TSAN=YES]"
needs:
- "fedora-sanitizer: [-DWITH_TSAN=YES]"
<<: *mysql-test-run-def <<: *mysql-test-run-def
allow_failure: true allow_failure: true
artifacts: artifacts:
...@@ -353,6 +359,8 @@ mysql-test-run-ubsan: ...@@ -353,6 +359,8 @@ mysql-test-run-ubsan:
RESTART_POLICY: "--force-restart" RESTART_POLICY: "--force-restart"
dependencies: dependencies:
- "fedora-sanitizer: [-DWITH_UBSAN=YES]" - "fedora-sanitizer: [-DWITH_UBSAN=YES]"
needs:
- "fedora-sanitizer: [-DWITH_UBSAN=YES]"
<<: *mysql-test-run-def <<: *mysql-test-run-def
allow_failure: true allow_failure: true
artifacts: artifacts:
...@@ -367,6 +375,8 @@ mysql-test-run-msan: ...@@ -367,6 +375,8 @@ mysql-test-run-msan:
RESTART_POLICY: "--force-restart" RESTART_POLICY: "--force-restart"
dependencies: dependencies:
- "fedora-sanitizer: [-DWITH_MSAN=YES]" - "fedora-sanitizer: [-DWITH_MSAN=YES]"
needs:
- "fedora-sanitizer: [-DWITH_MSAN=YES]"
<<: *mysql-test-run-def <<: *mysql-test-run-def
allow_failure: true allow_failure: true
artifacts: artifacts:
...@@ -379,6 +389,8 @@ rpmlint: ...@@ -379,6 +389,8 @@ rpmlint:
stage: test stage: test
dependencies: dependencies:
- fedora - fedora
needs:
- fedora
script: script:
- yum install -y rpmlint - yum install -y rpmlint
- rm -f rpm/*debuginfo* # Not relevant in this test - rm -f rpm/*debuginfo* # Not relevant in this test
...@@ -396,6 +408,8 @@ fedora install: ...@@ -396,6 +408,8 @@ fedora install:
stage: test stage: test
dependencies: dependencies:
- fedora - fedora
needs:
- fedora
script: script:
- rm -f rpm/*debuginfo* # Not relevant in this test - rm -f rpm/*debuginfo* # Not relevant in this test
# Nothing provides galera-4 on Fedora, so this step fails if built with wsrep # Nothing provides galera-4 on Fedora, so this step fails if built with wsrep
...@@ -429,6 +443,8 @@ fedora upgrade: ...@@ -429,6 +443,8 @@ fedora upgrade:
stage: test stage: test
dependencies: dependencies:
- fedora - fedora
needs:
- fedora
script: script:
- dnf install -y mariadb-server - dnf install -y mariadb-server
# Fedora does not support running services in Docker (like Debian packages do) so start it manually # Fedora does not support running services in Docker (like Debian packages do) so start it manually
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment