]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: disable echo earlier
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 27 Jun 2022 21:31:49 +0000 (06:31 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 27 Jun 2022 21:34:18 +0000 (06:34 +0900)
test/units/assert.sh

index 66357ab688bf5c36062ba078ba1558bc78f5d695..2f4d93ab8cd11b7cb896cda8abaaab440728c48f 100644 (file)
@@ -4,10 +4,10 @@
 # utility functions for shell tests
 
 assert_true() {(
-    local rc
-
     set +ex
 
+    local rc
+
     "$@"
     rc=$?
     if [[ $rc -ne 0 ]]; then
@@ -47,10 +47,10 @@ assert_not_in() {(
 )}
 
 assert_rc() {(
-    local rc exp="${1?}"
-
     set +ex
 
+    local rc exp="${1?}"
+
     shift
     "$@"
     rc=$?