]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
ci: seperate local and network tests
authorLaszlo Gombos <laszlo.gombos@gmail.com>
Wed, 30 Nov 2022 00:54:14 +0000 (00:54 +0000)
committerAntonio Álvarez Feijoo <antonio.feijoo@suse.com>
Wed, 7 Dec 2022 16:14:42 +0000 (17:14 +0100)
Configure network module outside of test.sh scripts
to allow for parallelizm and flexibility.

Remove NM test directory wrappers and set network
in Github action instead.

This is in preparation to test other dracut network modules
such as systemd-networkd dracut module.

13 files changed:
.github/workflows/integration.yml
test/TEST-20-NFS/test.sh
test/TEST-21-NFS-NM/Makefile [deleted file]
test/TEST-30-ISCSI/test.sh
test/TEST-31-ISCSI-NM/Makefile [deleted file]
test/TEST-35-ISCSI-MULTI/test.sh
test/TEST-36-ISCSI-MULTI-NM/Makefile [deleted file]
test/TEST-40-NBD/test.sh
test/TEST-41-NBD-NM/Makefile [deleted file]
test/TEST-50-MULTINIC/test.sh
test/TEST-51-MULTINIC-NM/Makefile [deleted file]
test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh
test/TEST-61-BONDBRIDGEVLANIFCFG-NM/Makefile [deleted file]

index 159f6636c0be609fcd5cdca7bc11801cdb9b9dc9..e617ec2c92031144c4e45a7bed675d651d196a89 100644 (file)
@@ -60,18 +60,45 @@ jobs:
                         "15",
                         "16",
                         "17",
+                        "62",
+                        "98",
+                ]
+            fail-fast: false
+        container:
+            image: ghcr.io/dracutdevs/${{ matrix.container }}
+            options: "--privileged -v /dev:/dev"
+        steps:
+            -   name: "Checkout Repository"
+                uses: actions/checkout@v3
+                with:
+                    fetch-depth: 0
+
+            -   name: "${{ matrix.container }} TEST-${{ matrix.test }}"
+                run: ./tools/test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}
+    network:
+        runs-on: ubuntu-latest
+        timeout-minutes: 45
+        concurrency:
+            group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }}-${{ matrix.network }}
+            cancel-in-progress: true
+        strategy:
+            matrix:
+                container: [
+                        "fedora:latest",
+                ]
+                network: [
+                        "network-manager",
+                        "network-legacy",
+                        #"systemd-networkd",
+                        #"network-wicked",
+                        #"connman",
+                ]
+                test: [
                         "20",
-                        "21",
                         "30",
-                        "31",
                         "35",
-                        "36",
                         "40",
-                        "41",
                         "50",
-                        "51",
-                        "62",
-                        "98",
                 ]
             fail-fast: false
         container:
@@ -84,7 +111,7 @@ jobs:
                     fetch-depth: 0
 
             -   name: "${{ matrix.container }} TEST-${{ matrix.test }}"
-                run: ./tools/test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}
+                run: USE_NETWORK=${{ matrix.network }} ./tools/test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}
     openrc-musl:
         runs-on: ubuntu-latest
         timeout-minutes: 45
index 5d3ab147b1c52d1b5e7fab904cf69591b70a303a..1ecf7f63008572b18fb636132b4a8b30cda8cbd7 100755 (executable)
@@ -1,10 +1,6 @@
 #!/bin/bash
 
-if [[ $NM ]]; then
-    USE_NETWORK="network-manager"
-else
-    USE_NETWORK="network-legacy"
-fi
+[ -z "$USE_NETWORK" ] && USE_NETWORK="network-legacy"
 
 # shellcheck disable=SC2034
 TEST_DESCRIPTION="root filesystem on NFS with $USE_NETWORK"
diff --git a/test/TEST-21-NFS-NM/Makefile b/test/TEST-21-NFS-NM/Makefile
deleted file mode 100644 (file)
index b19122a..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-.PHONY: all setup clean run
-
-BASETEST=../TEST-20-NFS
-
-all:
-       @$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) all
-setup:
-       @$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) setup
-clean:
-       @$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) clean
-run:
-       @$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) run
index 99e57a323b8f2e92efd626003ef060e91fdb4a47..3c0e84c153ee8e17e85ddfe25eafbed1a212ecb6 100755 (executable)
@@ -1,10 +1,6 @@
 #!/bin/bash
 
-if [[ $NM ]]; then
-    USE_NETWORK="network-manager"
-else
-    USE_NETWORK="network-legacy"
-fi
+[ -z "$USE_NETWORK" ] && USE_NETWORK="network-legacy"
 
 # shellcheck disable=SC2034
 TEST_DESCRIPTION="root filesystem over iSCSI with $USE_NETWORK"
