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

skeptic + cross + *-pc-windows-gnu = Bad EXE format #88

Open
slonopotamus opened this issue Sep 12, 2018 · 3 comments
Open

skeptic + cross + *-pc-windows-gnu = Bad EXE format #88

slonopotamus opened this issue Sep 12, 2018 · 3 comments

Comments

@slonopotamus
Copy link

slonopotamus commented Sep 12, 2018

Problematic build is here: https://travis-ci.org/slonopotamus/local-encoding-rs/jobs/427679330#L673

It is run via cargo install cross && cross test --target i686-pc-windows-gnu. Note that everything works natively on both Linux and Windows.

I am actually not sure whether this is skeptic or cross problem (or mine).

Commit f5b4e2e gives the impression that skeptic is supposed to work with cross.

@slonopotamus
Copy link
Author

I think understood what's going on. Skeptic tries to run cargo via wine. But cargo is a binary for host platform, Linux x86_64.

@slonopotamus
Copy link
Author

slonopotamus commented Sep 13, 2018

So. I think this is a fundamental flaw in skeptic design - skeptic attempts to compile test body during tests run. But, you cannot expect that cargo, rustc or other compiling stuff is available when tests are run.

This is what happens:

  1. Skeptic-generated test is run
  2. It calls skeptic::rt::run_test
  3. Which in turn calls skeptic::rt::compile_test_case (this is where problems start)
  4. Which in turn calls skeptic::rt::get_rlib_dependencies
  5. Which in turn calls skeptic::rt::LockedDeps::from_path
  6. Which in turn calls cargo_metadata::metadata_deps
  7. Which in turn calls cargo_metadata::metadata_run
  8. Which attempts to run cargo (via wine in my case because tests are run within wine, this is a target platform)

But there is no cargo on target platform. Test is supposed to be a standalone binary that can just be run on whatever platform library targets for. That platform may or may not be able to compile binaries itself.

slonopotamus added a commit to slonopotamus/local-encoding-rs that referenced this issue Sep 13, 2018
1. It is [broken by design](budziq/rust-skeptic#88 (comment)) and incompatible with cross
2. README.md doesn't test anything useful anyway
slonopotamus added a commit to slonopotamus/local-encoding-rs that referenced this issue Sep 13, 2018
1. It is broken by design (budziq/rust-skeptic#88 (comment)) and incompatible with cross
2. README.md doesn't test anything useful anyway
@slonopotamus
Copy link
Author

#78 fixes my problem, but #78 has a discussion with reasons why it isn't going to be accepted.

slonopotamus added a commit to slonopotamus/local-encoding-rs that referenced this issue Aug 28, 2019
1. It is broken by design (budziq/rust-skeptic#88 (comment)) and incompatible with cross
2. README.md doesn't test anything useful anyway
slonopotamus added a commit to slonopotamus/local-encoding-rs that referenced this issue Aug 28, 2019
1. It is broken by design (budziq/rust-skeptic#88 (comment)) and incompatible with cross
2. README.md doesn't test anything useful anyway
slonopotamus added a commit to slonopotamus/local-encoding-rs that referenced this issue Aug 29, 2019
1. It is broken by design (budziq/rust-skeptic#88 (comment)) and incompatible with cross
2. README.md doesn't test anything useful anyway
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant