summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2013-02-21 14:06:18 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2013-02-21 14:06:18 +0000
commitcd50ad396208af9bb5fe65945c0771673645ecca (patch)
treea1983fc6e0c40be2359d781256bb411487e564f7
parent4848271d38b2ab139bbd44bb1a18d0fe80d3a4f9 (diff)
downloadmorph-cd50ad396208af9bb5fe65945c0771673645ecca.tar.gz
Fix ./check on Squeeze
-rwxr-xr-xcheck13
1 files changed, 11 insertions, 2 deletions
diff --git a/check b/check
index 76b50208..e70de72a 100755
--- a/check
+++ b/check
@@ -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 ];