Browse Source

Add github workflow

master
Harald Hoyer 4 years ago
parent
commit
3aae122c4b
  1. 29
      .github/workflows/fedora-30.yml
  2. 29
      .github/workflows/fedora-31.yml
  3. 4
      .travis.yml
  4. 2
      README.md
  5. 28
      fedora-test-github.sh
  6. 36
      fedora-test.sh
  7. 12
      test/TEST-20-NFS/test.sh
  8. 12
      test/TEST-30-ISCSI/test.sh
  9. 12
      test/TEST-31-ISCSI-MULTI/test.sh
  10. 12
      test/TEST-40-NBD/test.sh
  11. 12
      test/TEST-50-MULTINIC/test.sh
  12. 2
      test/TEST-60-IFCFG/server-init.sh
  13. 14
      test/TEST-60-IFCFG/test.sh
  14. 14
      test/TEST-70-BONDBRIDGETEAMVLAN/test.sh

29
.github/workflows/fedora-30.yml

@ -0,0 +1,29 @@ @@ -0,0 +1,29 @@
## The test container is created with https://github.com/dracutdevs/fedora-container

name: Fedora-30

on:
push:
branches:
- 'master'
tags:
- '*'
pull_request:

jobs:
test:
runs-on: ubuntu-latest
#container: quay.io/haraldh/dracut-fedora:30
timeout-minutes: 30
strategy:
matrix:
test: [ "01", "02", "03", "04", "10", "11", "12", "13", "14", "15", "17", "20", "30", "31", "40", "50", "60" ]
fail-fast: false
steps:
- name: "Checkout Repository"
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: "TEST-${{ matrix.test }}"
run: docker run --privileged -v $(pwd)/:/dracut quay.io/haraldh/dracut-fedora:30 /dracut/fedora-test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}

29
.github/workflows/fedora-31.yml

@ -0,0 +1,29 @@ @@ -0,0 +1,29 @@
## The test container is created with https://github.com/dracutdevs/fedora-container

name: Fedora-31

on:
push:
branches:
- 'master'
tags:
- '*'
pull_request:

jobs:
test:
runs-on: ubuntu-latest
#container: quay.io/haraldh/dracut-fedora:30
timeout-minutes: 30
strategy:
matrix:
test: [ "01", "02", "03", "04", "10", "11", "12", "13", "14", "15", "17", "20", "30", "31", "40", "50", "60" ]
fail-fast: false
steps:
- name: "Checkout Repository"
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: "TEST-${{ matrix.test }}"
run: docker run --privileged -v $(pwd)/:/dracut quay.io/haraldh/dracut-fedora:31 /dracut/fedora-test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}

4
.travis.yml

@ -12,8 +12,8 @@ env: @@ -12,8 +12,8 @@ env:
- IMAGE=latest TESTS=50
- IMAGE=latest TESTS=30
- IMAGE=latest TESTS=31
- IMAGE=latest TESTS=40
- IMAGE=latest TESTS=60
- IMAGE=latest TESTS=70
- IMAGE=latest TESTS=99
- IMAGE=latest TESTS=02
- IMAGE=latest TESTS=03
@ -37,7 +37,7 @@ before_script: @@ -37,7 +37,7 @@ before_script:
git describe --tags || :

script:
- docker run --privileged -it -v $(pwd)/:/dracut fedora:$IMAGE /dracut/fedora-test.sh $IMAGE-$$ "$TESTS"
- docker run --privileged -it -v $(pwd)/:/dracut quay.io/haraldh/dracut-fedora:$IMAGE /dracut/fedora-test.sh $IMAGE-$$ "$TESTS"

notifications:
webhooks:

2
README.md

@ -4,6 +4,8 @@ dracut @@ -4,6 +4,8 @@ dracut
dracut is an event driven initramfs infrastructure.

