diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2013-02-21 14:06:18 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2013-02-21 14:06:18 +0000 |
commit | cd50ad396208af9bb5fe65945c0771673645ecca (patch) | |
tree | a1983fc6e0c40be2359d781256bb411487e564f7 | |
parent | 4848271d38b2ab139bbd44bb1a18d0fe80d3a4f9 (diff) | |
download | morph-cd50ad396208af9bb5fe65945c0771673645ecca.tar.gz |
Fix ./check on Squeeze
-rwxr-xr-x | check | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -30,6 +30,16 @@ cmdtest tests cmdtest tests.branching cmdtest tests.merging cmdtest tests.deploy + +# Building systems requires the 'filter' parameter of tarfile.TarFile.add(): +# this was introduced in Python 2.7 +if python --version 2>&1 | grep '^Python 2\.[78]' > /dev/null; then + cmdtest tests.build +else + echo "NOT RUNNING tests.build (requires Python 2.7)" +fi + +# The as-root tests use YAML morphologies, so they require the PyYAML module. if [ $(whoami) = root ] && command -v mkfs.btrfs > /dev/null && python -c " import morphlib, sys @@ -37,10 +47,9 @@ if not morphlib.got_yaml: sys.exit(1) " > /dev/null 2>&1 then - cmdtest tests.build cmdtest tests.as-root else - echo "NOT RUNNING tests.as-root" + echo "NOT RUNNING tests.as-root (requires PyYAML)" fi if [ -d .git ]; |