Page MenuHomeFreeBSD

Fix printing out binary/UTF-8 characters in kyua 0.11 by backporting fix for issue # 136
ClosedPublic

Authored by ngie on Apr 6 2016, 5:19 AM.

Details

Summary

Fix printing out binary/UTF-8 characters in kyua 0.11 by backporting fix for issue # 136

Backport the fix made by rodrigc in https://github.com/jmmv/kyua/issues/136 to
kyua 0.11 in order to fix kyua report-junit when executed with the FreeBSD test
suite as some of the testcases output binary or unicode data

Submitted by: rodrigc
Sponsored by: EMC / Isilon Storage Division

Test Plan
$ cd /usr/ports/devel/kyua; sudo make clean; sudo make reinstall
...
====> Compressing man pages (compress-man)
===>  Installing for kyua-0.11_1,3
===>   Registering installation for kyua-0.11_1,3
Installing kyua-0.11_1,3...
Using existing user 'tests'.
$ pkg info | grep kyua
kyua-0.11_1,3                  Testing framework for infrastructure software
$ (cd /usr/tests/local/kyua/; sudo kyua test)
...
utils/text/templates_test:templates_def__get_variable__ok  ->  passed  [0.007s]
utils/text/templates_test:templates_def__get_variable__unknown  ->  passed  [0.006s]
utils/text/templates_test:templates_def__get_vector__ok  ->  passed  [0.007s]
utils/text/templates_test:templates_def__get_vector__unknown  ->  passed  [0.006s]
utils/text/templates_test:templates_def__remove_variable  ->  passed  [0.007s]

Results file id is usr_local_tests_kyua.20160406-215207-780891
Results saved to /root/.kyua/store/results.usr_local_tests_kyua.20160406-215207-780891.db

1413/1413 passed (0 failed)
$ (cd /usr/tests/lib/libc/locale/; sudo sh -c 'kyua test; kyua report-junit > report-junit.xml')
...


Results file id is usr_tests_lib_libc_locale.20160406-215416-770383
Results saved to /root/.kyua/store/results.usr_tests_lib_libc_locale.20160406-215416-770383.db

42/42 passed (0 failed)
$ ls -l /usr/tests/lib/libc/locale/report-junit.xml
-rw-r--r--  1 root  wheel  72944 Apr  6 14:54 /usr/tests/lib/libc/locale/report-junit.xml
$ date
Wed Apr  6 14:54:53 PDT 2016
$ python -c "import xml.dom.minidom as md; md.parse('/usr/tests/lib/libc/locale/report-junit.xml')"; echo $?
0

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ngie retitled this revision from to Fix printing out binary/UTF-8 characters in kyua 0.11 by backporting fix for issue # 136.Apr 6 2016, 5:19 AM
ngie updated this object.
ngie edited the test plan for this revision. (Show Details)
ngie added a reviewer: jmmv.
ngie added subscribers: bdrewery, rodrigc.
ngie updated this revision to Diff 14913.
ngie edited the test plan for this revision. (Show Details)Apr 6 2016, 5:19 AM
ngie updated this object.
mat added a comment.Apr 6 2016, 10:00 AM

It is easier to slightly edit the patch to remove the git prefix (or generate it with --no-prefix) and simply drop the patch as patch-issue136 or something.

jmmv added inline comments.Apr 6 2016, 2:27 PM
devel/kyua/Makefile
5 ↗(On Diff #14913)

Hm? This change should bump the port revision, not the epoch.

ngie added a comment.Apr 6 2016, 9:09 PM
In D5851#124917, @mat wrote:

It is easier to slightly edit the patch to remove the git prefix (or generate it with --no-prefix) and simply drop the patch as patch-issue136 or something.

Agreed. I'll do that (and remove the commit message from the patch..)

ngie added inline comments.Apr 6 2016, 9:10 PM
devel/kyua/Makefile
5 ↗(On Diff #14913)

You're right. I'm going to set the PORTREVISION to 2 (to disambiguate this package from 0.11_1) and remove the PORTEPOCH change.

ngie marked 2 inline comments as done.Apr 6 2016, 9:10 PM
ngie updated this object.
ngie edited the test plan for this revision. (Show Details)Apr 6 2016, 9:17 PM
ngie updated this revision to Diff 14949.Apr 6 2016, 9:22 PM
  1. Remove git prefix metadata in the patch.
  2. Rename patch to standard naming scheme and remove from EXTRA_PATCHES
  3. Redo PORTEPOCH bump as PORTREVISION bump; set to 2 for continuity with previously released versions (in particular, 0.11_1,2)
ngie added a subscriber: whu.Apr 6 2016, 9:30 PM
mat added a comment.Apr 6 2016, 9:30 PM
In D5851#125137, @ngie wrote:
In D5851#124917, @mat wrote:

It is easier to slightly edit the patch to remove the git prefix (or generate it with --no-prefix) and simply drop the patch as patch-issue136 or something.

Agreed. I'll do that (and remove the commit message from the patch..)

Well, the commit message from the patch is a good thing, it shows where it's from, what it does, and all.

ngie added a comment.Apr 6 2016, 9:32 PM
In D5851#125145, @mat wrote:
In D5851#125137, @ngie wrote:
In D5851#124917, @mat wrote:

It is easier to slightly edit the patch to remove the git prefix (or generate it with --no-prefix) and simply drop the patch as patch-issue136 or something.

Agreed. I'll do that (and remove the commit message from the patch..)

Well, the commit message from the patch is a good thing, it shows where it's from, what it does, and all.

This could be gleaned from the upstream issue though (and I added the URL for the issue in the patch).

jmmv added inline comments.Apr 6 2016, 9:38 PM
devel/kyua/Makefile
5 ↗(On Diff #14913)

No, the revision should be 1. The epoch is used to do the disambiguation, and the epoch was properly bumped when kyua was rolled back from 0.12 to 0.11.

ngie marked an inline comment as done.Apr 6 2016, 9:45 PM
ngie added inline comments.
devel/kyua/Makefile
5 ↗(On Diff #14913)

Ok. I'll set it to 1. As long as the machine understands the numbering scheme, I guess it's ok (even if it's confusing for humans)...

ngie edited the test plan for this revision. (Show Details)Apr 6 2016, 9:55 PM
ngie marked an inline comment as done.Apr 6 2016, 9:57 PM
ngie updated this revision to Diff 14951.

Set PORTREVISION to 1; PORTEPOCH already disambiguates the complete
version number

Requested by: jmmv

ngie marked an inline comment as done.Apr 6 2016, 11:51 PM
rodrigc accepted this revision.

Thanks for fixing this.

This revision is now accepted and ready to land.Apr 7 2016, 9:41 PM
lwhsu added a subscriber: lwhsu.Apr 8 2016, 3:07 AM

@jmmv : we need your maintainer approval to commit this, thanks.

jmmv edited edge metadata.Apr 8 2016, 1:39 PM
jmmv accepted this revision.
This revision was automatically updated to reflect the committed changes.
ngie added a comment.Apr 10 2016, 12:18 AM

Thank you lwhsu!