-
Notifications
You must be signed in to change notification settings - Fork 397
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
set QEMU_LD_PREFIX in the runners in order to be able to use env -i #1420
set QEMU_LD_PREFIX in the runners in order to be able to use env -i #1420
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice workaround! I'm fine with this approach, I would however like to see it done in all images and not just aarch64!
I also have a slight concern about what happens if the env is wiped and @DEFAULT_QEMU_LD_PREFIX@
hasn't been replaced by us. We should, if this lands, ensure that https://github.com/cross-rs/cross-toolchains also has been updated
Sure! I was just checking that you were ok with that before patching all the images — there is quite a lot :) I'm thinking to start by adding a test that runs
ok, just a few more images ;-) |
I understand this, my concern is simply about what qemu does when the env has been cleared, the default has not been replaced by the docker build and the only path in
|
ff6c46c
to
029e305
Compare
so I've tested it:
|
/ci try -t linux |
This comment has been minimized.
This comment has been minimized.
029e305
to
e09367d
Compare
This comment has been minimized.
This comment has been minimized.
The errors are expected I think |
I just realised something I shouldve thought about 😊 the tests dont ever hit this :D |
I think we should a new testcase that either uses assert_cmd or simulates the env clearing. |
/ci try -t aarch64-unknown-linux-* -t i686-linux |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I think the tests won't help until the PR made it to the https://github.com/cross-rs/cross/actions/runs/7679215720/job/20929912781?pr=1420##step:11:29 interesting to see that some tests are passing though — |
They are definitely using the new images, see |
oh, ok my bad: I've been confused by the name I'm looking at it |
I tried to rebuild the image from scratch and rerun the test locally — it still runs without problem. I've set |
/ci try -t aarch64-unknown-linux-* -t i686-linux |
my attempt at triggering a new test run deesn't seem very effective @Emilgardis could you trigger a new run for this PR? |
/ci try -t aarch64-unknown-linux-* -t i686-linux |
This comment has been minimized.
This comment has been minimized.
Now thinking about this even more. The issue here is that build.rs is ran on the host right? If that's the case, the added test case doesn't test correctly, what it should do is compile |
this problem should be fixed :-)
I've changed the test to only use the runner if it's defined in the env var — in fact that's exactly what I did in |
the problem is to run everything for the target passed to cross. That may or may not require a runner depending on the virtualisation system used. I think the test does the right thing I think we are not that far to have everything working :-) |
/ci try |
This comment has been minimized.
This comment has been minimized.
test should use |
This comment has been minimized.
This comment has been minimized.
mmm, I think they are, aren't they? I don't see what I have changed that makes the bsd systems fail :-/ |
for windows, The test fails if I make |
you removed the if RUN check, that should be there because some of these we can't run on at all |
some virtual env require a runner, some others don't. The runner env var is there to tell us if we need to use one or not
in order to not use wine again when launching a new binary
369b3a0
to
2fef4f4
Compare
ok, I misunderstood what RUN was for — this is happening too often for a single PR! |
should be ok for windows too. I've used |
and I need to look into what is going on with wasm. The project is more complex than I thought (maybe I've been fooled by how easy it is to use), and this shows in the test suite. I'm curious to see what approach you chose to refactor the test suite in rust. Is it available in a branch? |
/ci try |
This comment has been minimized.
This comment has been minimized.
Yes :D
Its nothing concrete right now, basically replace bash with rust, then rewrite it to be prettier, we do have #1037 for the bigger issue of actual UI tests |
failures look fine, except the wasm one, should probably just exempt it from running this test. |
this target doesn't support running a command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just one minor fix and this should be good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
thanks for the kind guidance during the PR! I'll look at https://github.com/cross-rs/cross-toolchains soon |
I'm working on making assert_cmd working with cross.
There is one case a bit more difficult:
when using
clear_env()
on a process, orenv -i
, the binary is not able to run anymore because theQEMU_LD_PREFIX
envvar is not set anymore.A (relatively) easy fix might be to ensure in
linux-runner
— and in any other runner — that thenecessary environment is configured before running the executable. Something as proposed
in this PR for
aarch64-unknown-linux-gnu
.Would that be an acceptable solution?
assert-rs/assert_cmd#193