pungi: Add tests for depsolving

These are tests written by Daniel Mach originally for Distill-NG. They
are ported to current Pungi. The test repositories are committed in the
tests/fixtures/ directory. This is the same data that is used for test
compose, but the actual RPM files are not present. Some tests are
adapted from dmach's fork of Pungi.

Some of the packages are marked with a comment saying they are
important. These are the packages that the test is specifically trying
to get included in the package set. There are also explicit tests for
packages that should not be included.

Two tests are skipped for now as there is a bug preventing them from
passing. This is related to fulltree being done for packages that are
explicitly multilib.

The depsolver is called by invoking a separate executable, so the
coverage data is wrong.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2016-11-03 12:52:36 +01:00
parent 4427769f6a
commit 8e5b197e3f
19 changed files with 1661 additions and 1 deletions

View File

@ -12,11 +12,19 @@
# along with this program; if not, see <https://gnu.org/licenses/>.
import os
import selinux
import sys
here = sys.path[0]
if here != '/usr/bin':
# Git checkout
sys.path.insert(1, os.path.dirname(here))
from pungi import get_full_version
import pungi.gather
import pungi.config
import pungi.ks
import selinux
def main():

View File

@ -159,5 +159,6 @@
<match install="openoffice.org-langpack-%s" name="openoffice.org-core"/>
<match install="tesseract-langpack-%s" name="tesseract"/>
<match install="tkgate-%s" name="tkgate"/>
<match install="dummy-release-notes-%s" name="dummy-release-notes" />
</langpacks>
</comps>

View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<repomd xmlns="http://linux.duke.edu/metadata/repo" xmlns:rpm="http://linux.duke.edu/metadata/rpm">
<revision>1473660739</revision>
<data type="primary">
<checksum type="sha256">e2007d0883d3c7e7b1409b578d6134b55e42a81a2b8568483f6a177dca33a5ab</checksum>
<open-checksum type="sha256">46587058c56b96e825286b8554a5b86283520d83ec58a104614d5844bcfd3cdb</open-checksum>
<location href="repodata/e2007d0883d3c7e7b1409b578d6134b55e42a81a2b8568483f6a177dca33a5ab-primary.xml.gz"/>
<timestamp>1473660739</timestamp>
<size>2801</size>
<open-size>33779</open-size>
</data>
<data type="filelists">
<checksum type="sha256">d10e4fa40128e91767cbe4f9fa8d647da70b24e252ea5690248c4c4dbeb8c55b</checksum>
<open-checksum type="sha256">9f4376455b1ea41d6e006959067acde4605a9b5de50e01f1b651bf7d8dfda033</open-checksum>
<location href="repodata/d10e4fa40128e91767cbe4f9fa8d647da70b24e252ea5690248c4c4dbeb8c55b-filelists.xml.gz"/>
<timestamp>1473660739</timestamp>
<size>1632</size>
<open-size>5515</open-size>
</data>
<data type="other">
<checksum type="sha256">b9dcd75dda89076e1fdbc4a194d97ce3efc6dcd5715191fbd459d569e83596fc</checksum>
<open-checksum type="sha256">1879f419d0383daf019f80a86a7222f5350984c77f12eced1c2b4a5e01c2d9a1</open-checksum>
<location href="repodata/b9dcd75dda89076e1fdbc4a194d97ce3efc6dcd5715191fbd459d569e83596fc-other.xml.gz"/>
<timestamp>1473660739</timestamp>
<size>1709</size>
<open-size>9014</open-size>
</data>
<data type="primary_db">
<checksum type="sha256">aeb3a17a03cc002051da0120cc3095d105fc74bb764a4354cf199c917c074698</checksum>
<open-checksum type="sha256">4cc6ddfb9385c77a10e97dac90f09d5a44b0acf600800a3926fd5e28992b4a19</open-checksum>
<location href="repodata/aeb3a17a03cc002051da0120cc3095d105fc74bb764a4354cf199c917c074698-primary.sqlite.bz2"/>
<timestamp>1473660739</timestamp>
<size>6090</size>
<open-size>118784</open-size>
<database_version>10</database_version>
</data>
<data type="filelists_db">
<checksum type="sha256">4fbc657d01000f79cec7b74ada066dfa66fc745a2745cb2f1e5b36e103078637</checksum>
<open-checksum type="sha256">06c7919d67cd29cacd4976a0fcd7f42a03f2787b3fdc8947899ef1742a8803bf</open-checksum>
<location href="repodata/4fbc657d01000f79cec7b74ada066dfa66fc745a2745cb2f1e5b36e103078637-filelists.sqlite.bz2"/>
<timestamp>1473660739</timestamp>
<size>2598</size>
<open-size>28672</open-size>
<database_version>10</database_version>
</data>
<data type="other_db">
<checksum type="sha256">feada0072a73fd3d224f4ddfb0447c5cfaafa8caab7105920d60244000e17446</checksum>
<open-checksum type="sha256">f7e63aca97e99e2553e113ad85943fbfd1e10aaff7f2a449046de2adc6bc376d</open-checksum>
<location href="repodata/feada0072a73fd3d224f4ddfb0447c5cfaafa8caab7105920d60244000e17446-other.sqlite.bz2"/>
<timestamp>1473660739</timestamp>
<size>3055</size>
<open-size>24576</open-size>
<database_version>10</database_version>
</data>
</repomd>

