-
Notifications
You must be signed in to change notification settings - Fork 356
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
cross-test on a Windows host #1251
Conversation
@bors try |
💔 Test failed - status-appveyor |
@bors try |
💔 Test failed - status-appveyor |
@bors try |
💔 Test failed - status-appveyor |
@CAD97 since you seem to use Windows, do you have any idea how to unset an environment variable in a batch script? Somehow, batch scripts is an even worse language than bash scripts, and that really should be impossible.^^ There's a hole lot of code duplication here, but I don't dare even try factoring that into a function. |
Also Cc @JOE1994 |
.appveyor.yml
Outdated
- cd test-cargo-miri | ||
- '"C:\msys64\mingw64\bin\python3.exe" run-test.py' | ||
- cd .. | ||
- set MIRI_SYSROOT= |
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.
This here seems to not have the effect of deleting the env var, even though that's what the internet says I should do.
In CMD, C:\Users\CAD>if defined demo ( echo defined )
C:\Users\CAD>if not defined demo ( echo not defined )
not defined
C:\Users\CAD>set demo=demo
C:\Users\CAD>if defined demo ( echo defined )
defined
C:\Users\CAD>if not defined demo ( echo not defined )
C:\Users\CAD>set demo=
C:\Users\CAD>if defined demo ( echo defined )
C:\Users\CAD>if not defined demo ( echo not defined )
not defined
C:\Users\CAD>set demo=␣
C:\Users\CAD>if defined demo ( echo defined )
defined
C:\Users\CAD>set "demo="␣
C:\Users\CAD>if not defined demo ( echo not defined )
not defined I typically avoid command line scripting though, and I stick to Powershell when I have to. (And typically, I try to treat "empty string" as unset because of this exact issue where unsetting a variable often times just sets it to an empty string, but it's still set.) |
I'll try that, thanks!
Is there a way to do that with our AppVeyor scripting?
I'd rather not change the platform-independent Rust part because of the idiosyncrasies of a 30 year old scripting language... |
@bors try |
💔 Test failed - status-appveyor |
It still says
So, this hasn't worked. :/ |
Ok, so here's something else to try: https://www.appveyor.com/docs/build-configuration/#interpreters-and-scripts: you can use powershell scripts via In powershell, the syntax would be PS C:\Users\CAD> Test-Path env:Demo
False
PS C:\Users\CAD> $env:Demo="demo"
PS C:\Users\CAD> Test-Path env:Demo
True
PS C:\Users\CAD> $env:Demo=$null
PS C:\Users\CAD> Test-Path env:Demo
False |
But then I would have to port the entire thing to PowerShell, right? I never used that language and can't test this script locally, so I don't think that would work. I was going to try and see if I can't use a bash script on Windows instead -- maybe AppVeyor has git-for-Windows installed which, from what I hear, comes with a bash. Then we could even share some code with the Travis side of things. If that doesn't work, I think someone else would have to rewrite this for PowerShell. |
appVeyor allows us to choose between Command scripting and PowerShell scripting. Replacing the lines p.s. replacing the lines |
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.
OOPS... please disregard this review..
Looking good, isn't it? :D |
📌 Commit e9e04e5 has been approved by |
Looks like travis has trouble reporting the status back? CI is green but bors/GH do not notice... |
@bors retry |
@bors retry |
@bors retry |
@bors retry |
@bors retry |
https://www.traviscistatus.com/ claims the issue is gone... let's see about that. |
☀️ Test successful - checks-travis, status-appveyor |
Hm, I just realized I should probably have waited for some feedback here... @oli-obk with this PR, the Miri shims that take file system paths replace |
No description provided.