diff options
author | Gervase Markham <gerv@mozilla.org> | 2015-05-12 16:57:56 +0200 |
---|---|---|
committer | Gervase Markham <gerv@gerv.net> | 2015-05-12 16:57:56 +0200 |
commit | 53af86d19c6e75e68e1822cd66b864e509f391d6 (patch) | |
tree | 189a98255511c08ddd6f8a2c9dc7046fd2b64095 | |
parent | 0215f11d5c734cb818ed7b988b8f73e745e45179 (diff) | |
download | bugzilla-53af86d19c6e75e68e1822cd66b864e509f391d6.tar.gz bugzilla-53af86d19c6e75e68e1822cd66b864e509f391d6.tar.xz |
Bug 1116118: 003safesys.t shouldn't compile all files by default. r=glob
-rw-r--r-- | t/003safesys.t | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/t/003safesys.t b/t/003safesys.t index b4f41f61c..a69500b7a 100644 --- a/t/003safesys.t +++ b/t/003safesys.t @@ -29,6 +29,7 @@ use strict; use lib 't'; use Support::Files; +use File::Slurp; use Test::More tests => scalar(@Support::Files::testitems); @@ -46,12 +47,19 @@ my $fh; } } -my @testitems = @Support::Files::testitems; +my @testitems = @Support::Files::testitems; my $perlapp = "\"$^X\""; foreach my $file (@testitems) { $file =~ s/\s.*$//; # nuke everything after the first space (#comment) next if (!$file); # skip null entries + + my $contents = read_file($file); + if ($contents !~ /\b(system|exec)\b/) { + ok(1,"$file does not contain any system or exec calls"); + next; + } + my $command = "$perlapp -c -It -MSupport::Systemexec $file 2>&1"; my $loginfo=`$command`; if ($loginfo =~ /arguments for Support::Systemexec::(system|exec)/im) { |