diff options
author | Neil Williams <codehelp@debian.org> | 2016-01-17 14:29:55 +0000 |
---|---|---|
committer | Neil Williams <codehelp@debian.org> | 2016-01-17 14:29:55 +0000 |
commit | 0c8cc8919c4bc7a6cea05315a364e09e7d448ce2 (patch) | |
tree | 224e7f0970fb68ddf54ed6e299688bfc5708f27d | |
parent | 81d03ab87cfabb5b9d8c7ae1a19bb7f3ff2338ac (diff) | |
download | vmdebootstrap-0c8cc8919c4bc7a6cea05315a364e09e7d448ce2.tar.gz |
Add checks for cmdtest and bc as the errors are otherwise confusing.
-rw-r--r-- | yarns/900-implements.yarn | 3 | ||||
-rw-r--r-- | yarns/shell.lib | 16 |
2 files changed, 19 insertions, 0 deletions
diff --git a/yarns/900-implements.yarn b/yarns/900-implements.yarn index bf49b35..657101e 100644 --- a/yarns/900-implements.yarn +++ b/yarns/900-implements.yarn @@ -19,11 +19,14 @@ Scenarios can use the ASSUMING statements defined here to let the user to allow them to run or not to run. IMPLEMENTS ASSUMING (fast|build) tests are requested + support_required test_requested "$MATCH_1" if `MIRROR` is set, use the default http mirror IMPLEMENTS ASSUMING (local|http) tests are requested + support_required + build_support_required mirror_requested "$MATCH_1" ## Building an image, or attempting to diff --git a/yarns/shell.lib b/yarns/shell.lib index 08835ab..69b7b06 100644 --- a/yarns/shell.lib +++ b/yarns/shell.lib @@ -34,6 +34,22 @@ test_requested() fi } +support_required() +{ + if [ ! -x /usr/bin/cmdtest ]; then + echo "All tests need the cmdtest package." + return 1 + fi +} + + +build_support_required() +{ + if [ ! -x /usr/bin/bc ]; then + echo "Build tests need the bc package." + return 1 + fi +} # Convert a size with a unit, such a kB, to plain bytes. |