summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-03-12 14:22:26 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2013-03-13 15:20:02 +0000
commit3e9c32fd0b4175bfcec7ddfe02334de5ceeb0a90 (patch)
tree12c988b111694a27822bab5fadc70a695f73d6ea /check
parentd1b40f5b50941f617937d010da6e5fadcd782630 (diff)
downloadmorph-3e9c32fd0b4175bfcec7ddfe02334de5ceeb0a90.tar.gz
Skip some tests in ./check by default
Running all the checks takes over 20 minutes for me. This makes it likely that ./check doesn't get run very often. Dropping the slowest tests by default makes ./check more usefull. Add the --full option to enable the full test suite again.
Diffstat (limited to 'check')
-rwxr-xr-xcheck41
1 files changed, 38 insertions, 3 deletions
diff --git a/check b/check
index e70de72a..5e16d23e 100755
--- a/check
+++ b/check
@@ -17,18 +17,53 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
set -e
+
+# Parse the command line.
+
+full=false
+while [ "$#" -gt 0 ]
+do
+ case "$1" in
+ --full) full=true; shift ;;
+ *) echo "ERROR: Unknown argument $1." 1>&2; exit 1 ;;
+ esac
+done
+
+
+# Set PYTHONPATH to start with the current directory so that we always
+# find the right version of it for the test suite.
+
case "$PYTHONPATH" in
'') PYTHONPATH="$(pwd)" ;;
*) PYTHONPATH="$(pwd):$PYTHONPATH" ;;
esac
export PYTHONPATH
+
+# Clean up artifacts from previous (possibly failed) runs, build,
+# and run the tests.
+
python setup.py clean check
+
cmdtest tests
-cmdtest tests.branching
-cmdtest tests.merging
+
+if $full
+then
+ cmdtest tests.branching
+else
+ echo "NOT RUNNING test.branching"
+fi
+
+if $full
+then
+ cmdtest tests.merging
+else
+ echo "NOT RUNNING test.merging"
+fi
+
cmdtest tests.deploy
# Building systems requires the 'filter' parameter of tarfile.TarFile.add():
@@ -40,7 +75,7 @@ else
fi
# The as-root tests use YAML morphologies, so they require the PyYAML module.
-if [ $(whoami) = root ] && command -v mkfs.btrfs > /dev/null &&
+if $full && [ $(whoami) = root ] && command -v mkfs.btrfs > /dev/null &&
python -c "
import morphlib, sys
if not morphlib.got_yaml: