Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debian: Run testlang for each CUPS locale #85

Closed
wants to merge 1 commit into from
Closed

Debian: Run testlang for each CUPS locale #85

wants to merge 1 commit into from

Conversation

OdyX
Copy link
Contributor

@OdyX OdyX commented Feb 3, 2021

… and only for these.

Of the build environment forces LC_ALL to a non-provided locale, the build will fail.

For instance, the Debian reproducible builds' initiative runs builds under arbitrary locales; specifically the testlang make target will fail when run with LC_ALL=kz_KZ for example.

… and only for these.

Of the build environment forces LC_ALL to a non-provided locale, the build will fail.
Copy link
Member

@michaelrsweet michaelrsweet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only problem with this change is that on macOS the locale testing loops through the system-defined locales. It would be better for testlang to loop through the locales it finds in the locale directory on platforms other than macOS.

@michaelrsweet michaelrsweet added enhancement New feature or request priority-low labels Feb 3, 2021
@OdyX
Copy link
Contributor Author

OdyX commented Feb 3, 2021

@michaelrsweet
Copy link
Member

@OdyX

Hrm. That's what this does; isn't it?

https://github.com/OpenPrinting/cups/pull/85/files#diff-1efbe8fd9c6e7d6e5860183a59c31b47bb08f92e6fc3c2da273c90d9ba4570f1L638

No, your change removes the testing of macOS locales and scripts the testing of configured languages.

What I want to see is the loop over configured languages to be put in the testlang program itself, so that on macOS we can continue to test all system locales (which have been a historical source of problems) and on Linux/others we can test all configured locales.

The macOS code starts on line 185 of testlang.c, we just need to adapt it to test all the locales in the "locale" directory.

@OdyX
Copy link
Contributor Author

OdyX commented Feb 12, 2021

OK. On second reading, I got what you meant. Unfortunately, I don't have a MacOS at hand to implement this.

@michaelrsweet
Copy link
Member

@OdyX Nothing to implement, just do your test with an #else after the #ifdef __APPLE__ that loops through the Apple language identifiers.

michaelrsweet added a commit that referenced this pull request Mar 1, 2021
Also refactored the locale test code into a separate function, updated the
output to be consistent with the other unit tests, and split out the macOS
language identifier tests.  Still need to move the PPD tests to the testppd
program.
@michaelrsweet
Copy link
Member

[master 74418ac] Update testlang to test all locales (Issue #85)

@OdyX OdyX deleted the testlang-only-in-provided-locales branch March 6, 2021 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority-low
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants