]> git-server-git.apps.pok.os.sepia.ceph.com Git - jerasure.git/commitdiff
tests: fail if gf_methods is not found
authorLoic Dachary <ldachary@redhat.com>
Mon, 15 Dec 2014 11:29:51 +0000 (12:29 +0100)
committerLoic Dachary <ldachary@redhat.com>
Mon, 15 Dec 2014 17:17:15 +0000 (18:17 +0100)
If the gf_methods was not found, the test would silently succeed doing
nothing. Check for existence and fail if it is not in the path.

Signed-off-by: Loic Dachary <loic@dachary.org>
Examples/test_all_gfs.sh

index a03ee9c409303e7c30e5beec40f6d662edde1252..b78dd6b434be8ac38b3fae23b85c3dd57aa49268 100755 (executable)
@@ -1,4 +1,4 @@
-#
+#!/bin/bash
 #
 # Copyright (c) 2013, James S. Plank and Kevin Greenan
 # All rights reserved.
@@ -42,6 +42,11 @@ k=12
 m=3
 seed=1370
 
+if ! test -x ${GF_METHODS} ; then
+    ${GF_METHODS}
+    exit 1
+fi
+
 # Test all w=8
 ${GF_METHODS} 8 -B -L | awk -F: '{ if ($1 == "w=8") print $2; }' |
 while read method; do