View File

@ -0,0 +1,164 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE comps PUBLIC "-//Red Hat, Inc.//DTD Comps info//EN" "comps.dtd">
<comps>
<!-- GROUPS -->
<group>
<id>core</id>
<name>Core</name>
<description>Smallest possible installation</description>
<default>true</default>
<uservisible>false</uservisible>
<packagelist>
<packagereq type="mandatory">dummy-bash</packagereq>
</packagelist>
</group>
<group>
<id>standard</id>
<name>Standard</name>
<description>Common set of utilities that extend the minimal installation.</description>
<default>false</default>
<uservisible>true</uservisible>
<packagelist>
<packagereq>dummy-lvm2</packagereq>
</packagelist>
</group>
<group>
<id>text-internet</id>
<name>Text-based Internet</name>
<description>This group includes text-based email, Web, and chat clients. These applications do not require the X Window System.</description>
<default>false</default>
<uservisible>true</uservisible>
<packagelist>
<packagereq type="optional">dummy-elinks</packagereq>
<packagereq type="optional">dummy-tftp</packagereq>
</packagelist>
</group>
<group>
<id>firefox</id>
<name>Firefox Web Browser</name>
<description>The Firefox web browser</description>
<default>false</default>
<uservisible>false</uservisible>
<packagelist>
<packagereq>Dummy-firefox</packagereq>
<packagereq>dummy-icedtea-web</packagereq>
</packagelist>
</group>
<group arch="i386 x86_64">
<id>skype</id>
<name>Skype</name>
<description>Free internet telephony</description>
<default>false</default>
<uservisible>true</uservisible>
<packagelist>
<packagereq>dummy-skype</packagereq>
</packagelist>
</group>
<group arch="x86_64">
<id>resilient-storage</id>
<name>Resilient Storage</name>
<description>Clustered storage, including the GFS2 filesystem.</description>
<default>false</default>
<uservisible>true</uservisible>
<packagelist>
<packagereq type="mandatory">dummy-gfs2-utils</packagereq>
<packagereq type="mandatory">dummy-lvm2-cluster</packagereq>
<packagereq type="mandatory">dummy-pacemaker</packagereq>
<packagereq type="mandatory">dummy-resource-agents</packagereq>
</packagelist>
</group>
<group>
<id>gluster</id>
<name>Gluster</name>
<description>GlusterFS support packages</description>
<default>false</default>
<uservisible>true</uservisible>
<packagelist>
<packagereq type="mandatory">dummy-glusterfs-resource-agents</packagereq>
</packagelist>
</group>
<group>
<id>basic-desktop</id>
<name>Desktop</name>
<description>Basic Desktop packages</description>
<default>true</default>
<uservisible>true</uservisible>
<packagelist>
<packagereq type="conditional" requires="dummy-imsettings">dummy-imsettings-gnome</packagereq>
</packagelist>
</group>
<!-- ENVIRONMENTS -->
<environment>
<id>minimal</id>
<name>Minimal install</name>
<description>Basic functionality.</description>
<display_order>99</display_order>
<grouplist>
<groupid>core</groupid>
</grouplist>
<optionlist>
</optionlist>
</environment>
<environment>
<id>desktop</id>
<name>Desktop</name>
<description>Desktop.</description>
<display_order>10</display_order>
<grouplist>
<groupid>core</groupid>
<groupid>standard</groupid>
<groupid>basic-desktop</groupid>
</grouplist>
<optionlist>
</optionlist>
</environment>
<environment>
<id>empty</id>
<name>Empty</name>
<description>Should not appear in the repos.</description>
<display_order>10</display_order>
<grouplist>
<groupid>does-not-exist</groupid>
</grouplist>
</environment>
<!-- LANGPACKS -->
<langpacks>
<match install="LabPlot-doc-%s" name="LabPlot-doc"/>
<match install="aspell-%s" name="aspell"/>
<match install="autocorr-%s" name="autocorr-en"/>
<match install="calligra-l10n-%s" name="calligra-core"/>
<match install="childsplay-alphabet_sounds_%s" name="childsplay"/>
<match install="eclipse-nls-%s" name="eclipse-platform"/>
<match install="firefox-langpack-%s" name="firefox"/>
<match install="gcompris-sound-%s" name="gcompris"/>
<match install="gimp-help-%s" name="gimp-help"/>
<match install="hunspell-%s" name="hunspell"/>
<match install="hyphen-%s" name="hyphen"/>
<match install="kde-l10n-%s" name="kdelibs"/>
<match install="kde-i18n-%s" name="kdelibs3"/>
<match install="libreoffice-langpack-%s" name="libreoffice-core"/>
<match install="man-pages-%s" name="man-pages"/>
<match install="moodle-%s" name="moodle"/>
<match install="mythes-%s" name="mythes"/>
<match install="nqc-doc-%s" name="nqc-doc"/>
<match install="openoffice.org-langpack-%s" name="openoffice.org-core"/>
<match install="tesseract-langpack-%s" name="tesseract"/>
<match install="tkgate-%s" name="tkgate"/>
<match install="dummy-release-notes-%s" name="dummy-release-notes" />
</langpacks>
</comps>

