-
Notifications
You must be signed in to change notification settings - Fork 951
RISC-V tests in QEMU #765
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
RISC-V tests in QEMU #765
Conversation
fc42024
to
ad87621
Compare
f44dc54
to
143bcbf
Compare
@aykevl perhaps if you rebase against |
Doubt it, it'll need the SiFive version of QEMU. |
4e5a2ae
to
c2d5b02
Compare
Okay, this is ready for review (but not for merge). I've used a few dirty hacks to get this to work and it doesn't quite work yet on Windows for reasons I can't explain but at least this shows where I'm going. I think the crude hacks could be avoided by using the Note: the SiFive test finisher is included in the SiFive build of QEMU but somehow didn't end up upstream. Unfortunately, using their version would slow down CI significantly. |
main_test.go
Outdated
@@ -55,6 +55,12 @@ func TestCompiler(t *testing.T) { | |||
runPlatTests("cortex-m-qemu", matches, t) | |||
}) | |||
|
|||
if runtime.GOOS != "linux" { |
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.
Does this also need to exclude freebsd
?
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.
Heh, good point. I'll simply check for windows or darwin instead, to be conservative.
205c914
to
73bbf63
Compare
This commit makes the following command work correctly: tinygo run -target=hifive1-qemu ./testdata/cgo/
These tests should make sure that things that work now won't break in the future.
What is the state of this branch? It has a merge conflict that needs to be resolved, but otherwise what is needed for it to be merged? |
Right now it has a hack to work around the lack of exiting from within QEMU. I think I should add a new |
Investigating this it seems like the first commit will be obsoleted by #871. It would be convenient if that PR was merged first. |
Replaced in favor of #976. |
Not everything is supported right now, but these tests should make sure that things that work now won't break in the future.