Re: [Libosinfo] [libosinfo PATCH 0/8] Use "unknown" arch as a fallback for media/tree detection

2019-03-27 Thread Fabiano Fidêncio
On Wed, Mar 27, 2019 at 12:24 PM Fabiano Fidêncio wrote: > > This series has been written considering: > - https://www.redhat.com/archives/libosinfo/2019-February/msg00247.html > - a similar patch will be done for medias Well, Cole's patches just adds "unknown" to

Re: [Libosinfo] [libosinfo PATCH 5/8] test-db: Add test for guessing tree from OS

2019-03-27 Thread Fabiano Fidêncio
On Wed, Mar 27, 2019 at 12:24 PM Fabiano Fidêncio wrote: > > https://gitlab.com/libosinfo/libosinfo/issues/20 > > Signed-off-by: Fabiano Fidêncio > --- > tests/test-db.c | 53 + > 1 file changed, 53 insertions(+) > > dif

[Libosinfo] [libosinfo PATCH 5/8] test-db: Add test for guessing tree from OS

2019-03-27 Thread Fabiano Fidêncio
https://gitlab.com/libosinfo/libosinfo/issues/20 Signed-off-by: Fabiano Fidêncio --- tests/test-db.c | 53 + 1 file changed, 53 insertions(+) diff --git a/tests/test-db.c b/tests/test-db.c index a0fa490..ac7f9c8 100644 --- a/tests/test-db.c +++ b

[Libosinfo] [libosinfo PATCH 7/8] db: Deal with "unknown" media architecture

2019-03-27 Thread Fabiano Fidêncio
https://gitlab.com/libosinfo/libosinfo/issues/20 Signed-off-by: Fabiano Fidêncio --- osinfo/osinfo_db.c | 46 ++ 1 file changed, 46 insertions(+) diff --git a/osinfo/osinfo_db.c b/osinfo/osinfo_db.c index 2cecaf6..6885a3f 100644 --- a/osinfo

[Libosinfo] [libosinfo PATCH 6/8] db: Consider the media arch when guess an OS from media

2019-03-27 Thread Fabiano Fidêncio
https://gitlab.com/libosinfo/libosinfo/issues/20 Signed-off-by: Fabiano Fidêncio --- osinfo/osinfo_db.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/osinfo/osinfo_db.c b/osinfo/osinfo_db.c index 1038142..2cecaf6 100644 --- a/osinfo/osinfo_db.c +++ b/osinfo

[Libosinfo] [libosinfo PATCH 4/8] db: Deal with "unknown" tree architectures

2019-03-27 Thread Fabiano Fidêncio
https://gitlab.com/libosinfo/libosinfo/issues/20 Signed-off-by: Fabiano Fidêncio --- osinfo/osinfo_db.c | 44 1 file changed, 44 insertions(+) diff --git a/osinfo/osinfo_db.c b/osinfo/osinfo_db.c index b6d9282..1038142 100644 --- a/osinfo

[Libosinfo] [libosinfo PATCH 0/8] Use "unknown" arch as a fallback for media/tree detection

2019-03-27 Thread Fabiano Fidêncio
/libosinfo/libosinfo/issues/20 Fabiano Fidêncio (8): db: Rename tree to treeinfo in guess_os_from_tree() db: Rename os_* to os_treeinfo_* in guess_os_from_tree() db: Consider the tree arch when guessing an OS from tree db: Deal with "unknown" tree architectures test-db: Add test

[Libosinfo] [libosinfo PATCH 8/8] test-db: Add test to cover identifying a media with "unknown" arch

2019-03-27 Thread Fabiano Fidêncio
https://gitlab.com/libosinfo/libosinfo/issues/20 Signed-off-by: Fabiano Fidêncio --- .../dbdata/os/libosinfo.org/test-db-media.xml | 14 +++ tests/test-db.c | 25 +++ 2 files changed, 39 insertions(+) diff --git a/tests/dbdata/os

[Libosinfo] [libosinfo PATCH 3/8] db: Consider the tree arch when guessing an OS from tree

2019-03-27 Thread Fabiano Fidêncio
https://gitlab.com/libosinfo/libosinfo/issues/20 Signed-off-by: Fabiano Fidêncio --- osinfo/osinfo_db.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/osinfo/osinfo_db.c b/osinfo/osinfo_db.c index 136cf79..b6d9282 100644 --- a/osinfo/osinfo_db.c +++ b/osinfo

[Libosinfo] [libosinfo PATCH 2/8] db: Rename os_* to os_treeinfo_* in guess_os_from_tree()

2019-03-27 Thread Fabiano Fidêncio
It'll make clear that we're dealing with the treeinfo attributes and not with the tree ones. https://gitlab.com/libosinfo/libosinfo/issues/20 Signed-off-by: Fabiano Fidêncio --- osinfo/osinfo_db.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git

[Libosinfo] [libosinfo PATCH 1/8] db: Rename tree to treeinfo in guess_os_from_tree()

2019-03-27 Thread Fabiano Fidêncio
It'll make clear that we're dealing with the treeinfo attributes and not with the tree ones. https://gitlab.com/libosinfo/libosinfo/issues/20 Signed-off-by: Fabiano Fidêncio --- osinfo/osinfo_db.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git

Re: [Libosinfo] [libosinfo PATCH 1/2] tree: Add get_os_variants() API

2019-03-27 Thread Fabiano Fidêncio
On Tue, Mar 26, 2019 at 1:05 PM Fabiano Fidêncio wrote: > > osinfo-db schema allows that, but libosinfo never really had an API to > support it. > > https://gitlab.com/libosinfo/libosinfo/issues/16 > > Signed-off-by: Fabiano Fidêncio > --- > osinfo/osinfo_loader.c

