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

Re: [libvirt] [PATCH 03/10] tests: Break out duplicate schema verification functionality.



2009/10/12 Cole Robinson <crobinso redhat com>:
> All schema tests have identical functionality, so avoid the duplication.
>
> Signed-off-by: Cole Robinson <crobinso redhat com>
> ---
>  tests/Makefile.am           |    1 +
>  tests/capabilityschematest  |   34 ++++------------------------------
>  tests/domainschematest      |   33 ++++-----------------------------
>  tests/interfaceschematest   |   31 +++----------------------------
>  tests/networkschematest     |   30 +++---------------------------
>  tests/nodedevschematest     |   31 +++----------------------------
>  tests/schematestutils.sh    |   39 +++++++++++++++++++++++++++++++++++++++
>  tests/storagepoolschematest |   31 +++----------------------------
>  tests/storagevolschematest  |   30 +++---------------------------
>  9 files changed, 63 insertions(+), 197 deletions(-)
>  create mode 100644 tests/schematestutils.sh

Your patch adds some bashisms. This prevents make check from running
successfully on Debian/Ubuntu, because their default shell is dash and
not bash.

The attached patch removes this bashisms.

Matthias
diff --git a/tests/capabilityschematest b/tests/capabilityschematest
index 651e23e..3a1acc5 100755
--- a/tests/capabilityschematest
+++ b/tests/capabilityschematest
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-source ./schematestutils.sh
+. ./schematestutils.sh
 
 DIRS="capabilityschemadata xencapsdata"
 SCHEMA="capability.rng"
diff --git a/tests/domainschematest b/tests/domainschematest
index bd58a30..28ee69a 100755
--- a/tests/domainschematest
+++ b/tests/domainschematest
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-source ./schematestutils.sh
+. ./schematestutils.sh
 
 DIRS="domainschemadata qemuxml2argvdata sexpr2xmldata xmconfigdata xml2sexprdata"
 SCHEMA="domain.rng"
diff --git a/tests/interfaceschematest b/tests/interfaceschematest
index e7bd4e5..e9ec2a4 100755
--- a/tests/interfaceschematest
+++ b/tests/interfaceschematest
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-source ./schematestutils.sh
+. ./schematestutils.sh
 
 DIRS="interfaceschemadata"
 SCHEMA="interface.rng"
diff --git a/tests/networkschematest b/tests/networkschematest
index 6305576..01b2e6f 100755
--- a/tests/networkschematest
+++ b/tests/networkschematest
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-source ./schematestutils.sh
+. ./schematestutils.sh
 
 DIRS="../src/network networkxml2xmlin networkxml2xmlout"
 SCHEMA="network.rng"
diff --git a/tests/nodedevschematest b/tests/nodedevschematest
index e676660..2f0e2b9 100755
--- a/tests/nodedevschematest
+++ b/tests/nodedevschematest
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-source ./schematestutils.sh
+. ./schematestutils.sh
 
 DIRS="nodedevschemadata"
 SCHEMA="nodedev.rng"
diff --git a/tests/schematestutils.sh b/tests/schematestutils.sh
index 4b5f266..56e6d83 100644
--- a/tests/schematestutils.sh
+++ b/tests/schematestutils.sh
@@ -3,7 +3,7 @@
 test -z "$srcdir" && srcdir=`pwd`
 test -z "$abs_srcdir" && abs_srcdir=`pwd`
 
-function check_schema {
+check_schema () {
 
 DIRS=$1
 SCHEMA="$srcdir/../docs/schemas/$2"
diff --git a/tests/storagepoolschematest b/tests/storagepoolschematest
index be4767d..57b2f7b 100755
--- a/tests/storagepoolschematest
+++ b/tests/storagepoolschematest
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-source ./schematestutils.sh
+. ./schematestutils.sh
 
 DIRS="storagepoolxml2xmlin storagepoolxml2xmlout"
 SCHEMA="storagepool.rng"
diff --git a/tests/storagevolschematest b/tests/storagevolschematest
index ffc5c8a..32a8657 100755
--- a/tests/storagevolschematest
+++ b/tests/storagevolschematest
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-source ./schematestutils.sh
+. ./schematestutils.sh
 
 DIRS="storagevolxml2xmlin storagevolxml2xmlout"
 SCHEMA="storagevol.rng"

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