mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
tests: verify executable flag for plugins with shebang
This commit is contained in:
parent
29e6f53cad
commit
ebe5be1d06
9
t/test.t
9
t/test.t
@ -48,7 +48,14 @@ sub process_file {
|
||||
my ( $file, $filename, $interpreter, $arguments ) = @_;
|
||||
use v5.10.1;
|
||||
|
||||
if ( $interpreter =~ m{/bin/sh} ) {
|
||||
if ( ! -x $file ) {
|
||||
# missing executable flag
|
||||
diag(
|
||||
sprintf("\nFile '%s' lacks executable permission bits. Maybe try 'chmod +x $file'?\n",
|
||||
$file)
|
||||
);
|
||||
}
|
||||
elsif ( $interpreter =~ m{/bin/sh} ) {
|
||||
subtest $filename => sub {
|
||||
plan tests => 2;
|
||||
run_check(
|
||||
|
Loading…
Reference in New Issue
Block a user