[Libosinfo] [osinfo-db-tools PATCH] Add a git-publish configuration file

2019-03-26 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- .gitpublish | 4 1 file changed, 4 insertions(+) create mode 100644 .gitpublish diff --git a/.gitpublish b/.gitpublish new file mode 100644 index 000..0fe9e9b --- /dev/null +++ b/.gitpublish @@ -0,0 +1,4 @@ +[gitpublishprofile "default&qu

[Libosinfo] [osinfo-db PATCH] Add a git-publish configuration file

2019-03-26 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- .gitpublish | 4 1 file changed, 4 insertions(+) create mode 100644 .gitpublish diff --git a/.gitpublish b/.gitpublish new file mode 100644 index 000..3ffc49c --- /dev/null +++ b/.gitpublish @@ -0,0 +1,4 @@ +[gitpublishprofile "default&qu

[Libosinfo] [libosinfo PATCH] Add a git-publish configuration file

2019-03-26 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- .gitpublish | 4 1 file changed, 4 insertions(+) create mode 100644 .gitpublish diff --git a/.gitpublish b/.gitpublish new file mode 100644 index 000..ec868cc --- /dev/null +++ b/.gitpublish @@ -0,0 +1,4 @@ +[gitpublishprofile "default&qu

Re: [Libosinfo] [osinfo-db PATCH] Only use pytest --log-level arg if it is supported

2019-03-26 Thread Fabiano Fidêncio
eems the easiest path to take, indeed. I'm fine with this but I'd also like to hear from Cole. [snip] Best Regards, -- Fabiano Fidêncio ___ Libosinfo mailing list Libosinfo@redhat.com https://www.redhat.com/mailman/listinfo/libosinfo

[Libosinfo] [libosinfo PATCH 1/2] tree: Add get_os_variants() API

2019-03-26 Thread Fabiano Fidêncio
osinfo-db schema allows that, but libosinfo never really had an API to support it. https://gitlab.com/libosinfo/libosinfo/issues/16 Signed-off-by: Fabiano Fidêncio --- osinfo/osinfo_loader.c | 17 - osinfo/osinfo_os.c | 2 ++ osinfo/osinfo_tree.c | 70

[Libosinfo] [libosinfo PATCH 2/2] tests: Add test-tree.c

2019-03-26 Thread Fabiano Fidêncio
This test, at least for now, tests: - The basic functionality of creating a OsinfoTree object; - osinfo_tree_get_os_variants() API; https://gitlab.com/libosinfo/libosinfo/issues/16 Signed-off-by: Fabiano Fidêncio --- .gitignore | 1 + tests/Makefile.am

[Libosinfo] [libosinfo PATCH] tree: Also check fore "treeinfo" in addition to ".treeinfo"

2019-03-26 Thread Fabiano Fidêncio
Akamai CDN hosted files can't start with a dot, making trees published to a CDN having their ".treeinfo" files renamed to "treeinfo". https://gitlab.com/libosinfo/libosinfo/issues/18 Signed-off-by: Fabiano Fidêncio --- osinfo/osinfo_tree.c | 67 +++

[Libosinfo] [osinfo-db PATCH 4/4] opensuse: Standardize variant ids and names

2019-03-26 Thread Fabiano Fidêncio
Let's try to: - Use "netinst" for whatever is a network installer - Not add "dvd" variant, as its the "normal" one - Remove tags differentiating netinst and dvd from its names, as mgmt apps will already add the needed tags for network installers Signed-off-by:

[Libosinfo] [osinfo-db PATCH 2/4] fedora-unknown: Add tree information

2019-03-26 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- data/os/fedoraproject.org/fedora-unknown.xml.in | 8 1 file changed, 8 insertions(+) diff --git a/data/os/fedoraproject.org/fedora-unknown.xml.in b/data/os/fedoraproject.org/fedora-unknown.xml.in index a5f4eb7..202e393 100644 --- a/data/os

[Libosinfo] [osinfo-db PATCH 1/4] fedora: Split rawhide from unknown

2019-03-26 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- .../fedoraproject.org/fedora-rawhide.xml.in | 63 +++ .../fedoraproject.org/fedora-unknown.xml.in | 4 +- 2 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 data/os/fedoraproject.org/fedora-rawhide.xml.in diff --git

[Libosinfo] [osinfo-db PATCH 3/4] opensuse: Add Leap 15.1

2019-03-26 Thread Fabiano Fidêncio
Let's add info about the soon to be released Leap 15.1. Signed-off-by: Fabiano Fidêncio --- data/os/opensuse.org/opensuse-15.1.xml.in| 71 data/os/opensuse.org/opensuse-unknown.xml.in | 6 +- 2 files changed, 74 insertions(+), 3 deletions(-) create mode 100644 data/os

Re: [Libosinfo] [PATCH osinfo-db 00/15] tests: more tweaks

2019-03-25 Thread Fabiano Fidêncio
++ > tests/test_validation.py | 18 > tests/util.py| 67 > 9 files changed, 375 insertions(+), 349 deletions(-) > create mode 100644 tests/isodata.py > create mode 100644 tests/test_sch

Re: [Libosinfo] [PATCH osinfo-db] tests: Simplify 'make check'

2019-03-22 Thread Fabiano Fidêncio
On Fri, 2019-03-22 at 08:26 +0100, Fabiano Fidêncio wrote: > Cole, > > On Thu, Mar 21, 2019 at 7:51 PM Cole Robinson > wrote: > > Strip out everything except: python3 -m pytest --log-level=info > > > > * Per test log files are dropped entirely. This was just captur

Re: [Libosinfo] [PATCH osinfo-db] tests: Simplify 'make check'

2019-03-22 Thread Fabiano Fidêncio
check: unit-tests > -- > 2.21.0 > > ___ > Libosinfo mailing list > Libosinfo@redhat.com > https://www.redhat.com/mailman/listinfo/libosinfo Best Regards, -- Fabiano Fidêncio ___ Libosinfo mailing list Libosinfo@redhat.com https://www.redhat.com/mailman/listinfo/libosinfo

Re: [Libosinfo] [PATCH osinfo-db 7/7] tests: Add custom pytest-3 --network-tests option

2019-03-21 Thread Fabiano Fidêncio
On Thu, Mar 21, 2019 at 5:57 PM Cole Robinson wrote: > > On 3/21/19 11:21 AM, Fabiano Fidêncio wrote: > > On Thu, Mar 21, 2019 at 4:07 PM Cole Robinson wrote: > >> > >> On 3/21/19 8:23 AM, Fabiano Fidêncio wrote: > >>> On Wed, 2019-03-20 at 17:53 -0400,

Re: [Libosinfo] [PATCH osinfo-db 7/7] tests: Add custom pytest-3 --network-tests option

2019-03-21 Thread Fabiano Fidêncio
On Thu, Mar 21, 2019 at 4:07 PM Cole Robinson wrote: > > On 3/21/19 8:23 AM, Fabiano Fidêncio wrote: > > On Wed, 2019-03-20 at 17:53 -0400, Cole Robinson wrote: > >> This wires up a --network-tests option to save us from needing the > >> OSINFO_DB_NETWORK_TEST

Re: [Libosinfo] [PATCH osinfo-db 0/7] tests: misc bits

2019-03-21 Thread Fabiano Fidêncio
e review + rebase atop of my ACKd (and then modified according to your review) patches. Please, take a look on the reply for the 7th patch. Best Regards, -- Fabiano Fidêncio ___ Libosinfo mailing list Libosinfo@redhat.com https://www.redhat.com/mailman/listinfo/libosinfo

Re: [Libosinfo] [PATCH osinfo-db 7/7] tests: Add custom pytest-3 --network-tests option

2019-03-21 Thread Fabiano Fidêncio
media=True) > -@pytest.mark.skipif(os.environ.get('OSINFO_DB_NETWORK_TESTS') is > None, > - reason='Network related tests are not enabled') > def test_trees_url(_os): > broken = [] > for tree in _os.trees: Cole, This one didn't work for me at all. I've tried: - `make check` - `pytest3 tests/test_urls.py` In both cases the URL tests were not skipped. Is there some setup needed on my environment? Best Regards, -- Fabiano Fidêncio ___ Libosinfo mailing list Libosinfo@redhat.com https://www.redhat.com/mailman/listinfo/libosinfo

Re: [Libosinfo] [PATCH osinfo-db 6/7] tests: test_validation: Remove execute bit

2019-03-21 Thread Fabiano Fidêncio
> > diff --git a/tests/test_validation.py b/tests/test_validation.py > old mode 100755 > new mode 100644 Reviewed-by: Fabiano Fidêncio Best Regards, -- Fabiano Fidêncio ___ Libosinfo mailing list Libosinfo@redhat.com https://www.redhat.com/mailman/listinfo/libosinfo

Re: [Libosinfo] [PATCH osinfo-db 5/7] tests: utils: Provide helpers for filtering the OS list

2019-03-21 Thread Fabiano Fidêncio
rize(argname): > +def os_parametrize(argname, **kwargs): > """ > -Helper for parametrizing a test with an OS list. > +Helper for parametrizing a test with an OS list. Passthrough any > +extra arguments to DataFile

Re: [Libosinfo] [PATCH osinfo-db 4/7] tests: add os_parameterize

2019-03-21 Thread Fabiano Fidêncio
xml.etree.ElementTree as ET > > +import pytest > + > from . import osinfo > > > @@ -82,3 +84,11 @@ class _DataFiles(): > > > DataFiles = _DataFiles() > + > + > +def os_parametrize(argname): > +""" > +Helper for parametrizing a test with an OS list. > +""" > +oses = DataFiles.oses() > +return pytest.mark.parametrize(argname, oses, ids=lambda o: > o.shortid) Reviewed-by: Fabiano Fidêncio Best Regards, -- Fabiano Fidêncio ___ Libosinfo mailing list Libosinfo@redhat.com https://www.redhat.com/mailman/listinfo/libosinfo

Re: [Libosinfo] [PATCH osinfo-db 3/7] tests: test_isoinfo: Parameterize based on input OS

2019-03-21 Thread Fabiano Fidêncio
(_os): > -isodata_path = os.path.join( > -os.path.dirname(os.path.realpath(__file__)), > -'isodata') > -shortid_path = os.path.join(isodata_path, _os.distro, > _os.shortid) > - > -medias = [] > - if not

Re: [Libosinfo] [PATCH osinfo-db 2/7] tests: osinfo: Add some pretty printing for Os objects

2019-03-21 Thread Fabiano Fidêncio
__, > self.shortid) > + > def _get_id(self): > return self._root.get('id') > internal_id = _cache_property(_get_id) Reviewed-by: Fabiano Fidêncio Best Regards, -- Fabiano Fidêncio ___ Libosinfo mailing list Libosinfo@redhat.com https://www.redhat.com/mailman/listinfo/libosinfo

Re: [Libosinfo] [PATCH osinfo-db 1/7] tests: test_isoinfo: Remove shortid from _ISODataMedia

2019-03-21 Thread Fabiano Fidêncio
info.py b/tests/test_isoinfo.py index 3476ea9..b4f6205 100644 --- a/tests/test_isoinfo.py +++ b/tests/test_isoinfo.py @@ -141,5 +141,5 @@ def _get_isodatamedias(_os): if not os.path.exists(path): continue - medias.append(_get_isodatamedia(path, _os.sho

[Libosinfo] [libosinfo PATCH 1/5] tests: Remove test-*.uris

2019-03-20 Thread Fabiano Fidêncio
Those tests are now part of osinfo-db. With this change we can get rid of the curl dependency we have. Signed-off-by: Fabiano Fidêncio --- README | 1 - configure.ac | 8 --- libosinfo.spec.in| 1 - tests/Makefile.am| 26 +- tests

[Libosinfo] [libosinfo PATCH 5/5] test-os: Remove test_devices_duplication

2019-03-20 Thread Fabiano Fidêncio
This test is now part of osinfo-db. Signed-off-by: Fabiano Fidêncio --- tests/test-os.c | 146 1 file changed, 146 deletions(-) diff --git a/tests/test-os.c b/tests/test-os.c index cb7d972..b8b0a16 100644 --- a/tests/test-os.c +++ b/tests/test

[Libosinfo] [libosinfo PATCH 0/5] Remove osinfo-db related tests

2019-03-20 Thread Fabiano Fidêncio
on adding new data on osinfo-db and test data here. :-) The second patch is not going to be sent to the ML due to its size. Also, the whole amount of isodata files removed has been removed from the cover letter as it's just noise. Fabiano Fidêncio (5): tests: Remove test-*.uris tests: Remove

[Libosinfo] [libosinfo PATCH 3/5] test-os: Remove test_resources_minimum_recommended_maximum

2019-03-20 Thread Fabiano Fidêncio
This test is now part of osinfo-db. Signed-off-by: Fabiano Fidêncio --- tests/test-os.c | 150 1 file changed, 150 deletions(-) diff --git a/tests/test-os.c b/tests/test-os.c index 7244c0a..eecf820 100644 --- a/tests/test-os.c +++ b/tests/test

[Libosinfo] [osinfo-db PATCH 0/2] Add test_devices_duplication

2019-03-20 Thread Fabiano Fidêncio
Those two patches add to osinfo-db the last test from libosinfo which has osinfo-db as a dependency. After having those bits reviewed and merged, we can entirely get rid of osinfo-db related tests from libosinfo. Fabiano Fidêncio (2): tests: Add machinery for dealing with os relationships

[Libosinfo] [osinfo-db PATCH 1/2] tests: Add machinery for dealing with os relationships

2019-03-20 Thread Fabiano Fidêncio
This is going to be needed in order to test whether we're adding duplicated devices in OSes which derives-from or clones some other OS. Signed-off-by: Fabiano Fidêncio --- tests/osinfo.py | 18 ++ tests/util.py | 29 + 2 files changed, 47 insertions

[Libosinfo] [osinfo-db PATCH 2/2] tests: Add Devices tests

2019-03-20 Thread Fabiano Fidêncio
This test ensures no duplicated device entry exists between an OS and the OS it derives-from/clones. This test is the equivalent of "test_devices_duplication", which is currently part of test-os in libosinfo. Signed-off-by: Fabiano Fidêncio --- tests/osinfo.py | 9 ++

Re: [Libosinfo] [osinfo-db PATCH] tests: Add Resources tests

2019-03-20 Thread Fabiano Fidêncio
On Tue, Mar 19, 2019 at 3:41 PM Fabiano Fidêncio wrote: > > Those tests are going to ensure our database doesn't have: > - more than one resources element for the very same arch; > - minimum resources bigger than recommended resources; > - recommended resources bigger than ma

Re: [Libosinfo] [PATCH osinfo-db 00/10] tests: misc improvements

2019-03-20 Thread Fabiano Fidêncio
ML parsing to save some > test time > * Reduce test_isoinfo full runtime by ~95% > For the whole series: Reviewed-by: Fabiano Fidêncio (And I'm pushing them soon ...) Shouldn't we have a way to enforce pep8/pylint, at least with your cfg, as part of the tests? Thanks a lot for the whol

Re: [Libosinfo] [PATCH osinfo-db 10/10] tests: osinfo: use a compiled regex

2019-03-20 Thread Fabiano Fidêncio
On Tue, Mar 19, 2019 at 9:02 PM Cole Robinson wrote: > > This drops the total isoinfo runtime from ~80 seconds to about ~6 > on my machine. With this change we can just drop the expensive env var added in the patch before yours. [snip] ___ Libosinfo

Re: [Libosinfo] [PATCH osinfo-db 08/10] tests: test_isoinfo: don't log in match()

2019-03-20 Thread Fabiano Fidêncio
On Tue, Mar 19, 2019 at 9:02 PM Cole Robinson wrote: > > With the full test suite we hammer this function over 100K times. > This logging call in fact causes a lot of slow down. Dropping it > cuts time for me from ~120s to ~80s > > Signed-off-by: Cole Robinson > --- > tests/test_isoinfo.py | 2

[Libosinfo] [osinfo-db PATCH] Makefile: Do not remove xmllint check when building on older OSes

2019-03-19 Thread Fabiano Fidêncio
Let's not remove the lint target as it can still be used by older OSes which do not support python3. Signed-off-by: Fabiano Fidêncio --- Makefile | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 306..5d904ff 100644 --- a/Makefile

Re: [Libosinfo] [osinfo-db] rhel-8: Adjust regex for 8.0 and unknown

2019-03-19 Thread Fabiano Fidêncio
On Tue, 2019-03-19 at 10:37 -0400, Cole Robinson wrote: > On 3/19/19 6:10 AM, Fabiano Fidêncio wrote: > > Let's adjust the 8.0 regex as it may consist in 8.0.x, which should > > always be detected as 8.0. > > > > By doing this adjustment, the unknown regex also has to

[Libosinfo] [osinfo-db PATCH] tests: Add Resources tests

2019-03-19 Thread Fabiano Fidêncio
; - network resources bigger than maximum resources; All those tests were previously part of test-os, from libosinfo. Signed-off-by: Fabiano Fidêncio --- tests/osinfo.py | 54 ++ tests/test_resources.py | 100 2 files changed, 154

[Libosinfo] [osinfo-db] rhel-8: Adjust regex for 8.0 and unknown

2019-03-19 Thread Fabiano Fidêncio
Let's adjust the 8.0 regex as it may consist in 8.0.x, which should always be detected as 8.0. By doing this adjustment, the unknown regex also has to be adjusted accordingly. Signed-off-by: Fabiano Fidêncio --- data/os/redhat.com/rhel-8-unknown.xml.in | 16 data/os/redhat.com

[Libosinfo] [osinfo-db 2/2] test_isoinfo: Allow running a quickier version of the test

2019-03-18 Thread Fabiano Fidêncio
r non zero to enable it. Signed-off-by: Fabiano Fidêncio --- tests/test_isoinfo.py | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/test_isoinfo.py b/tests/test_isoinfo.py index 504892c..a26932d 100644 --- a/tests/test_isoinfo.py +++ b/tests/test_isoinfo.py @@ -16,12 +16

[Libosinfo] [osinfo-db 1/2] tests: Add a XML validation test

2019-03-18 Thread Fabiano Fidêncio
test_validation replaces the `xmllint` call from our Makefile. Signed-off-by: Fabiano Fidêncio --- Makefile | 11 +-- tests/test_validation.py | 22 ++ tests/util.py| 13 - 3 files changed, 35 insertions(+), 11 deletions

Re: [Libosinfo] [osinfo-db v2 0/4] tests: Move db specific tests from libosinfo

2019-03-18 Thread Fabiano Fidêncio
On Mon, Mar 18, 2019 at 2:38 PM Fabiano Fidêncio wrote: > > This series adds URL and isodata tests to osinfo-db. Those tests are > currently part of libosinfo. > > In the v2, I've followed Cole's recommendations made during v2 and, > hopefully, the issues raised are now solved

[Libosinfo] [osinfo-db v2 2/4] tests: Add URL tests

2019-03-18 Thread Fabiano Fidêncio
URL tests consist only in the equivalent to test-*uris.c from libosinfo and behaves in the very same way, being executed only if OSINFO_DB_NETWORK_TESTS is set. Signed-off-by: Fabiano Fidêncio --- .gitignore | 5 ++- Makefile | 17 - tests/__init__.py | 0 tests

[Libosinfo] [osinfo-db v2 4/4] tests: Add test_isoinfo

2019-03-18 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- tests/osinfo.py | 44 tests/test_isoinfo.py | 151 ++ 2 files changed, 195 insertions(+) create mode 100644 tests/test_isoinfo.py diff --git a/tests/osinfo.py b/tests/osinfo.py index 4391cd0

[Libosinfo] [osinfo-db v2 1/4] Makefile: Split xmllint from check

2019-03-18 Thread Fabiano Fidêncio
Let's have xmllint split from check so we can easily add more targets to to the `make check`. With the change `make lint` became an available make target as well. Signed-off-by: Fabiano Fidêncio --- Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b

[Libosinfo] [osinfo-db 1/3] win: Replace [:upper:] by A-Z

2019-03-18 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- data/os/microsoft.com/win-10.xml.in | 20 +- data/os/microsoft.com/win-2k.xml.in | 2 +- data/os/microsoft.com/win-2k12.xml.in | 10 - data/os/microsoft.com/win-2k12r2.xml.in | 10 - data/os/microsoft.com/win-2k16

[Libosinfo] [osinfo-db 3/3] fedora23: Replace [:alpha:] by A-Za-z

2019-03-18 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- data/os/fedoraproject.org/fedora-23.xml.in | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/data/os/fedoraproject.org/fedora-23.xml.in b/data/os/fedoraproject.org/fedora-23.xml.in index 9a3ce13..c8b9e5c 100644 --- a/data/os

[Libosinfo] [osinfo-db 0/3] Get rid of POSIX regex charecter classes

2019-03-18 Thread Fabiano Fidêncio
as "re" built-in python module doesn't cope with POSIX character classes for regular expressions. Fabiano Fidêncio (3): win: Replace [:upper:] by A-Z win: Replace [:digit:] by 0-9 fedora23: Replace [:alpha:] by A-Za-z data/os/fedoraproject.org/fedora-23.xml.in | 12 +- data/os

[Libosinfo] [osinfo-db 2/3] win: Replace [:digit:] by 0-9

2019-03-18 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- data/os/microsoft.com/win-10.xml.in | 20 +- data/os/microsoft.com/win-2k.xml.in | 2 +- data/os/microsoft.com/win-2k12.xml.in | 10 - data/os/microsoft.com/win-2k12r2.xml.in | 10 - data/os/microsoft.com/win-2k16

Re: [Libosinfo] [osinfo-db 2/2] test_media: Add detection test

2019-03-15 Thread Fabiano Fidêncio
On Fri, Mar 15, 2019 at 10:33 PM Cole Robinson wrote: > > On 3/15/19 11:51 AM, Fabiano Fidêncio wrote: > > The detection test is similar to test-isodetect from libosinfo, apart > > that it doesn't check for the filled-up languages in the matching media, > > as we're

Re: [Libosinfo] [osinfo-db 0/2] RFC: Add basic tests for osinfo-db (Part II)

2019-03-15 Thread Fabiano Fidêncio
On Fri, Mar 15, 2019 at 4:51 PM Fabiano Fidêncio wrote: > > This series, built atop of > https://www.redhat.com/archives/libosinfo/2019-March/msg00145.html, > introduces a test for media detection, similar to test-isodetect from > libosinfo. > > I'm pretty sure these patche

[Libosinfo] [osinfo-db 2/2] test_media: Add detection test

2019-03-15 Thread Fabiano Fidêncio
for python doesn't cope with POSIX regex (which are used as part of our db). Signed-off-by: Fabiano Fidêncio --- tests/unit/osinfo.py | 40 +++ tests/unit/test_media.py | 65 --- tests/unit/util.py | 84

Re: [Libosinfo] [osinfo-db 3/4] netbsd-7.1: Anchor volume-ids

2019-03-15 Thread Fabiano Fidêncio
On Fri, Mar 15, 2019 at 10:16 AM Fabiano Fidêncio wrote: > > Otherwise we can have 7.1 medias matching with 7.1.x medias. Well, we wouldn't, because of the volume-size. Seems that my test was actually not taking the volume-size into account (which was fixed later on and caught the

[Libosinfo] [osinfo-db 3/4] netbsd-7.1: Anchor volume-ids

2019-03-15 Thread Fabiano Fidêncio
Otherwise we can have 7.1 medias matching with 7.1.x medias. Signed-off-by: Fabiano Fidêncio --- data/os/netbsd.org/netbsd-7.1.xml.in | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/data/os/netbsd.org/netbsd-7.1.xml.in b/data/os/netbsd.org/netbsd-7.1.xml.in

[Libosinfo] [osinfo-db 2/4] asiaunix-unknown: Simplify the volume-id regex

2019-03-15 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- data/os/asianux.com/asianux-unknown.xml.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/os/asianux.com/asianux-unknown.xml.in b/data/os/asianux.com/asianux-unknown.xml.in index 8618eab..95d9508 100644 --- a/data/os/asianux.com

[Libosinfo] [osinfo-db 4/4] centos-6.6/centos-6.7: Fix volume-size of the medias

2019-03-15 Thread Fabiano Fidêncio
The volume-size of the 6.6 and 6.7 medias were taken as the ISO size showed when downloading the ISOs, instead of using the block size * volume size from the ISO. Signed-off-by: Fabiano Fidêncio --- data/os/centos.org/centos-6.6.xml.in | 12 ++-- data/os/centos.org/centos-6.7.xml.in

[Libosinfo] [osinfo-db 0/4] Small fixes caught while implementing osinfo-db tests

2019-03-15 Thread Fabiano Fidêncio
are going to be removed in favour of the (coming soon) osinfo-db tests. Fabiano Fidêncio (4): asianux-7.2: Remove empty system-id tag asiaunix-unknown: Simplify the volume-id regex netbsd-7.1: Anchor volume-ids centos-6.6/centos-6.7: Fix volume-size of the medias data/os/asianux.com/asianux-7.2

[Libosinfo] [osinfo-db 1/4] asianux-7.2: Remove empty system-id tag

2019-03-15 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- data/os/asianux.com/asianux-7.2.xml.in | 1 - 1 file changed, 1 deletion(-) diff --git a/data/os/asianux.com/asianux-7.2.xml.in b/data/os/asianux.com/asianux-7.2.xml.in index 69219fd..b27d0b9 100644 --- a/data/os/asianux.com/asianux-7.2.xml.in +++ b/data/os

[Libosinfo] [osinfo-db PATCH 1/4] Makefile: Split xmllint from check

2019-03-13 Thread Fabiano Fidêncio
Let's have xmllint split from check so we can easily add more targets to to the `make check`. With the change `make lint` became an available make target as well. Signed-off-by: Fabiano Fidêncio --- Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b

[Libosinfo] [osinfo-db PATCH 4/4] tests: Add image tests

2019-03-13 Thread Fabiano Fidêncio
Image tests, at least for now, consist only in the equivalent of test-imageuris.c from libosinfo and behaves in the same way, being executed only if OSINFO_DB_NETWORK_TESTS is set. Signed-off-by: Fabiano Fidêncio --- tests/unit/osinfo.py | 18 ++ tests/unit/test_image.py

[Libosinfo] [osinfo-db PATCH 3/4] tests: Add tree tests

2019-03-13 Thread Fabiano Fidêncio
Tree tests, at least for now, consist only in the equivalent of test-treeuris.c from libosinfo and behaves in the same way, being executed only if OSINFO_DB_NETWORK_TESTS is set. Signed-off-by: Fabiano Fidêncio --- tests/unit/osinfo.py| 18 ++ tests/unit/test_tree.py | 20

[Libosinfo] [osinfo-db PATCH 0/4] RFC: Add basic tests for osinfo-db

2019-03-13 Thread Fabiano Fidêncio
. As osinfo-db doesn't rely on autotools, some hacks have been in the Makefile in order to keep one log file per test. Fabiano Fidêncio (4): Makefile: Split xmllint from check tests: Add media tests tests: Add tree tests tests: Add image tests .gitignore | 5 ++- Makefile

[Libosinfo] [osinfo-db PATCH 2/4] tests: Add media tests

2019-03-13 Thread Fabiano Fidêncio
Media tests, at least for now, consist only in the equivalent of test-mediauris.c from libosinfo and behaves in the same way, being executed only if OSINFO_DB_NETWORK_TESTS is set. Signed-off-by: Fabiano Fidêncio --- .gitignore | 5 - Makefile | 17

[Libosinfo] [osinfo-db PATCH v2 22/25] rhel-8: Adjust version regex for x86_64 treeinfo

2019-03-12 Thread Fabiano Fidêncio
Let's make it match *only* with 8.0, avoiding it to match with 8.0.0 (for instance). Signed-off-by: Fabiano Fidêncio --- data/os/redhat.com/rhel-8.0.xml.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/os/redhat.com/rhel-8.0.xml.in b/data/os/redhat.com/rhel-8.0

[Libosinfo] [osinfo-db PATCH v2 24/25] rhel-8-unknown: Adjust the regex for the volume id

2019-03-12 Thread Fabiano Fidêncio
Currently our regex consider cases as 8-x with x > 0. Although the case shown above has still to be considered, we also have to consider: 8-x-y, with x >= 0 and y >= 0. Signed-off-by: Fabiano Fidêncio --- data/os/redhat.com/rhel-8-unknown.xml.in | 8 1 file changed, 4 inserti

[Libosinfo] [osinfo-db PATCH v2 19/25] rhel-7.6: Anchor the treeinfo version

2019-03-12 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- data/os/redhat.com/rhel-7.6.xml.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/os/redhat.com/rhel-7.6.xml.in b/data/os/redhat.com/rhel-7.6.xml.in index 1098c77..38ffeea 100644 --- a/data/os/redhat.com/rhel-7.6.xml.in +++ b/data/os

[Libosinfo] [osinfo-db PATCH v2 18/25] rhel-7.5: Add tree information

2019-03-12 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- data/os/redhat.com/rhel-7.5.xml.in | 24 1 file changed, 24 insertions(+) diff --git a/data/os/redhat.com/rhel-7.5.xml.in b/data/os/redhat.com/rhel-7.5.xml.in index 2eaa163..f31e6c5 100644 --- a/data/os/redhat.com/rhel-7.5.xml.in

[Libosinfo] [osinfo-db PATCH v2 13/25] rhel-7.1: Add tree information

2019-03-12 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- data/os/redhat.com/rhel-7.1.xml.in | 24 1 file changed, 24 insertions(+) diff --git a/data/os/redhat.com/rhel-7.1.xml.in b/data/os/redhat.com/rhel-7.1.xml.in index 8a43acf..cb8c635 100644 --- a/data/os/redhat.com/rhel-7.1.xml.in

[Libosinfo] [osinfo-db PATCH v2 23/25] rhel-8.0: Add tree information

2019-03-12 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- data/os/redhat.com/rhel-8.0.xml.in | 32 ++ 1 file changed, 32 insertions(+) diff --git a/data/os/redhat.com/rhel-8.0.xml.in b/data/os/redhat.com/rhel-8.0.xml.in index 28bdde0..7dfef6e 100644 --- a/data/os/redhat.com/rhel-8.0

[Libosinfo] [osinfo-db PATCH v2 17/25] rhel-7.5: Anchor the treeinfo version

2019-03-12 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- data/os/redhat.com/rhel-7.5.xml.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/os/redhat.com/rhel-7.5.xml.in b/data/os/redhat.com/rhel-7.5.xml.in index 6dea055..2eaa163 100644 --- a/data/os/redhat.com/rhel-7.5.xml.in +++ b/data/os

[Libosinfo] [osinfo-db PATCH v2 21/25] rhel-7-unknown: Add tree information

2019-03-12 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- data/os/redhat.com/rhel-7-unknown.xml.in | 32 1 file changed, 32 insertions(+) diff --git a/data/os/redhat.com/rhel-7-unknown.xml.in b/data/os/redhat.com/rhel-7-unknown.xml.in index c436887..c0be24a 100644 --- a/data/os/redhat.com

[Libosinfo] [osinfo-db PATCH v2 12/25] rhel-7.0: Add tree information

2019-03-12 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- data/os/redhat.com/rhel-7.0.xml.in | 24 1 file changed, 24 insertions(+) diff --git a/data/os/redhat.com/rhel-7.0.xml.in b/data/os/redhat.com/rhel-7.0.xml.in index 1c79e35..c1850e5 100644 --- a/data/os/redhat.com/rhel-7.0.xml.in

[Libosinfo] [osinfo-db PATCH v2 08/25] rhel-6.7: Add tree information

2019-03-12 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- data/os/redhat.com/rhel-6.7.xml.in | 32 ++ 1 file changed, 32 insertions(+) diff --git a/data/os/redhat.com/rhel-6.7.xml.in b/data/os/redhat.com/rhel-6.7.xml.in index a3b2e38..9e8ef32 100644 --- a/data/os/redhat.com/rhel-6.7

[Libosinfo] [osinfo-db PATCH v2 20/25] rhel-7.6: Add tree information

2019-03-12 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- data/os/redhat.com/rhel-7.6.xml.in | 24 1 file changed, 24 insertions(+) diff --git a/data/os/redhat.com/rhel-7.6.xml.in b/data/os/redhat.com/rhel-7.6.xml.in index 38ffeea..615cecd 100644 --- a/data/os/redhat.com/rhel-7.6.xml.in

[Libosinfo] [osinfo-db PATCH v2 25/25] rhel-8-unknown: Add tree information

2019-03-12 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- data/os/redhat.com/rhel-8-unknown.xml.in | 32 1 file changed, 32 insertions(+) diff --git a/data/os/redhat.com/rhel-8-unknown.xml.in b/data/os/redhat.com/rhel-8-unknown.xml.in index 8882940..3bb6f98 100644 --- a/data/os/redhat.com

[Libosinfo] [osinfo-db PATCH v2 16/25] rhel-7.4: Add tree information

2019-03-12 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- data/os/redhat.com/rhel-7.4.xml.in | 32 ++ 1 file changed, 32 insertions(+) diff --git a/data/os/redhat.com/rhel-7.4.xml.in b/data/os/redhat.com/rhel-7.4.xml.in index 72bb357..cdc33a1 100644 --- a/data/os/redhat.com/rhel-7.4

[Libosinfo] [osinfo-db PATCH v2 03/25] rhel-6.2: Add tree information

2019-03-12 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- data/os/redhat.com/rhel-6.2.xml.in | 32 ++ 1 file changed, 32 insertions(+) diff --git a/data/os/redhat.com/rhel-6.2.xml.in b/data/os/redhat.com/rhel-6.2.xml.in index dec3549..d8497d6 100644 --- a/data/os/redhat.com/rhel-6.2

[Libosinfo] [osinfo-db PATCH v2 11/25] rhel-6.10: Add tree information

2019-03-12 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- data/os/redhat.com/rhel-6.10.xml.in | 32 + 1 file changed, 32 insertions(+) diff --git a/data/os/redhat.com/rhel-6.10.xml.in b/data/os/redhat.com/rhel-6.10.xml.in index b46b7b9..0cfec00 100644 --- a/data/os/redhat.com/rhel-6.10

[Libosinfo] [osinfo-db PATCH v2 15/25] rhel-7.3: Add tree information

2019-03-12 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- data/os/redhat.com/rhel-7.3.xml.in | 32 ++ 1 file changed, 32 insertions(+) diff --git a/data/os/redhat.com/rhel-7.3.xml.in b/data/os/redhat.com/rhel-7.3.xml.in index 4418af7..147c294 100644 --- a/data/os/redhat.com/rhel-7.3

[Libosinfo] [osinfo-db PATCH v2 14/25] rhel-7.2: Add tree information

2019-03-12 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- data/os/redhat.com/rhel-7.2.xml.in | 32 ++ 1 file changed, 32 insertions(+) diff --git a/data/os/redhat.com/rhel-7.2.xml.in b/data/os/redhat.com/rhel-7.2.xml.in index 7cdae3b..4d167c1 100644 --- a/data/os/redhat.com/rhel-7.2

[Libosinfo] [osinfo-db PATCH v2 00/25] Add tree information for RHEL

2019-03-12 Thread Fabiano Fidêncio
suggestion. - Changes since v1: https://www.redhat.com/archives/libosinfo/2019-February/msg00181.html - Dropped the variants bits - Changed the arch from i386 to i686 - Anchored all the treeinfo versions Fabiano Fidêncio (25): rhel-6.0: Add tree information rhel-6.1: Add tree information

[Libosinfo] [osinfo-db PATCH v2 10/25] rhel-6.9: Add tree information

2019-03-12 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- data/os/redhat.com/rhel-6.9.xml.in | 32 ++ 1 file changed, 32 insertions(+) diff --git a/data/os/redhat.com/rhel-6.9.xml.in b/data/os/redhat.com/rhel-6.9.xml.in index ef769f9..b060c84 100644 --- a/data/os/redhat.com/rhel-6.9

[Libosinfo] [osinfo-db PATCH v2 06/25] rhel-6.5: Add tree information

2019-03-12 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- data/os/redhat.com/rhel-6.5.xml.in | 32 ++ 1 file changed, 32 insertions(+) diff --git a/data/os/redhat.com/rhel-6.5.xml.in b/data/os/redhat.com/rhel-6.5.xml.in index c736dad..e406ecd 100644 --- a/data/os/redhat.com/rhel-6.5

[Libosinfo] [osinfo-db PATCH v2 04/25] rhel-6.3: Add tree information

2019-03-12 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- data/os/redhat.com/rhel-6.3.xml.in | 32 ++ 1 file changed, 32 insertions(+) diff --git a/data/os/redhat.com/rhel-6.3.xml.in b/data/os/redhat.com/rhel-6.3.xml.in index 374daf1..cacd5ae 100644 --- a/data/os/redhat.com/rhel-6.3

[Libosinfo] [osinfo-db PATCH v2 05/25] rhel-6.4: Add tree information

2019-03-12 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- data/os/redhat.com/rhel-6.4.xml.in | 32 ++ 1 file changed, 32 insertions(+) diff --git a/data/os/redhat.com/rhel-6.4.xml.in b/data/os/redhat.com/rhel-6.4.xml.in index 4d827c5..5acd236 100644 --- a/data/os/redhat.com/rhel-6.4

[Libosinfo] [osinfo-db PATCH v2 09/25] rhel-6.8: Add tree information

2019-03-12 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- data/os/redhat.com/rhel-6.8.xml.in | 32 ++ 1 file changed, 32 insertions(+) diff --git a/data/os/redhat.com/rhel-6.8.xml.in b/data/os/redhat.com/rhel-6.8.xml.in index b3bc6fa..b2bd3c1 100644 --- a/data/os/redhat.com/rhel-6.8

[Libosinfo] [osinfo-db PATCH v2 01/25] rhel-6.0: Add tree information

2019-03-12 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- data/os/redhat.com/rhel-6.0.xml.in | 32 ++ 1 file changed, 32 insertions(+) diff --git a/data/os/redhat.com/rhel-6.0.xml.in b/data/os/redhat.com/rhel-6.0.xml.in index 3029712..1164184 100644 --- a/data/os/redhat.com/rhel-6.0

[Libosinfo] [osinfo-db PATCH v2 02/25] rhel-6.1: Add tree information

2019-03-12 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- data/os/redhat.com/rhel-6.1.xml.in | 32 ++ 1 file changed, 32 insertions(+) diff --git a/data/os/redhat.com/rhel-6.1.xml.in b/data/os/redhat.com/rhel-6.1.xml.in index dda363e..0d73078 100644 --- a/data/os/redhat.com/rhel-6.1

<    1   2   3   4   5   6   7   8   9   10   >