[PATCH 3/3] test-lib.sh: Update helper for VIR_TEST_EXPENSIVE and use it in virsh-all

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

 



When the test-lib for shell tests was introduced it did think of
expensive tests although this option was never used. Update the code for
the new env variable name.

Use this function in the virsh-all test that  blindly runs all virsh
commands without any arguments and thus it's rather time consuming than
useful. Mark it as expensive to skip this test in normal cases.
---
 tests/test-lib.sh | 10 +++++-----
 tests/virsh-all   |  2 ++
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/tests/test-lib.sh b/tests/test-lib.sh
index 918bf73..6c5049a 100644
--- a/tests/test-lib.sh
+++ b/tests/test-lib.sh
@@ -158,15 +158,15 @@ require_selinux_()
   esac
 }

-very_expensive_()
+test_expensive()
 {
-  if test "$RUN_VERY_EXPENSIVE_TESTS" != yes; then
+  if test -z "$VIR_TEST_EXPENSIVE"; then
     skip_test_ '
 This test is very expensive, so it is disabled by default.
-To run it anyway, rerun make check with the RUN_VERY_EXPENSIVE_TESTS
-environment variable set to yes.  E.g.,
+To run it anyway, rerun make check with the VIR_TEST_EXPENSIVE
+environment variable se.  E.g.,

-  env RUN_VERY_EXPENSIVE_TESTS=yes make check
+  env RUN_VERY_EXPENSIVE_TESTS=1 make check
 '
   fi
 }
diff --git a/tests/virsh-all b/tests/virsh-all
index d4e2633..4e456c6 100755
--- a/tests/virsh-all
+++ b/tests/virsh-all
@@ -21,6 +21,8 @@ test -z "$srcdir" && srcdir=$(pwd)

 . "$srcdir/test-lib.sh"

+test_expensive
+
 fail=0

 test_url=test:///default
-- 
1.8.3.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]