Bug 10112 - add test for ./debian/control file
Summary: add test for ./debian/control file
Status: In Discussion
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Mason James
QA Contact: Kyle M Hall
URL:
Keywords: dependency
Depends on:
Blocks: 8158
  Show dependency treegraph
 
Reported: 2013-04-25 06:01 UTC by Mason James
Modified: 2023-01-25 22:30 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 10112 - add test for ./debian/control file (1.37 KB, patch)
2013-04-25 06:14 UTC, Mason James
Details | Diff | Splinter Review
Bug 10112 - add test for ./debian/control file (1.38 KB, patch)
2013-04-27 12:27 UTC, Mirko Tietgen
Details | Diff | Splinter Review
Bug 10112 - add test for ./debian/control* files (2.53 KB, patch)
2017-06-15 12:50 UTC, Mason James
Details | Diff | Splinter Review
[SIGNED OFF] Bug 10112 - add test for ./debian/control* files (2.56 KB, patch)
2017-08-08 15:13 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 10112 - add test for ./debian/control* files (2.60 KB, patch)
2017-09-01 10:45 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Mason James 2013-04-25 06:01:01 UTC
add a test for syntax errors in the ./debian/control file
Comment 1 Mason James 2013-04-25 06:14:24 UTC Comment hidden (obsolete)
Comment 2 Mirko Tietgen 2013-04-27 12:27:21 UTC
Created attachment 17751 [details] [review]
Bug 10112 - add test for ./debian/control file

to test, apply patch...

- run successful test
    $ perl ./t/00-valid-debian-control-file.t
    1..1
    ok 1 - parsed ./debian/control file ok

- add bad string to ./debian/control file
    $ sed -i -e '20i -------\' ./debian/control

- run failed test
    $ perl ./t/00-valid-debian-control-file.t
    1..1
    not ok 1 - parsed ./debian/control file ok

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Comment 3 Katrin Fischer 2013-04-30 05:24:45 UTC
Hm test fails for me, I think Parse::DebControl might be a new dependency?
Do we want to add this dependency for testing an automatically generated file?
Comment 4 Jonathan Druart 2015-02-20 16:24:09 UTC
Tomas, Does this make sense for you?
Comment 5 Tomás Cohen Arazi 2015-02-23 13:32:31 UTC
If we had such tests, they should generate the control file out of the control.in file as Robin does, and test it instead.  Because we want to test the control file generation, not the validity of the current file.

It could be done on a temporary directory as other tests do.
Comment 6 Mason James 2017-06-15 12:50:10 UTC
Created attachment 64313 [details] [review]
Bug 10112 - add test for ./debian/control* files

to test, apply patch...

1/ install libparse-debcontrol-perl package
    apt-get install libparse-debcontrol-perl

2/ run successful tests
    $ perl ./t/00-valid-debian-control-file.t                                       1..2
    ok 1 - parsed ./debian/control file cleanly
    ok 2 - parsed ./debian/control.in file cleanly

3/ add some bad syntax to a file
    $ sed -i -e '20i -------\' ./debian/control.in

4/ run failed tests
    $ perl ./t/00-valid-debian-control-file.t
    1..2
    ok 1 - parsed ./debian/control file cleanly
    not ok 2 - parsed ./debian/control.in file cleanly
Comment 7 Josef Moravec 2017-06-21 12:22:07 UTC
What is an appropriate statuse of this?
Comment 8 Katrin Fischer 2017-08-08 15:13:46 UTC
Created attachment 65654 [details] [review]
[SIGNED OFF] Bug 10112 - add test for ./debian/control* files

to test, apply patch...

1/ install libparse-debcontrol-perl package
    apt-get install libparse-debcontrol-perl

2/ run successful tests
    $ perl ./t/00-valid-debian-control-file.t                                       1..2
    ok 1 - parsed ./debian/control file cleanly
    ok 2 - parsed ./debian/control.in file cleanly

3/ add some bad syntax to a file
    $ sed -i -e '20i -------\' ./debian/control.in

4/ run failed tests
    $ perl ./t/00-valid-debian-control-file.t
    1..2
    ok 1 - parsed ./debian/control file cleanly
    not ok 2 - parsed ./debian/control.in file cleanly

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Katrin Fischer 2017-08-08 15:15:09 UTC
The patch proposes a new dependency libparse-debcontrol-perl and there has been some discussion about it.
Comment 10 Kyle M Hall 2017-09-01 10:45:35 UTC
Created attachment 66704 [details] [review]
Bug 10112 - add test for ./debian/control* files

to test, apply patch...

1/ install libparse-debcontrol-perl package
    apt-get install libparse-debcontrol-perl

2/ run successful tests
    $ perl ./t/00-valid-debian-control-file.t                                       1..2
    ok 1 - parsed ./debian/control file cleanly
    ok 2 - parsed ./debian/control.in file cleanly

3/ add some bad syntax to a file
    $ sed -i -e '20i -------\' ./debian/control.in

4/ run failed tests
    $ perl ./t/00-valid-debian-control-file.t
    1..2
    ok 1 - parsed ./debian/control file cleanly
    not ok 2 - parsed ./debian/control.in file cleanly

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 11 Jonathan Druart 2017-09-01 15:08:41 UTC
(In reply to Katrin Fischer from comment #9)
> The patch proposes a new dependency libparse-debcontrol-perl and there has
> been some discussion about it.

Where/When/Why?
Comment 12 Katrin Fischer 2017-09-01 18:16:10 UTC
Honestly? I don't remember. Probably just have to check with Mirko if it's ok?
Comment 13 Tomás Cohen Arazi 2017-09-01 18:17:04 UTC
(In reply to Katrin Fischer from comment #12)
> Honestly? I don't remember. Probably just have to check with Mirko if it's
> ok?

Yeah, we need to check with Mirko if he is ok
Comment 14 David Cook 2022-08-22 05:57:38 UTC
Is this something you still want to do, Mason, or should we close this one?
Comment 15 Katrin Fischer 2023-01-25 22:30:43 UTC
Mason, could you maybe review this one to see if it's still required?