build-sys: Make pwait test dependent on pwait built
authorCraig Small <csmall@dropbear.xyz>
Tue, 22 Dec 2020 04:20:30 +0000 (15:20 +1100)
committerCraig Small <csmall@dropbear.xyz>
Tue, 22 Dec 2020 04:21:39 +0000 (15:21 +1100)
As pwait building is conditional, testsuite should
only run pwait tests if there is a pwait binary.

testsuite/pwait.test/pwait.exp

index 867f0ff57a99e40f6c3970ba391f97066aa39b76..0b59a9533ddca7abd22282cad31fd589ac53bbe3 100644 (file)
@@ -9,6 +9,11 @@ set not_uid [ expr { $uid + 1 } ]
 set gid [ exec id -g ]
 set not_gid [ expr { $gid + 1 } ]
 
+if { ![ file exists $pwait ] } {
+    untested { skipping (not build)}
+    return
+}
+
 set test "pwait with no arguments"
 spawn $pwait
 expect_pass "$test" "^\(lt-\)\?pwait: no matching criteria specified\\s*"