]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virschematest: Add coverage for 'examples/xml/test'
authorPeter Krempa <pkrempa@redhat.com>
Tue, 6 Oct 2020 15:28:44 +0000 (17:28 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 20 Oct 2020 07:05:10 +0000 (09:05 +0200)
Add all appropriate file from our test driver example XML directory.

Note that the two 'node.*' files are actually custom for the test driver
to load full state. We don't have a schema for them.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/virschematest.c

index 29cd5cc6e32ce6c03bc41ab118c90ee988fbd87b..816305d776ef76de9ede5a88cacf91ec298f0007 100644 (file)
@@ -229,6 +229,8 @@ static const struct testSchemaEntry schemaDomain[] = {
     { .dir = "tests/xlconfigdata" },
     { .dir = "tests/libxlxml2domconfigdata" },
     { .dir = "tests/qemuhotplugtestdomains" },
+    { .dir = "examples/xml/test/",
+      .dirRegex = "testdom.*" },
 };
 
 static const struct testSchemaEntry schemaDomainCaps[] = {
@@ -259,6 +261,8 @@ static const struct testSchemaEntry schemaNetwork[] = {
     { .dir = "tests/networkxml2xmlin" },
     { .dir = "tests/networkxml2xmlout" },
     { .dir = "tests/networkxml2confdata" },
+    { .dir = "examples/xml/test/",
+      .dirRegex = "testnet.*" },
 };
 
 static const struct testSchemaEntry schemaNetworkport[] = {
@@ -267,6 +271,7 @@ static const struct testSchemaEntry schemaNetworkport[] = {
 
 static const struct testSchemaEntry schemaNodedev[] = {
     { .dir = "tests/nodedevschemadata" },
+    { .file = "examples/xml/test/testdev.xml" },
 };
 
 static const struct testSchemaEntry schemaNwfilter[] = {
@@ -292,6 +297,7 @@ static const struct testSchemaEntry schemaStoragePool[] = {
     { .dir = "tests/storagepoolschemadata" },
     { .dir = "examples/xml/storage",
       .dirRegex = "pool-.*" },
+    { .file = "examples/xml/test/testpool.xml" },
 };
 
 static const struct testSchemaEntry schemaStorageVol[] = {
@@ -300,6 +306,7 @@ static const struct testSchemaEntry schemaStorageVol[] = {
     { .dir = "tests/storagevolschemadata" },
     { .dir = "examples/xml/storage",
       .dirRegex = "vol-.*" },
+    { .file = "examples/xml/test/testvol.xml" },
 };