[PATCH 1/3] schematestutils: split out file-by-file schema checking

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

 



Checking the XML files one-by-one is expensive,
split it out to make it easier to skip.
---
 tests/schematestutils.sh | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/tests/schematestutils.sh b/tests/schematestutils.sh
index e07e9b9..7ffc800 100644
--- a/tests/schematestutils.sh
+++ b/tests/schematestutils.sh
@@ -9,10 +9,21 @@ SCHEMA="$abs_top_srcdir/docs/schemas/$2"
 
 test_intro $this_test
 
-n=0
-f=0
+check_schema_by_one
+test_final $n $f
+
+ret=0
+test $f != 0 && ret=255
+exit $ret
+
+}
+
+check_schema_by_one () {
+
 for dir in $DIRS
 do
+  n=0
+  f=0
   XML=`find $abs_srcdir/$dir -name '*.xml'` || exit 1
 
   for xml in `echo "$XML" | sort`
@@ -37,11 +48,4 @@ do
     fi
   done
 done
-
-test_final $n $f
-
-ret=0
-test $f != 0 && ret=255
-exit $ret
-
 }
-- 
2.7.3

--
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]