diff --git a/test/TEST-31-ISCSI-NM/Makefile b/test/TEST-31-ISCSI-NM/Makefile
deleted file mode 100644 (file)
index 8488444..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-.PHONY: all setup clean run
-
-BASETEST=../TEST-30-ISCSI
-
-all:
-       @$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) all
-setup:
-       @$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) setup
-clean:
-       @$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) clean
-run:
-       @$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) run
index f11b24acf70df35888c296b0f9884be9cc6697e9..b0d971f02386b444d25ac1e60ea1b2346275d963 100755 (executable)
@@ -1,10 +1,6 @@
 #!/bin/bash
 
-if [[ $NM ]]; then
-    USE_NETWORK="network-manager"
-else
-    USE_NETWORK="network-legacy"
-fi
+[ -z "$USE_NETWORK" ] && USE_NETWORK="network-legacy"
 
 # shellcheck disable=SC2034
 TEST_DESCRIPTION="root filesystem over multiple iSCSI with $USE_NETWORK"
diff --git a/test/TEST-36-ISCSI-MULTI-NM/Makefile b/test/TEST-36-ISCSI-MULTI-NM/Makefile
deleted file mode 100644 (file)
index 8b8a77a..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-.PHONY: all setup clean run
-
-BASETEST=../TEST-35-ISCSI-MULTI
-
-all:
-       @$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) all
-setup:
-       @$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) setup
-clean:
-       @$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) clean
-run:
-       @$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) run
index 54ba5982cd02b9137a495fc52ff1e99a2c669d5d..9b90a82e1dfc6b4f14b3cdf4f8dbe23189b783aa 100755 (executable)
@@ -1,10 +1,6 @@
 #!/bin/bash
 
-if [[ $NM ]]; then
-    USE_NETWORK="network-manager"
-else
-    USE_NETWORK="network-legacy"
-fi
+[ -z "$USE_NETWORK" ] && USE_NETWORK="network-legacy"
 
 # shellcheck disable=SC2034
 TEST_DESCRIPTION="root filesystem on NBD with $USE_NETWORK"
diff --git a/test/TEST-41-NBD-NM/Makefile b/test/TEST-41-NBD-NM/Makefile
deleted file mode 100644 (file)
index 47c90c3..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-.PHONY: all setup clean run
-
-BASETEST=../TEST-40-NBD
-
-all:
-       @$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) all
-setup:
-       @$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) setup
-clean:
-       @$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) clean
-run:
-       @$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) run
index 5a47b096c1126bf8a799b7b343732256ce70a222..3dc8a812ab32eeab62f2cb7e2ecae73d90c95142 100755 (executable)
@@ -1,10 +1,6 @@
 #!/bin/bash
 
-if [[ $NM ]]; then
-    USE_NETWORK="network-manager"
-else
-    USE_NETWORK="network-legacy"
-fi
+[ -z "$USE_NETWORK" ] && USE_NETWORK="network-legacy"
 
 # shellcheck disable=SC2034
 TEST_DESCRIPTION="root filesystem on NFS with multiple nics with $USE_NETWORK"
diff --git a/test/TEST-51-MULTINIC-NM/Makefile b/test/TEST-51-MULTINIC-NM/Makefile
deleted file mode 100644 (file)
index 6c093fd..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-.PHONY: all setup clean run
-
-BASETEST=../TEST-50-MULTINIC
-
-all:
-       @$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) all
-setup:
-       @$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) setup
-clean:
-       @$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) clean
-run:
-       @$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) run
index dc8dd62db3f4b88500f637f2b8a53ff69d8afb38..d61604e569b2d4bec8d86c3956b0aa76db85b825 100755 (executable)
@@ -2,11 +2,7 @@
 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
 # ex: ts=8 sw=4 sts=4 et filetype=sh
 
-if [[ $NM ]]; then
-    USE_NETWORK="network-manager"
-else
-    USE_NETWORK="network-legacy"
-fi
+[ -z "$USE_NETWORK" ] && USE_NETWORK="network-legacy"
 
 # shellcheck disable=SC2034
 TEST_DESCRIPTION="root filesystem on NFS with bridging/bonding/vlan with $USE_NETWORK"
diff --git a/test/TEST-61-BONDBRIDGEVLANIFCFG-NM/Makefile b/test/TEST-61-BONDBRIDGEVLANIFCFG-NM/Makefile
deleted file mode 100644 (file)
index f94ba3c..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-.PHONY: all setup clean run
-
-BASETEST=../TEST-60-BONDBRIDGEVLANIFCFG
-
-all:
-       @$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) all
-setup:
-       @$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) setup
-clean:
-       @$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) clean
-run:
-       @$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) run