]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
test: move test condition to test_check
authorHenrik Gombos <henrik99999@gmail.com>
Wed, 17 May 2023 00:46:19 +0000 (00:46 +0000)
committerAntonio Álvarez Feijoo <antonio.feijoo@suse.com>
Thu, 18 May 2023 08:57:23 +0000 (10:57 +0200)
This enables skipping the test instead of failing it.

test/TEST-30-ISCSI/test.sh
test/TEST-35-ISCSI-MULTI/test.sh

index b540fe0395b6beb955e89e70cf8e6fb2ed2977d4..a6aa17330377e455d0282f3b35334c5b5c0f919a 100755 (executable)
@@ -125,12 +125,14 @@ test_run() {
     return $ret
 }
 
-test_setup() {
+test_check() {
     if ! command -v tgtd &> /dev/null || ! command -v tgtadm &> /dev/null; then
         echo "Need tgtd and tgtadm from scsi-target-utils"
         return 1
     fi
+}
 
+test_setup() {
     kernel=$KVERSION
     # Create what will eventually be our root filesystem onto an overlay
     rm -rf -- "$TESTDIR"/overlay
index 8979f59a9749afc01b574e00b4503ecc165429dc..19ee07557ad9ef5be5b150b09c8a573702090e88 100755 (executable)
@@ -137,12 +137,14 @@ test_run() {
     return $ret
 }
 
-test_setup() {
+test_check() {
     if ! command -v tgtd &> /dev/null || ! command -v tgtadm &> /dev/null; then
         echo "Need tgtd and tgtadm from scsi-target-utils"
         return 1
     fi
+}
 
+test_setup() {
     kernel=$KVERSION
     # Create what will eventually be our root filesystem onto an overlay
     rm -rf -- "$TESTDIR"/overlay