[ostree] tests: skip tests using gjs/parallel if they are not installed



commit 75cdbb8e82589ed99b00e1acf0f54e58797dd9e6
Author: Giuseppe Scrivano <gscrivan redhat com>
Date:   Wed Aug 5 16:51:30 2015 +0200

    tests: skip tests using gjs/parallel if they are not installed
    
    Signed-off-by: Giuseppe Scrivano <gscrivan redhat com>
    
    Closes #131

 tests/test-admin-locking.sh   |    3 +++
 tests/test-pull-corruption.sh |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/tests/test-admin-locking.sh b/tests/test-admin-locking.sh
index b82fd5c..6b43220 100644
--- a/tests/test-admin-locking.sh
+++ b/tests/test-admin-locking.sh
@@ -40,6 +40,9 @@ echo "rev=${rev}"
 ${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos 
testos:testos/buildmaster/x86_64-runtime
 assert_has_dir sysroot/boot/ostree/testos-${bootcsum}
 
+# If parallel is not installed, skip the test
+parallel --help >/dev/null 2>&1 || exit 77
+
 parallel_cmd=parallel
 if parallel --help | grep -q -e --no-notice; then
     parallel_cmd="${parallel_cmd} --no-notice"
diff --git a/tests/test-pull-corruption.sh b/tests/test-pull-corruption.sh
index 7e4055c..e81e422 100755
--- a/tests/test-pull-corruption.sh
+++ b/tests/test-pull-corruption.sh
@@ -47,6 +47,9 @@ do_corrupt_pull_test() {
     fi
 }
 
+# If gjs is not installed, skip the test
+gjs --help >/dev/null 2>&1 || exit 77
+
 # FIXME - ignore errors here since gjs in RHEL7 has the final
 # unrooting bug
 gjs $(dirname $0)/corrupt-repo-ref.js ${repopath} main || true


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]