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

utf8proc: enable tests #96089

Merged
merged 1 commit into from Dec 15, 2020
Merged

utf8proc: enable tests #96089

merged 1 commit into from Dec 15, 2020

Conversation

sternenseemann
Copy link
Member

Motivation for this change

Enable test suite of utf8proc.

For the current version normtest and graphemetest are disabled. This
will probably change in the future. Those tests are problematic because
they depend on unicode data files which are downloaded by cmake at build
time:

file(MAKE_DIRECTORY data)
set(UNICODE_VERSION 13.0.0)
file(DOWNLOAD https://www.unicode.org/Public/${UNICODE_VERSION}/ucd/NormalizationTest.txt data/NormalizationTest.txt SHOW_PROGRESS)
file(DOWNLOAD https://www.unicode.org/Public/${UNICODE_VERSION}/ucd/auxiliary/GraphemeBreakTest.txt data/GraphemeBreakTest.txt SHOW_PROGRESS)

For the next update, we'll probably need to patch out this section of
CMakeLists.txt and download the files in question with fetchurl
ourselves. It's trivial, but a little more maintenance work because
you have two more hashes to update.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@teto
Copy link
Member

teto commented Aug 23, 2020

some projects (Fcitx) for instance check wether the file is available locally before downloading them from the Internet. Worth asking upstream to do the same.

@sternenseemann
Copy link
Member Author

@teto I'm not even sure what file(DOWNLOAD …) does, I guess we'll see when it's actually enabled in the next release, really just wanted to add a heads up in the commit message for the person updating this package.

For the current version normtest and graphemetest are disabled. This
will probably change in the future. Those tests are problematic because
they depend on unicode data files which are downloaded by cmake at build
time:

    file(MAKE_DIRECTORY data)
    set(UNICODE_VERSION 13.0.0)
    file(DOWNLOAD https://www.unicode.org/Public/${UNICODE_VERSION}/ucd/NormalizationTest.txt data/NormalizationTest.txt SHOW_PROGRESS)
    file(DOWNLOAD https://www.unicode.org/Public/${UNICODE_VERSION}/ucd/auxiliary/GraphemeBreakTest.txt data/GraphemeBreakTest.txt SHOW_PROGRESS)

For the next update, we'll probably need to patch out this section of
CMakeLists.txt and download the files in question with fetchurl
ourselves.
@sternenseemann
Copy link
Member Author

Rebased against master to fix merge conflict with #96087.

@teto teto merged commit c5d2491 into NixOS:master Dec 15, 2020
@sternenseemann sternenseemann deleted the utf8proc-tests branch December 15, 2020 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants