rpm-software-management / libcomps

Libcomps is alternative for yum.comps library. It's written in pure C as library and there's bindings for python2 and python3.
GNU General Public License v2.0
29 stars 37 forks source link

Expected test output? #102

Closed markdirish closed 1 year ago

markdirish commented 1 year ago

Hello,

I am building libcomps on PASE on IBM i. It is sort of like AIX built on top of a non-Unix system. I have it building, and when I run the tests, I get no failures or errors, but it is pretty chatty, throwing errors to the terminal. I built it on RHEL 8.7 and saw similar output, but I just want to make sure that the output looks sane before we certify the build.

[  0%] Built target test-copy
[  0%] Built target src-copy
[ 80%] Built target libcomps
[ 88%] Built target test_parse
[ 91%] Running comps_parse test
Running suite(s): Basic Tests
## Running test_parse1

ERROR: <packageFOO> found with no suitable parent at line:15 col:6
No declaration for element packageFOO

## Running test_parse2

<description> content missing at line:265 column:18
packagelist is empty at line:270 column :4
Element description is required at line:271 column :2 but missing
packagelist is empty at line:320 column :4
<description> content missing at line:379 column:18
packagelist is empty at line:384 column :4
Element description is required at line:385 column :2 but missing
<description> content missing at line:440 column:18
packagelist is empty at line:445 column :4
Element description is required at line:446 column :2 but missing
## Running test_parse3

Element id is required at line:188 column :2 but missing
Element name is required at line:188 column :2 but missing
Element description is required at line:188 column :2 but missing
<description> content missing at line:265 column:18
Element description is required at line:272 column :2 but missing
<description> content missing at line:316 column:18
Element description is required at line:323 column :2 but missing
<description> content missing at line:381 column:18
Element description is required at line:388 column :2 but missing
<description> content missing at line:443 column:18
Element description is required at line:450 column :2 but missing
## Running test_parse4

ERROR: <id> found with no suitable parent at line:4 col:2
ERROR: <packagereq> found with no suitable parent at line:158 col:4
WARNING: Element <langonly> at line:274 col:16 has been already found
ERROR: <groupid> found with no suitable parent at line:588 col:4
ERROR: <grouplist> found with no suitable parent at line:880 col:2
ERROR: <groupid> found with no suitable parent at line:881 col:4
ERROR: <groupid> found with no suitable parent at line:882 col:4
ERROR: <groupid> found with no suitable parent at line:883 col:4
ERROR: <groupid> found with no suitable parent at line:884 col:4
ERROR: <groupid> found with no suitable parent at line:885 col:4
ERROR: <groupid> found with no suitable parent at line:886 col:4
ERROR: <groupid> found with no suitable parent at line:887 col:4
ERROR: <id> found with no suitable parent at line:1210 col:2
ERROR: <groupid> found with no suitable parent at line:1228 col:4
## Running test_parse5

'some stray' found between elements at line:6 column :4
'    some stray' found between elements at line:189 column :2
<description> content missing at line:266 column:18
Element description is required at line:273 column :2 but missing
<description> content missing at line:317 column:18
Element description is required at line:324 column :2 but missing
<description> content missing at line:382 column:18
Element description is required at line:389 column :2 but missing
<description> content missing at line:444 column:18
Element description is required at line:451 column :2 but missing
## Running test_parse fedora
## Running test_parse main2
## Running test_parse arch
100%: Checks: 8, Failures: 0, Errors: 0
[ 91%] Built target test_parse_run
[ 97%] Built target test_comps
[100%] Running comps test
Running suite(s): Basic Tests
### start test_comps_doc_basic
### start test_comps_doc_xml
### start test_comps_doc_setfeats
### start test_comps_doc_union
### start test_comps_default
Element name is required at line:9 column :2 but missing
Element description is required at line:9 column :2 but missing
100%: Checks: 5, Failures: 0, Errors: 0
[100%] Built target test_comps_run
[100%] Built target ctest
[100%] Built target pytest
[100%] Built target test

Thank you for any help!

pkratoch commented 1 year ago

Hi, sorry for a very late reply. The output is ugly, but expected. It tests also badly formed XMLs and the parser outputs the (expected) errors during logging. I think it would be better to turn off the error printing during testing, so I made a PR for that: https://github.com/rpm-software-management/libcomps/pull/107 . There is also one message coming from comps_parse_validate_dtd, which cannot be suppressed as easily, but it's also expected.

pkratoch commented 1 year ago

Closed by PR: https://github.com/rpm-software-management/libcomps/pull/107