The tests themselves moved to https://gitlab.com/redhat/centos-stream/tests/libmpc
This commit is contained in:
parent
799ade64a3
commit
bc669faadc
8 changed files with 2 additions and 227 deletions
|
|
@ -1,5 +1,6 @@
|
|||
summary: All available tests
|
||||
discover:
|
||||
how: fmf
|
||||
url: https://gitlab.com/redhat/centos-stream/tests/libmpc.git
|
||||
execute:
|
||||
how: tmt
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
summary: CI Gating Plan
|
||||
discover:
|
||||
how: fmf
|
||||
url: https://gitlab.com/redhat/centos-stream/tests/libmpc.git
|
||||
filter: 'tag: Fedora-CI-gating'
|
||||
execute:
|
||||
how: tmt
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
summary: internal-testsuite
|
||||
description: ''
|
||||
contact: Martin Coufal <mcoufal@redhat.com>
|
||||
enabled: true
|
||||
tag:
|
||||
- CI-Tier-1
|
||||
- Fedora-CI-gating
|
||||
component:
|
||||
- libmpc
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
require:
|
||||
- libmpc
|
||||
- rpm-build
|
||||
- gcc
|
||||
- gcc-c++
|
||||
recommend:
|
||||
- gmp-devel
|
||||
- mpfr-devel
|
||||
- texinfo
|
||||
- yum-utils
|
||||
- dnf-utils
|
||||
duration: 60m
|
||||
extra-nitrate: TC#0538960
|
||||
extra-summary: /tools/libmpc/Regression/internal-testsuite
|
||||
extra-task: /tools/libmpc/Regression/internal-testsuite
|
||||
id: 2eebfd52-7f14-4f82-b398-ae2f209eb118
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
PACKAGE="${PACKAGE:-$(rpm -qf --qf='%{name}\n' /usr/lib64/libmpc.so.3)}"
|
||||
export PACKAGE
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm "$PACKAGE"
|
||||
rlRun "TmpDir=\$(mktemp -d)"
|
||||
rlRun "pushd $TmpDir"
|
||||
rlFetchSrcForInstalled "$PACKAGE"
|
||||
if [[ -e /usr/bin/dnf ]]; then
|
||||
rlRun "dnf builddep -y $PACKAGE*src.rpm" 0-255
|
||||
else
|
||||
rlRun "yum-builddep -y $PACKAGE*src.rpm" 0-255
|
||||
fi
|
||||
if rlIsFedora || rlIsRHEL '>9'; then
|
||||
rlRun "export RPM_PACKAGE_NAME=$(rpm -q --qf='%{NAME}' -p $PACKAGE*src.rpm)"
|
||||
rlRun "export RPM_PACKAGE_VERSION=$(rpm -q --qf='%{VERSION}' -p $PACKAGE*src.rpm)"
|
||||
rlRun "export RPM_PACKAGE_RELEASE=$(rpm -q --qf='%{RELEASE}' -p $PACKAGE*src.rpm)"
|
||||
rlRun "export RPM_ARCH=$(rpm -q --qf='%{ARCH}' -p $PACKAGE*src.rpm)"
|
||||
fi
|
||||
rlRun "rpm --define='_topdir $TmpDir' -Uvh *src.rpm"
|
||||
rlRun "rpmbuild --define='_topdir $TmpDir' -bc SPECS/libmpc.spec"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
for SRC_DIR in BUILD/mpc-*/src BUILD/libmpc-*/mpc-*/src; do
|
||||
[[ -d "$SRC_DIR" ]] && break
|
||||
done
|
||||
if rlRun "pushd $SRC_DIR/.."; then
|
||||
rlRun "make check &>$TmpDir/check.log"
|
||||
rlRun popd
|
||||
fi
|
||||
rlRun "grep '^# of unexpected' check.log" 1
|
||||
rlGetPhaseState || rlFileSubmit check.log check.log
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun popd
|
||||
rlRun "rm -r $TmpDir"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# For now, just a "manual" helper.
|
||||
# TODO: Automate. See e.g. https://src.fedoraproject.org/tests/binutils
|
||||
|
||||
RETVAL=0
|
||||
|
||||
PRE_COMMIT_YAML=$(realpath "${0%/*}"/pre-commit.yaml)
|
||||
cd "${0%/*}"/../.. || exit 1
|
||||
|
||||
DELIMITER='=============================================================================='
|
||||
|
||||
echo -e "\n${DELIMITER}\nRunning tmt lint ..."
|
||||
tmt lint --failed-only --outcome-only=fail --outcome-only=warn || RETVAL=1
|
||||
echo "$DELIMITER"
|
||||
|
||||
echo -e "\n${DELIMITER}\nRunning yamllint ..."
|
||||
find . -name '*.fmf' -exec yamllint -d '{extends: default, rules: {document-start: disable, line-length: disable}}' {} + || RETVAL=1
|
||||
echo "$DELIMITER"
|
||||
|
||||
echo -e "\n${DELIMITER}\nRunning pre-commit with -c $PRE_COMMIT_YAML ..."
|
||||
pre-commit run --all-files -c "$PRE_COMMIT_YAML" --all-files || RETVAL=1
|
||||
echo "$DELIMITER"
|
||||
|
||||
echo -e "\n${DELIMITER}\nRunning ShellCheck ..."
|
||||
find . -path ./helpers/schedulers -prune -o -type f -name '*.sh' -exec shellcheck --norc --exclude=SC1091 {} + || RETVAL=1
|
||||
echo "$DELIMITER"
|
||||
|
||||
echo -en "\nOVERALL RESULT: "
|
||||
[[ "$RETVAL" -eq 0 ]] && echo PASS || echo FAIL
|
||||
exit $RETVAL
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
# See https://pre-commit.com for more information
|
||||
# See https://pre-commit.com/hooks.html for more hooks
|
||||
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.4.0
|
||||
hooks:
|
||||
- id: check-added-large-files
|
||||
- id: check-case-conflict
|
||||
- id: check-executables-have-shebangs
|
||||
- id: check-merge-conflict
|
||||
- id: check-symlinks
|
||||
- id: check-yaml
|
||||
- id: destroyed-symlinks
|
||||
- id: detect-private-key
|
||||
- id: end-of-file-fixer
|
||||
exclude: \.(h|c|cc|C|cpp|hpp|f|f90|java|pm|txt|batch)$
|
||||
- id: forbid-submodules
|
||||
- id: mixed-line-ending
|
||||
- id: trailing-whitespace
|
||||
exclude: \.(h|hh|hpp|c|cc|C|cpp|f|f90|java|i|ii|patch|dump|golden)$
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Run all the tests on all the active Fedora releases, including Rawhide.
|
||||
# Meant for checking the tests, for example when they go through significant
|
||||
# changes.
|
||||
#
|
||||
# Note:
|
||||
# * x86_64 only
|
||||
# * executed in local virtual machines
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
|
||||
# We read the list of the active releases from fedpkg. We need to make some
|
||||
# transformations to make strings useful below, namely:
|
||||
# * f<NN> -> fedora-<NN>
|
||||
# * sort from-newest-to-oldest
|
||||
# * drop the newest, rawhide will be use instead
|
||||
ACTIVE_RELEASES=$(fedpkg releases-info -f | tr ' ' \\012 | sed 's|^f|fedora-|' | sort -rV | tr \\012 ' ' | tr -d '[:cntrl:]')
|
||||
|
||||
# The actual test runs. Throw in some decorations for easier reading.
|
||||
for i in fedora-rawhide $ACTIVE_RELEASES; do
|
||||
|
||||
CMD="tmt -c distro=$i -c arch=x86_64 run -arv provision -h virtual -i $i -m 4096 -a x86_64 plans -n all_tests"
|
||||
# shellcheck disable=SC2001
|
||||
DECORATION=$(echo "$CMD" | sed 's|.|#|g')
|
||||
|
||||
echo
|
||||
echo "##${DECORATION}##"
|
||||
echo "# $CMD #"
|
||||
echo "##${DECORATION}##"
|
||||
echo
|
||||
|
||||
$CMD
|
||||
done
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Run all the tests on all the active Fedora releases, including Rawhide.
|
||||
# Meant for checking the tests, for example when they go through significant
|
||||
# changes.
|
||||
#
|
||||
# Note:
|
||||
# * x86_64 only
|
||||
# * executed in testing-farm.io in parallel in a tmux session
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
|
||||
architectures='x86_64'
|
||||
script_name=${0##*/}
|
||||
|
||||
# Collect information on testing targets
|
||||
declare -A target_matrix
|
||||
counter=0
|
||||
for i in $(fedpkg releases-info -f); do
|
||||
distro="${i/f/fedora-}"
|
||||
compose="Fedora-${i/f/}-Updated"
|
||||
for arch in $architectures; do
|
||||
target_matrix[$counter]="$distro|$compose|$arch"
|
||||
(( counter+=1 ))
|
||||
done
|
||||
done
|
||||
for arch in $architectures; do
|
||||
target_matrix[$counter]="fedora-rawhide|Fedora-Rawhide-Nightly|$arch"
|
||||
(( counter+=1 ))
|
||||
done
|
||||
|
||||
# Run a new tiled tmux session, each testing in its own pane. Since sending
|
||||
# multiple testing-farm requests at the same moment is fragile, send them
|
||||
# sequentially with a pause of several seconds among them. Those dispatches
|
||||
# and pauses happen in background while the user would be staring at a blank
|
||||
# sreen; to remove possible confusion, show what's happening by restrained
|
||||
# usage of 'set -x'.
|
||||
session=''; i=0; while true; do
|
||||
session="${script_name%.sh}-${i}"
|
||||
tmux has-session -t "$session" &>/dev/null || break
|
||||
(( i+=1 ))
|
||||
done
|
||||
started=false
|
||||
for (( i=0; i<${#target_matrix[@]}; i++ )); do
|
||||
IFS='|' read -ra target <<< "${target_matrix[$i]}"
|
||||
distro=${target[0]}
|
||||
compose=${target[1]}
|
||||
arch=${target[2]}
|
||||
command="set -x; testing-farm request --arch=$arch --hardware=memory='>= 4 GiB' --hardware=disk.size='>= 20 GiB' --compose=$compose -c distro=$distro -c arch=$arch --plan=all_tests; echo EXIT_VALUE=\$?; read PRESS_ANY_KEY"
|
||||
if ! $started; then
|
||||
set -x
|
||||
tmux new-session -s "$session" -d "$command"
|
||||
set +x
|
||||
started=true
|
||||
else
|
||||
set -x
|
||||
tmux split-window -t "$session" -d "$command"
|
||||
tmux select-layout -t "$session" even-vertical
|
||||
tmux select-pane -t "$session" -D
|
||||
set +x
|
||||
fi
|
||||
sleep 2
|
||||
done
|
||||
set -x
|
||||
tmux select-pane -t "$session"
|
||||
tmux select-layout -t "$session" tiled
|
||||
tmux attach-session -t "$session"
|
||||
Loading…
Add table
Add a link
Reference in a new issue