summaryrefslogtreecommitdiff
path: root/tests/Coreutils.pm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Coreutils.pm')
-rw-r--r--tests/Coreutils.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/Coreutils.pm b/tests/Coreutils.pm
index bd2088f65..632960ae0 100644
--- a/tests/Coreutils.pm
+++ b/tests/Coreutils.pm
@@ -224,6 +224,7 @@ sub run_tests ($$$$$)
# To indicate that $prog is a shell built-in, you'd make it a string 'ref'.
# E.g., call run_tests ($prog, \$prog, \@Tests, $save_temps, $verbose);
# If it's a ref, invoke it via "env":
+ my $built_prog = ref $prog ? $$prog : $prog;
my @prog = ref $prog ? (qw(env --), $$prog) : $prog;
# Warn about empty t_spec.
@@ -271,6 +272,9 @@ sub run_tests ($$$$$)
}
return 1 if $bad_test_name;
+ $ENV{built_programs} =~ /\b$built_prog\b/ ||
+ CuSkip::skip "required program(s) not built [$built_prog]\n";
+
# FIXME check exit status
system (@prog, '--version') if $verbose;