From 0c8cc8919c4bc7a6cea05315a364e09e7d448ce2 Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Sun, 17 Jan 2016 14:29:55 +0000 Subject: Add checks for cmdtest and bc as the errors are otherwise confusing. --- yarns/900-implements.yarn | 3 +++ yarns/shell.lib | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) (limited to 'yarns') 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. -- cgit v1.2.1