2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

tests: test compiling with python3 if given as shebang interpreter

Currently plugins fail to compile if they use Python 3 syntax features,
even though they use a correct shebang.
This commit is contained in:
Lars Kruse 2015-10-30 06:09:12 +01:00
parent 67b0241e90
commit d1a8965b5a

View File

@ -94,6 +94,14 @@ sub process_file {
}
);
}
elsif ( $interpreter =~ m{python3} ) {
run_check(
{ command => [ 'python3', '-m', 'py_compile', $file ],
description => 'python3 compile',
filename => $filename
}
);
}
elsif ( $interpreter =~ m{python} ) {
run_check(
{ command => [ 'python', '-m', 'py_compile', $file ],