From 275ac5e04bb296394c308bdd6dfd92ac51cfbd42 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Sun, 17 Apr 2016 10:06:29 +0200 Subject: tests: Include metadata.xsd for repoman tests --- .travis.yml | 4 +- MANIFEST.in | 2 +- cnf/metadata.dtd | 102 ------ cnf/metadata.xsd | 547 +++++++++++++++++++++++++++++++ pym/portage/tests/repoman/test_simple.py | 8 +- 5 files changed, 554 insertions(+), 109 deletions(-) delete mode 100644 cnf/metadata.dtd create mode 100644 cnf/metadata.xsd diff --git a/.travis.yml b/.travis.yml index b662d9412..5213feed1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,8 +8,8 @@ python: script: - ./setup.py test - ./setup.py install --root=/tmp/install-root - # prevent repoman tests from trying to fetch metadata.dtd + # prevent repoman tests from trying to fetch metadata.xsd - mkdir -p /tmp/install-root/usr/lib/portage/cnf - - cp cnf/metadata.dtd /tmp/install-root/usr/lib/portage/cnf/ + - cp cnf/metadata.xsd /tmp/install-root/usr/lib/portage/cnf/ - sudo rsync -a /tmp/install-root/. / - python -b -Wd -m portage.tests.runTests diff --git a/MANIFEST.in b/MANIFEST.in index d65c874a3..217846053 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -12,7 +12,7 @@ include cnf/make.conf.example.* # extra files for tests include .portage_not_installed -include cnf/metadata.dtd +include cnf/metadata.xsd # extra scripts include misc/* diff --git a/cnf/metadata.dtd b/cnf/metadata.dtd deleted file mode 100644 index ff2649cad..000000000 --- a/cnf/metadata.dtd +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cnf/metadata.xsd b/cnf/metadata.xsd new file mode 100644 index 000000000..0ead09ee8 --- /dev/null +++ b/cnf/metadata.xsd @@ -0,0 +1,547 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pym/portage/tests/repoman/test_simple.py b/pym/portage/tests/repoman/test_simple.py index 720560b32..6a7976142 100644 --- a/pym/portage/tests/repoman/test_simple.py +++ b/pym/portage/tests/repoman/test_simple.py @@ -128,7 +128,7 @@ class SimpleRepomanTestCase(TestCase): } licenses = ["GPL-2"] arch_list = ["x86"] - metadata_dtd = os.path.join(PORTAGE_BASE_PATH, "cnf/metadata.dtd") + metadata_xsd = os.path.join(PORTAGE_BASE_PATH, "cnf/metadata.xsd") metadata_xml_files = ( ( "dev-libs/A", @@ -269,9 +269,9 @@ class SimpleRepomanTestCase(TestCase): # involving canonical vs. non-canonical paths. test_repo_symlink = os.path.join(eroot, "test_repo_symlink") os.symlink(test_repo_location, test_repo_symlink) - metadata_dtd_dest = os.path.join(test_repo_location, 'metadata/dtd/metadata.dtd') - os.makedirs(os.path.dirname(metadata_dtd_dest)) - os.symlink(metadata_dtd, metadata_dtd_dest) + metadata_xsd_dest = os.path.join(test_repo_location, 'metadata/xml-schema/metadata.xsd') + os.makedirs(os.path.dirname(metadata_xsd_dest)) + os.symlink(metadata_xsd, metadata_xsd_dest) if debug: # The subprocess inherits both stdout and stderr, for -- cgit v1.2.3-65-gdbad