common: create _require_test_program to look for programs in src/

Create a helper that looks for a test program in src/ and fails the
test if it doesn't exist.  Refactor the existing testcases to use it.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:
Darrick J. Wong
2016-02-09 00:22:21 -08:00
parent 8522cbe656
commit d43f8034c5
9 changed files with 17 additions and 9 deletions
+1 -2
View File
@@ -40,8 +40,7 @@ _supported_fs xfs
_supported_os IRIX Linux
_require_scratch
[ $here/src/feature ] || _notrun "src/feature not built, skipping this test"
_require_test_program "feature"
[ "$USE_EXTERNAL" = yes ] && _notrun "Cannot xfs_copy with external devices"
[ -n "$XFS_COPY_PROG" ] || _notrun "xfs_copy binary not yet installed"