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

Add harfbuzz-sys-test using ctest #140

Merged
merged 4 commits into from Mar 29, 2019
Merged

Conversation

@spl
Copy link
Contributor

spl commented Mar 29, 2019

This adds a crate to the workspace for testing harfbuzz-sys automatically using ctest.

I changed a few types in harfbuzz-sys/src/lib.rs to make the testing automatic (i.e. to avoid creating special cases). However, I suppose lib.rs is generated? If so, this might be problematic if it is regenerated later. The changes seem quite sensible to me, so maybe there's an alternative to tweak the generation to get something similar?

harfbuzz-sys-test currently only works with HARFBUZZ_SYS_NO_PKG_CONFIG=1 because it doesn't get the DEP_HARFBUZZ_INCLUDE environment variable otherwise. The .travis.yml change reflects that. If #139 or something similar is merged, this special case can be removed, and the test should be run for both HARFBUZZ_SYS_NO_PKG_CONFIG=1 and without HARFBUZZ_SYS_NO_PKG_CONFIG.

There's a FIXME in harfbuzz-sys-test/build.rs because I don't understand the errors when these functions are not skipped. I would appreciate it if someone else would take a look at that.


This change is Reviewable

This currently only works with HARFBUZZ_SYS_NO_PKG_CONFIG=1.
@jdm
Copy link
Member

jdm commented Mar 29, 2019

@bors-servo
Copy link
Contributor

bors-servo commented Mar 29, 2019

📌 Commit bbbcbad has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Mar 29, 2019

Testing commit bbbcbad with merge fd95d4d...

bors-servo added a commit that referenced this pull request Mar 29, 2019
Add harfbuzz-sys-test using ctest

This adds a crate to the workspace for testing `harfbuzz-sys` automatically using `ctest`.

I changed a few types in `harfbuzz-sys/src/lib.rs` to make the testing automatic (i.e. to avoid creating special cases). However, I suppose `lib.rs` is generated? If so, this might be problematic if it is regenerated later. The changes seem quite sensible to me, so maybe there's an alternative to tweak the generation to get something similar?

`harfbuzz-sys-test` currently only works with `HARFBUZZ_SYS_NO_PKG_CONFIG=1` because it doesn't get the `DEP_HARFBUZZ_INCLUDE` environment variable otherwise. The `.travis.yml` change reflects that. If #139 or something similar is merged, this special case can be removed, and the test should be run for both `HARFBUZZ_SYS_NO_PKG_CONFIG=1` and without `HARFBUZZ_SYS_NO_PKG_CONFIG`.

There's a `FIXME` in `harfbuzz-sys-test/build.rs` because I don't understand the errors when these functions are not skipped. I would appreciate it if someone else would take a look at that.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-harfbuzz/140)
<!-- Reviewable:end -->
@jdm
Copy link
Member

jdm commented Mar 29, 2019

I'm assuming the errors occur because they are per-platform APIs? What sort of errors were you encountering?

@bors-servo
Copy link
Contributor

bors-servo commented Mar 29, 2019

☀️ Test successful - checks-travis
Approved by: jdm
Pushing fd95d4d to master...

@bors-servo bors-servo merged commit bbbcbad into servo:master Mar 29, 2019
3 checks passed
3 checks passed
Travis CI - Pull Request Build Passed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details
@spl
Copy link
Contributor Author

spl commented Mar 30, 2019

I'm assuming the errors occur because they are per-platform APIs?

Correct.

What sort of errors were you encountering?

Things about the coretext API. I'm on macOS, so it worked fine for me, but Travis is using Linux, therefore no coretext.

@spl spl deleted the spl:harfbuzz-sys-test branch Mar 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.