Commit Graph

9 Commits

Author SHA1 Message Date
Cole Robinson
c493d21642 tests: Enable failure testing with CompareDomXML2XML
This allows tests to check for specific failure scenarios
2016-04-14 12:25:57 -04:00
Ján Tomko
1d6dcec080 testCompareDomXML2XMLFiles: add parseFlags parameter
Allow testing XML parsing with different flags.
2016-02-26 09:47:45 +01:00
Cole Robinson
8e0fd243f8 tests: utils: Add PreFormat callback for CompareXML2XML helper
This allows individual driver tests to hook in their own code before
the def is formatted and compared.

We will eventually use this in the qemuxml2xml
2016-02-09 16:09:01 -05:00
Cole Robinson
5770c17074 tests: Share domain XML2XML compare helper
This creates a shared function in testutils.c that consolidates all
the slightly different implementations.
2016-01-08 21:21:34 -05:00
Cole Robinson
ca32929908 tests: Add virtTestCompareToFile
Replaces a common pattern used in many test files
2015-04-23 17:08:48 -04:00
Cole Robinson
bdbe26b504 tests: Use *DefParseFile more 2015-04-23 17:08:48 -04:00
Roman Bogorodskiy
c42dbd8a18 bhyve: fix build in tests
Commit 835cf84 dropped expectedVirtTypes argument for
virDomainDefParse*() functions, however bhyve tests still try to pass
that to virDomainDefParseFile(), therefore build fails.

Fix build by fixing virDomainDefParseFile() usage.
2015-04-23 10:54:32 +04:00
Daniel P. Berrange
0ecd685109 Give virDomainDef parser & formatter their own flags
The virDomainDefParse* and virDomainDefFormat* methods both
accept the VIR_DOMAIN_XML_* flags defined in the public API,
along with a set of other VIR_DOMAIN_XML_INTERNAL_* flags
defined in domain_conf.c.

This is seriously confusing & error prone for a number of
reasons:

 - VIR_DOMAIN_XML_SECURE, VIR_DOMAIN_XML_MIGRATABLE and
   VIR_DOMAIN_XML_UPDATE_CPU are only relevant for the
   formatting operation
 - Some of the VIR_DOMAIN_XML_INTERNAL_* flags only apply
   to parse or to format, but not both.

This patch cleanly separates out the flags. There are two
distint VIR_DOMAIN_DEF_PARSE_* and VIR_DOMAIN_DEF_FORMAT_*
flags that are used by the corresponding methods. The
VIR_DOMAIN_XML_* flags received via public API calls must
be converted to the VIR_DOMAIN_DEF_FORMAT_* flags where
needed.

The various calls to virDomainDefParse which hardcoded the
use of the VIR_DOMAIN_XML_INACTIVE flag change to use the
VIR_DOMAIN_DEF_PARSE_INACTIVE flag.
2015-01-13 16:26:12 +00:00
Roman Bogorodskiy
6d7a287c5a tests: add bhyve xml2xml test
The only implemented test for now is domain metadata test.
2014-04-08 20:50:36 +04:00