View File

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>
<repomd xmlns="http://linux.duke.edu/metadata/repo" xmlns:rpm="http://linux.duke.edu/metadata/rpm">
<revision>1478525452</revision>
<data type="primary">
<checksum type="sha256">443dade43e632f2bbb768b1768cb090175429b5e70823525c3a3f4d45b7984ed</checksum>
<open-checksum type="sha256">e60486cc17a922a5cfa3b0eeb6b02176d046bb81d4477806ccf76e49f2f619dd</open-checksum>
<location href="repodata/443dade43e632f2bbb768b1768cb090175429b5e70823525c3a3f4d45b7984ed-primary.xml.gz"/>
<timestamp>1478525452</timestamp>
<size>32219</size>
<open-size>442634</open-size>
</data>
<data type="filelists">
<checksum type="sha256">05ecf05b96e9d055dc9e3df028b1af2cf6661af7bb082278d96eebe4bf0b9012</checksum>
<open-checksum type="sha256">2df95e0dc72d04e62064d15d3b95d3aac7c4f1733ebb67c16beab89345808ceb</open-checksum>
<location href="repodata/05ecf05b96e9d055dc9e3df028b1af2cf6661af7bb082278d96eebe4bf0b9012-filelists.xml.gz"/>
<timestamp>1478525452</timestamp>
<size>19701</size>
<open-size>73844</open-size>
</data>
<data type="other">
<checksum type="sha256">74a554f4a2c7392d9ef0cf6a07652d7a198a104a202584e71f57bc247a32f41b</checksum>
<open-checksum type="sha256">56bb0c634647446b741246930d55542b6ca50084008678ab441d5f4960d1eaea</open-checksum>
<location href="repodata/74a554f4a2c7392d9ef0cf6a07652d7a198a104a202584e71f57bc247a32f41b-other.xml.gz"/>
<timestamp>1478525452</timestamp>
<size>19712</size>
<open-size>117697</open-size>
</data>
<data type="primary_db">
<checksum type="sha256">9249118941570779bf043a7a393f0308f891ac1d7fdd2dfe006d3caf69d26a6f</checksum>
<open-checksum type="sha256">c0ecdec1aeac2c4e1f32f97c04c703a438e139f4d9d9631a95e3fca5fec61e5c</open-checksum>
<location href="repodata/9249118941570779bf043a7a393f0308f891ac1d7fdd2dfe006d3caf69d26a6f-primary.sqlite.bz2"/>
<timestamp>1478525452</timestamp>
<size>57571</size>
<open-size>368640</open-size>
<database_version>10</database_version>
</data>
<data type="filelists_db">
<checksum type="sha256">a5891b48313e9cd503e94e48c93a08b5160ce04f4fde2d1e32f21ef69f550141</checksum>
<open-checksum type="sha256">b8398ea076836772a553717e9abfcd6fec1cb7d69ad32c09094b4abf1345aa88</open-checksum>
<location href="repodata/a5891b48313e9cd503e94e48c93a08b5160ce04f4fde2d1e32f21ef69f550141-filelists.sqlite.bz2"/>
<timestamp>1478525452</timestamp>
<size>25706</size>
<open-size>94208</open-size>
<database_version>10</database_version>
</data>
<data type="other_db">
<checksum type="sha256">129bcb220b766abd0d38b33f919af26b017c6ae086cf087ca00d183d97d57a06</checksum>
<open-checksum type="sha256">41a274ac1928cbd1b9126972b154826842af8781a6037fade0ca1bc57443d5d2</open-checksum>
<location href="repodata/129bcb220b766abd0d38b33f919af26b017c6ae086cf087ca00d183d97d57a06-other.sqlite.bz2"/>
<timestamp>1478525452</timestamp>
<size>29618</size>
<open-size>122880</open-size>
<database_version>10</database_version>
</data>
<data type="group">
<checksum type="sha256">cd2e022a3f1163bed5dd38328a2c0bd7a8db1589a9e67b25c6341941914e1077</checksum>
<location href="repodata/cd2e022a3f1163bed5dd38328a2c0bd7a8db1589a9e67b25c6341941914e1077-dummy-comps.xml"/>
<timestamp>1478525452</timestamp>
<size>5178</size>
</data>
<data type="group_gz">
<checksum type="sha256">2f8cc4b5cf852eca9838393db012ad4e494ccea437ffbbbf95e110a388e15f35</checksum>
<open-checksum type="sha256">cd2e022a3f1163bed5dd38328a2c0bd7a8db1589a9e67b25c6341941914e1077</open-checksum>
<location href="repodata/2f8cc4b5cf852eca9838393db012ad4e494ccea437ffbbbf95e110a388e15f35-dummy-comps.xml.gz"/>
<timestamp>1478525452</timestamp>
<size>1244</size>
<open-size>5178</open-size>
</data>
</repomd>

1363
tests/test_pungi.py Normal file

File diff suppressed because it is too large Load Diff