Hi all, I'm working in a company to port LLVM on their own processor. I'm trying to run the test-suite, but it seems that it is usually run directly on the processor which is tested. In my case, I cannot run it on the processor, but I have a simulator on which I would like to run the test-suite. Also, it seems to me that the test-suite start by compiling some tools that have to be run locally (so on x86), and then the test-suite compile all the tests, but with the same compiler as the one used to compile the tools. My questions are : - Is it possible to compile the tools of the test-suite and all the tests with a different compiler? - Is it possible not to run the tests directly on the machine but on a simulator? Best Regards, Romaric
On 2 April 2015 at 15:51, Romaric Jodin <rjodin at kalray.eu> wrote:> - Is it possible to compile the tools of the test-suite and all the tests with a different compiler?It is. Check CC / ORIGINAL_CC / TARGET_CC in the Makefiles.> - Is it possible not to run the tests directly on the machine but on a simulator?Yes, see RunSafely.sh. It has options for remote testing, or QEMU user emulation. I have not tried that myself, but I know it has been done in the past and it should still be possible. cheers, --renato
Hi Romaric, Yes, you can do this. I'm working on reworking the test-suite to make it substantially easier to do, but for the moment it does still work. There is a "RUNUNDER" argument to the makefiles that you can use to prefix any command with your simulator. We find the easiest way to do it is to use binfmt_misc to ensure any ELF files compiled for your target get run via your simulator. Then the test-suite just works out of the box. Hope this helps, James On Thu, 2 Apr 2015 at 16:12 Romaric Jodin <rjodin at kalray.eu> wrote:> Hi all, > > I'm working in a company to port LLVM on their own processor. > I'm trying to run the test-suite, but it seems that it is usually run > directly on the processor which is tested. In my case, I cannot run it on > the processor, but I have a simulator on which I would like to run the > test-suite. > Also, it seems to me that the test-suite start by compiling some tools > that have to be run locally (so on x86), and then the test-suite compile > all the tests, but with the same compiler as the one used to compile the > tools. > > My questions are : > - Is it possible to compile the tools of the test-suite and all the > tests with a different compiler? > - Is it possible not to run the tests directly on the machine but on a > simulator? > > Best Regards, > Romaric > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150402/e916326e/attachment.html>
In lnt (http://llvm.org/docs/lnt/) you can run the test-suite with 'lnt runtest nt' and appropriate options. The --qemu-user-mode=qemu-command option will use the makefiles in the right way for qemu's linux user mode. --qemu-flag can be used to pass additional options. It should be fairly easy to adapt lnt's qemu support to other simulators if you need to. I should mention that I typically point --qemu-user-mode at a wrapper script that sets some environment variables (QEMU_LD_PREFIX and LD_LIBRARY_PATH) before calling qemu itself. Otherwise my simulated program can't find the target libraries.> -----Original Message----- > From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] > On Behalf Of Renato Golin > Sent: 02 April 2015 17:12 > To: Romaric Jodin > Cc: Nicolas Brunie; LLVM Dev > Subject: Re: [LLVMdev] Cross Compiling LLVM's test-suite > > On 2 April 2015 at 15:51, Romaric Jodin <rjodin at kalray.eu> wrote: > > - Is it possible to compile the tools of the test-suite and all the tests with a > different compiler? > > It is. Check CC / ORIGINAL_CC / TARGET_CC in the Makefiles. > > > - Is it possible not to run the tests directly on the machine but on a > simulator? > > Yes, see RunSafely.sh. It has options for remote testing, or QEMU user > emulation. > > I have not tried that myself, but I know it has been done in the past > and it should still be possible. > > cheers, > --renato > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev