[LLVMdev] QEMU testing for LIT execution tests
jroelofs_
jroelofs at gmail.com
Mon Sep 8 16:33:06 PDT 2014
Sorry, this thread diverged a bit from the title, which I think may have
confused things....
This started as a discussion of "how do we get libcxx's lit to run target
executables inside qemu" and turned into "how can we make that generic
enough to support actual hardware as the remote target", and further into
"how about remote testing of the compiles too".
Now as to your question, my intent is *not* to run arm-linux-gnu-clang
inside qemu-arm on the x86 linux machine. And I also don't intend to run lit
inside qemu. What I would like to do however, is something like this:
For the moment, lets assume that I want to run my tests on real hardware,
say a raspberry pi (I'll come back to how qemu ties into this in a bit).
Suppose I have these three machines:
role hostname triple
BUILD tux i686-pc-linux-gnu
HOST bob i386-pc-win32
TARGET pi armv6-unknown-linux-gnueabi
and that I've built a canadian cross toolchain starting on 'tux', where
users on machines like 'bob' build software targeting their raspberry pi's.
I want to test both the i386-pc-win32-clang (which runs on 'bob'), as well
as the executables that it produces (which run on 'pi'), but my testing
infrastructure (i.e. python, LIT, etc) has to be on 'tux'.
In this scenario, the run lines would have to be:
// RUN: %host_run %clang %s -o %t && %target_run %t
Where %host_run is some script that copies in %s and runs
armv6-unknown-linux-gnueabi-clang on 'bob', and then copies out %t.
And where %target_run is another script that copies in and runs %t on 'pi'
And now, lets bring qemu back into the picture: now suppose my target
hardware does not exist yet, so I've got to use qemu. I want to be able to
test two versions of it: 1) one where qemu is built for 'tux' and 2) one
where qemu is built for 'bob'. So now those scripts are as follows:
1)
%host_run is the same as it was before.
%target_run is a script that wraps qemu
2)
%host_run is the same as it was before.
%target_run is a script that copies %t over to 'bob', and runs %t inside
qemu on 'bob'.
TL;DR: I want to run LIT on one machine, clang on another, and the binaries
that it produces on yet another machine (or even emulator).
I hope that clarifies things a bit.
Cheers,
Jon
--
View this message in context: http://llvm.1065342.n5.nabble.com/QEMU-testing-for-LIT-execution-tests-tp71755p72238.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.
More information about the llvm-dev
mailing list