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

Merge pull request #669 from sumpfralle/tests-python3

tests: test compiling with python3 if given as shebang interpreter
This commit is contained in:
Stig Sandbeck Mathisen 2015-11-01 09:03:47 +01:00
commit 9b0c3d69c7
2 changed files with 9 additions and 1 deletions

View File

@ -2,7 +2,7 @@
language: perl
install:
- sudo apt-get update
- sudo apt-get --no-install-recommends install devscripts python ruby php5-cli gawk ksh pylint
- sudo apt-get --no-install-recommends install devscripts python python3 ruby php5-cli gawk ksh pylint
- sudo apt-get --no-install-recommends install pkg-config libdb-dev libvirt-dev libexpat-dev
# - Munin/Plugin.pm is in "munin-node" on precise
- sudo apt-get --no-install-recommends install munin-node

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 ],