]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Add github workflow
authorHarald Hoyer <harald@redhat.com>
Tue, 25 Feb 2020 13:08:10 +0000 (14:08 +0100)
committerHarald Hoyer <harald@redhat.com>
Thu, 27 Feb 2020 14:27:30 +0000 (15:27 +0100)
14 files changed:
.github/workflows/fedora-30.yml [new file with mode: 0644]
.github/workflows/fedora-31.yml [new file with mode: 0644]
.travis.yml
README.md
fedora-test-github.sh [new file with mode: 0755]
fedora-test.sh
test/TEST-20-NFS/test.sh
test/TEST-30-ISCSI/test.sh
test/TEST-31-ISCSI-MULTI/test.sh
test/TEST-40-NBD/test.sh
test/TEST-50-MULTINIC/test.sh
test/TEST-60-IFCFG/server-init.sh
test/TEST-60-IFCFG/test.sh
test/TEST-70-BONDBRIDGETEAMVLAN/test.sh

diff --git a/.github/workflows/fedora-30.yml b/.github/workflows/fedora-30.yml
new file mode 100644 (file)
index 0000000..e8c5321
--- /dev/null
@@ -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 }}
diff --git a/.github/workflows/fedora-31.yml b/.github/workflows/fedora-31.yml
new file mode 100644 (file)
index 0000000..d1260f8
--- /dev/null
@@ -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 }}
index 40c8d1f6bf86fb7a7f1df7ebda43a8b17c4ef113..1c46062cdb5c48397413bb7b19585386c3585732 100644 (file)
@@ -12,8 +12,8 @@ env:
   - IMAGE=latest TESTS=50
   - IMAGE=latest TESTS=30
   - IMAGE=latest TESTS=31
   - IMAGE=latest TESTS=50
   - IMAGE=latest TESTS=30
   - IMAGE=latest TESTS=31
+  - IMAGE=latest TESTS=40
   - IMAGE=latest TESTS=60
   - IMAGE=latest TESTS=60
-  - IMAGE=latest TESTS=70
   - IMAGE=latest TESTS=99
   - IMAGE=latest TESTS=02
   - IMAGE=latest TESTS=03
   - IMAGE=latest TESTS=99
   - IMAGE=latest TESTS=02
   - IMAGE=latest TESTS=03
@@ -37,7 +37,7 @@ before_script:
     git describe --tags || :
 
 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:
 
 notifications:
   webhooks:
index 418daa1d814cfae787e107d6c0040f385cc0df76..c0ee79e2a23fdacdc8451d7f9cb7ac3eb188a2a3 100644 (file)
--- a/README.md
+++ b/README.md
@@ -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)
 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
 
 dracut (the tool) is used to create an initramfs image by copying tools
 and files from an installed system and combining it with the
diff --git a/fedora-test-github.sh b/fedora-test-github.sh
new file mode 100755 (executable)
index 0000000..01312e2
--- /dev/null
@@ -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
index 62725a32559f768264d7985eeadc7fc8e9d1087d..096ed6c4b49da850601bb5bb88441191d9cedbba 100755 (executable)
@@ -7,41 +7,6 @@ set -ex
 RUN_ID="$1"
 TESTS=$2
 
 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)
 ./configure
 
 NCPU=$(getconf _NPROCESSORS_ONLN)
@@ -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) \
 
     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 \
          TEST_RUN_ID=$RUN_ID \
          ${TESTS:+TESTS="$TESTS"} \
          -k V=2 \
index 97ee5e7b1b7b3bc96356dc6aa6e0d2bce3083fa3..6334e2290acc0206299be6c7a8fda92c8ede1027 100755 (executable)
@@ -30,8 +30,16 @@ run_server() {
     # Cleanup the terminal if we have one
     tty -s && stty sane
 
     # 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() {
 }
 
 client_test() {
index e909d3730a7cfe60af40a69409a00f91bc31a04f..6e3613a658288733567fba72fbeb3c1ddbefdb2f 100755 (executable)
@@ -34,8 +34,16 @@ run_server() {
     # Cleanup the terminal if we have one
     tty -s && stty sane
 
     # 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() {
 }
 
 run_client() {
index c9df0fb39a2deeebd7f16574027639b75a547f42..946a198a36fba1161cea8c7db8ce6a4af8253c81 100755 (executable)
@@ -34,8 +34,16 @@ run_server() {
     # Cleanup the terminal if we have one
     tty -s && stty sane
 
     # 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() {
 }
 
 run_client() {
index b53992bcc2465b6284641f5e8ab19cbf1e48aee3..5e0793c921a7e5479d4bbebf15f6a3a6654d5c9a 100755 (executable)
@@ -35,8 +35,16 @@ run_server() {
     # Cleanup the terminal if we have one
     tty -s && stty sane
 
     # 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() {
 }
 
 client_test() {
index 22739071c800fb17b3c7767a903042264af36762..dfddfbd7df91e5b8eeace14b7055748b995f6d7d 100755 (executable)
@@ -32,8 +32,16 @@ run_server() {
     # Cleanup the terminal if we have one
     tty -s && stty sane
 
     # 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() {
 }
 
 client_test() {
index 7aae0f13927669c9497becece3e86fa6a0f13030..cff29a3bf2f6d930ad858addde8a8cec02fecef2 100755 (executable)
@@ -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
 #sh -i
 #tcpdump -i ens3
 # Wait forever for the VM to die
-echo "Serving NFS mounts"
+echo "Serving"
 while :; do
        sleep 10
        >/dev/watchdog
 while :; do
        sleep 10
        >/dev/watchdog
index a766443bdeea6f04604b765adc6cacc74d1fc79e..59dc9475fab1ea5b755282ec669786cb5b6a37a8 100755 (executable)
@@ -39,8 +39,16 @@ run_server() {
     # Cleanup the terminal if we have one
     tty -s && stty sane
 
     # 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() {
 }
 
 client_test() {
@@ -99,7 +107,7 @@ client_test() {
             -initrd "$TESTDIR"/initramfs.testing
     fi
 
             -initrd "$TESTDIR"/initramfs.testing
     fi
 
-    { 
+    {
         read OK
         if [[ "$OK" != "OK" ]]; then
             echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]"
         read OK
         if [[ "$OK" != "OK" ]]; then
             echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]"
index 5cb88782268f962cb7b8e4498f69a02a1e273808..f121d5b57c8ce2a5c9d25f11f839339b1bae471a 100755 (executable)
@@ -39,8 +39,16 @@ run_server() {
     # Cleanup the terminal if we have one
     tty -s && stty sane
 
     # 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() {
 }
 
 client_test() {
@@ -99,7 +107,7 @@ client_test() {
             -initrd "$TESTDIR"/initramfs.testing
     fi
 
             -initrd "$TESTDIR"/initramfs.testing
     fi
 
-    { 
+    {
         read OK
         if [[ "$OK" != "OK" ]]; then
             echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]"
         read OK
         if [[ "$OK" != "OK" ]]; then
             echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]"