[![Build Status](https://travis-ci.org/dracutdevs/dracut.svg?branch=master)](https://travis-ci.org/dracutdevs/dracut)
![Fedora-30](https://github.com/dracutdevs/dracut/workflows/Fedora-30/badge.svg?branch=master)
![Fedora-31](https://github.com/dracutdevs/dracut/workflows/Fedora-31/badge.svg?branch=master)

dracut (the tool) is used to create an initramfs image by copying tools
and files from an installed system and combining it with the

28
fedora-test-github.sh

@ -0,0 +1,28 @@ @@ -0,0 +1,28 @@
#!/bin/bash

set -ex

[[ -d ${0%/*} ]] && cd ${0%/*}

RUN_ID="$1"
TESTS=$2

./configure

NCPU=$(getconf _NPROCESSORS_ONLN)

if ! [[ $TESTS ]]; then
make -j$NCPU all syncheck rpm logtee
else
make -j$NCPU all logtee

cd test

time LOGTEE_TIMEOUT_MS=590000 make \
KVERSION=$(rpm -qa kernel --qf '%{VERSION}-%{RELEASE}.%{ARCH}\n' | sort -rn | head -1) \
DRACUT_NO_XATTR=1 \
TEST_RUN_ID=$RUN_ID \
${TESTS:+TESTS="$TESTS"} \
-k V=1 \
check
fi

36
fedora-test.sh

@ -7,41 +7,6 @@ set -ex @@ -7,41 +7,6 @@ set -ex
RUN_ID="$1"
TESTS=$2

dnf -y update --best --allowerasing &>/dev/null

dnf -y install --best --allowerasing \
dash \
asciidoc \
mdadm \
lvm2 \
dmraid \
cryptsetup \
nfs-utils \
nbd \
dhcp-server \
scsi-target-utils \
iscsi-initiator-utils \
strace \
btrfs-progs \
kmod-devel \
gcc \
bzip2 \
xz \
tar \
wget \
rpm-build \
make \
git \
bash-completion \
sudo \
kernel \
dhcp-client \
/usr/bin/qemu-kvm \
/usr/bin/qemu-system-$(uname -i) \
e2fsprogs \
tcpdump \
$NULL &>/dev/null

./configure

NCPU=$(getconf _NPROCESSORS_ONLN)
@ -55,6 +20,7 @@ else @@ -55,6 +20,7 @@ else

time sudo LOGTEE_TIMEOUT_MS=590000 make \
KVERSION=$(rpm -qa kernel --qf '%{VERSION}-%{RELEASE}.%{ARCH}\n' | sort -rn | head -1) \
DRACUT_NO_XATTR=1 \
TEST_RUN_ID=$RUN_ID \
${TESTS:+TESTS="$TESTS"} \
-k V=2 \

12
test/TEST-20-NFS/test.sh

@ -30,8 +30,16 @@ run_server() { @@ -30,8 +30,16 @@ run_server() {
# Cleanup the terminal if we have one
tty -s && stty sane

echo Sleeping 10 seconds to give the server a head start
sleep 10
if ! [[ $SERIAL ]]; then
echo "Waiting for the server to startup"
while : ; do
grep Serving "$TESTDIR"/server.log && break
sleep 1
done
else
echo Sleeping 10 seconds to give the server a head start
sleep 10
fi
}

client_test() {

12
test/TEST-30-ISCSI/test.sh

@ -34,8 +34,16 @@ run_server() { @@ -34,8 +34,16 @@ run_server() {
# Cleanup the terminal if we have one
tty -s && stty sane

echo Sleeping 20 seconds to give the server a head start
sleep 20
if ! [[ $SERIAL ]]; then
echo "Waiting for the server to startup"
while : ; do
grep Serving "$TESTDIR"/server.log && break
sleep 1
done
else
echo Sleeping 10 seconds to give the server a head start
sleep 10
fi
}

run_client() {

12
test/TEST-31-ISCSI-MULTI/test.sh

@ -34,8 +34,16 @@ run_server() { @@ -34,8 +34,16 @@ run_server() {
# Cleanup the terminal if we have one
tty -s && stty sane

echo Sleeping 20 seconds to give the server a head start
sleep 20
if ! [[ $SERIAL ]]; then
echo "Waiting for the server to startup"
while : ; do
grep Serving "$TESTDIR"/server.log && break
sleep 1
done
else
echo Sleeping 10 seconds to give the server a head start
sleep 10
fi
}

run_client() {

12
test/TEST-40-NBD/test.sh

@ -35,8 +35,16 @@ run_server() { @@ -35,8 +35,16 @@ run_server() {
# Cleanup the terminal if we have one
tty -s && stty sane

echo Sleeping 10 seconds to give the server a head start
sleep 10
if ! [[ $SERIAL ]]; then
echo "Waiting for the server to startup"
while : ; do
grep Serving "$TESTDIR"/server.log && break
sleep 1
done
else
echo Sleeping 10 seconds to give the server a head start
sleep 10
fi
}

client_test() {

12
test/TEST-50-MULTINIC/test.sh

@ -32,8 +32,16 @@ run_server() { @@ -32,8 +32,16 @@ run_server() {
# Cleanup the terminal if we have one
tty -s && stty sane

echo Sleeping 10 seconds to give the server a head start
sleep 10
if ! [[ $SERIAL ]]; then
echo "Waiting for the server to startup"
while : ; do
grep Serving "$TESTDIR"/server.log && break
sleep 1
done
else
echo Sleeping 10 seconds to give the server a head start
sleep 10
fi
}

client_test() {

2
test/TEST-60-IFCFG/server-init.sh

@ -116,7 +116,7 @@ dhcpd -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases ens3 ens5 @@ -116,7 +116,7 @@ dhcpd -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases ens3 ens5
#sh -i
#tcpdump -i ens3
# Wait forever for the VM to die
echo "Serving NFS mounts"
echo "Serving"
while :; do
sleep 10
>/dev/watchdog

14
test/TEST-60-IFCFG/test.sh

@ -39,8 +39,16 @@ run_server() { @@ -39,8 +39,16 @@ run_server() {
# Cleanup the terminal if we have one
tty -s && stty sane

echo Sleeping 10 seconds to give the server a head start
sleep 10
if ! [[ $SERIAL ]]; then
echo "Waiting for the server to startup"
while : ; do
grep Serving "$TESTDIR"/server.log && break
sleep 1
done
else
echo Sleeping 10 seconds to give the server a head start
sleep 10
fi
}

client_test() {
@ -99,7 +107,7 @@ client_test() { @@ -99,7 +107,7 @@ client_test() {
-initrd "$TESTDIR"/initramfs.testing
fi

{
{
read OK
if [[ "$OK" != "OK" ]]; then
echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]"

14
test/TEST-70-BONDBRIDGETEAMVLAN/test.sh

@ -39,8 +39,16 @@ run_server() { @@ -39,8 +39,16 @@ run_server() {
# Cleanup the terminal if we have one
tty -s && stty sane

echo Sleeping 10 seconds to give the server a head start
sleep 10
if ! [[ $SERIAL ]]; then
echo "Waiting for the server to startup"
while : ; do
grep Serving "$TESTDIR"/server.log && break
sleep 1
done
else
echo Sleeping 10 seconds to give the server a head start
sleep 10
fi
}

client_test() {
@ -99,7 +107,7 @@ client_test() { @@ -99,7 +107,7 @@ client_test() {
-initrd "$TESTDIR"/initramfs.testing
fi

{
{
read OK
if [[ "$OK" != "OK" ]]; then
echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]"

Loading…
Cancel
Save