Skip to content

ci: fix sspi-ffi test job for Windows #98

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jan 31, 2023
Merged

Conversation

CBenoit
Copy link
Member

@CBenoit CBenoit commented Jan 31, 2023

On Windows, we rename symbols using a .def file.
For that, we emit a cargo instruction.

cargo:rustc-link-arg=/DEF:sspi.def

However, when attempting to run unit tests this causes an error.

Caused by:
  could not execute process `<redacted>` (never executed)

Caused by:
  %1 is not a valid Win32 application. (os error 193)

There is currently no built-in way to check if cargo is going to run the tests from the build.rs itself:
rust-lang/cargo#4001

This commit adds a new environment variable that when set prevent the instruction emission.

On Windows, we rename symbols using a .def file.
For that, we emit a cargo instruction.

> cargo:rustc-link-arg=/DEF:sspi.def

However, when attempting to run unit tests this causes an error.

```
Caused by:
  could not execute process `<redacted>` (never executed)

Caused by:
  %1 is not a valid Win32 application. (os error 193)
```
@CBenoit CBenoit requested review from a team as code owners January 31, 2023 15:56
@CBenoit CBenoit enabled auto-merge (squash) January 31, 2023 16:09
@CBenoit CBenoit mentioned this pull request Jan 31, 2023
@CBenoit CBenoit merged commit 61a8ea8 into master Jan 31, 2023
@CBenoit CBenoit deleted the ci-fix-windows-test-job branch January 31, 2023 16:19
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants