gdb/qa-local.sh
Tom de Vries fc4d8845bb - Patches dropped (bsc#1207712):
* gdb-container-rh-pkg.patch
- Patches added (bsc#1207712):
  * gdb-testsuite-add-gdb.suse-debranding.exp.patch
- Patches added (test-case fix):
  * gdb-testsuite-fix-gdb.dwarf2-dw2-dir-file-name.exp-w.patch
- Patches added (fedora patch fixup):
  * fixup-gdb-test-dw2-aranges.patch
- Patches added (master backports):
  * gdb-testsuite-add-xfail-in-gdb.arch-i386-pkru.exp.patch
  * gdb-testsuite-add-xfail-in-gdb.python-py-record-btra.patch
  * gdb-testsuite-factor-out-proc-linux_kernel_version.patch
  * gdb-testsuite-fix-gdb.base-infoline-reloc-main-from-.patch
  * gdb-testsuite-fix-gdb.base-nested-subp-2-3-.exp-with.patch
  * gdb-testsuite-fix-gdb.threads-schedlock.exp-on-fast-.patch
  * gdb-testsuite-handle-missing-.note.gnu-stack.patch
  * gdb-testsuite-simplify-gdb.arch-amd64-disp-step-avx..patch
  * gdb-testsuite-fix-gdb.threads-schedlock.exp-for-gcc-.patch
  * gdb-testsuite-add-xfail-case-in-gdb.python-py-record.patch
  * add-elfcompress_zstd.patch
  * binutils-gdb-support-zstd-compressed-debug-section.patch
  * fix-gdb-build-elf-support-check-lzstd.patch
- Patches removed (dropped by fedora):
  * gdb-test-ivy-bridge.patch
- Disable "BuildRequires: %{gcc}-fortran" for SLE-11.
- Maintenance script qa-local.sh:
  * Add SLE-11 to configs.
  * Build with --no-verify.
- Maintenance script qa.sh:
  * Add -sle11.

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=347
2023-03-01 11:32:26 +00:00

206 lines
3.1 KiB
Bash

#!/bin/sh
pwd=$(pwd -P)
root=$pwd/tmp-qa-local
logs=$root/logs
pkgs=$root/pkgs
configs="
openSUSE_Leap_15.4
openSUSE_Leap_15.3
openSUSE_Factory
SLE-15
SLE-12
SLE-11
"
usage ()
{
echo "usage: $0 <1-4>"
echo "1: Cleanup"
echo "2: Do local builds without testsuite"
echo "3: Do local builds with testsuite"
echo "4: Verify local testsuite results"
}
if [ $# -eq 0 ]; then
usage
exit 1
fi
n="$1"
shift
extract ()
{
local package
package="$1"
rpm2cpio "$package" \
| cpio -idmv \
> /dev/null \
2>&1
}
cleanup ()
{
if [ -d $root ]; then
echo "About to remove dir $root"
echo "Press ^C to abort, enter to continue"
read
fi
rm -Rf $root
mkdir -p $root
}
acquire_sudo_rights ()
{
# Acquire sudo rights.
sudo --validate
# Keep sudo rights alive.
while true; do
sleep 100
sudo --validate --non-interactive
kill -0 "$$" 2>/dev/null || exit
done &
}
archs="x86_64 i586"
have_combo ()
{
arch="$1"
c="$2"
if [ "$arch" = "i586" ]; then
case $c in
SLE-12|SLE-15)
return 1
;;
esac
fi
return 0
}
case "$n" in
1)
cleanup
;;
2)
acquire_sudo_rights
rm -Rf $logs/$n
mkdir -p $logs/$n
for arch in $archs; do
for c in $configs; do
if ! have_combo $arch $c; then
continue
fi
osc build \
--clean \
--no-verify \
--trust-all-projects \
--no-service \
$c $arch \
> $logs/$n/LOG.$c.$arch \
2>&1
if [ $? -eq 0 ]; then
echo PASS: $c $arch
else
echo FAIL: $c $arch
fi
sudo rm -Rf /var/tmp/build-root/$c-$arch
done
done
;;
3)
acquire_sudo_rights
rm -Rf $logs/$n
mkdir -p $logs/$n
for arch in $archs; do
for c in $configs; do
if ! have_combo $arch $c; then
continue
fi
mkdir -p $pkgs/$c.$arch
osc build \
--clean \
--no-verify \
--trust-all-projects \
--no-service \
-k $pkgs/$c.$arch \
-M testsuite \
$c $arch \
> $logs/$n/LOG.$c.$arch \
2>&1
if [ $? -eq 0 ]; then
ok=true
else
ok=false
fi
rpm=gdb-testresults-12.1-0.$arch.rpm
if [ -f $pkgs/$c.$arch/$rpm ]; then
(
cd $pkgs/$c.$arch
extract gdb-testresults-12.1-0.$arch.rpm
)
mv \
$pkgs/$c.$arch/usr/share/doc/packages/gdb-testresults \
$pkgs/gdb-testresults.$c.$arch
rm -Rf $pkgs/$c.$arch
else
ok=false
fi
if $ok; then
echo PASS: $c $arch
else
echo FAIL: $c $arch
fi
sudo rm -Rf /var/tmp/build-root/$c-$arch
done
done
;;
4)
for arch in $archs; do
for c in $configs; do
if ! have_combo $arch $c; then
continue
fi
echo "CONFIG: $c $arch"
case $c in
openSUSE_Factory)
bash qa.sh -local -factory $pkgs/gdb-testresults.$c.$arch
;;
SLE-12)
bash qa.sh -local -sle12 $pkgs/gdb-testresults.$c.$arch
;;
SLE-11)
bash qa.sh -local -sle11 $pkgs/gdb-testresults.$c.$arch
;;
*)
bash qa.sh -local $pkgs/gdb-testresults.$c.$arch
;;
esac
done
done
;;
*)
echo "Don't know how to handle arg: $n"
exit 1
;;
esac