-
Notifications
You must be signed in to change notification settings - Fork 21
Feature: On-target execution tests [WIP] #147
Conversation
5ec3ef1
to
3157b71
Compare
Ready for review... and test drive ;) |
Where is Also, do you think this would be worth putting into a seperate repository? It is quite a bit less lightweight than any other test, and won't be useful to users. |
Take a look at the I'd rather keep it in-tree. It's only a hand full of files and we're talking about the LLVM repository. It's huge no matter what. Let's drown out the static overhead by writing a bazillion tests. In the long run I'd like to make it part of the CI. All we need is a build bot and an Arduino. |
Ah, right. you don't have a board yet. Here is the makefile...
Also note that |
I found this post regarding the PIC backend a while back, lost it, and found it again. Quote:
|
One defect of the current design is that it allows only one target execution test. That's because We have a little time on this. In the long run we need some sort of serialization. |
Can you add e0cc7d5, I can't seem to push a commit to your PR (probably doing it wrong). Note that I must run When I do, |
Done.
Hm, not good. There probably is a cleaner (distro specific) way to do this. There often it is a user group you need to member in to access the ttys.
Unsupported means |
Could you also add 8982a31. I got it to run by adding my user to the relevant groups, however Feel free to merge, |
Pretty sure it is not the board. I'd guess it's either a timing issue (I tested it on OS X only) or more python incompetence on my end. If you don't feel like debugging it just drop your distro name. Then I'll set up a vbox. If you want to look into it, here are a few things to try:
Done.
Will do. |
This adds two things: libavrlit: A small testing framework for the AVR, built using avr-gcc. It reports results to a TTY using a format similar to llvm-lit. llvm-avrlit: A test driver script. It builds an AVR executable from code lowered by our backend and libavrlit. It uploads and runs the test executable on a test board (Arduino Leonardo et al.) and collects the results. The on-target tests are only enabled if the AVRLIT_PORT environment variable is set. This is checked in test/CodeGen/AVR/lit.local.cfg.
I'll follow your steps in the next few days, I'll update once I get around to it :) |
8982a31
to
8464221
Compare
[AVR] Add on-target execution tests
Still work in progress, but fun to play with. From the README:
AVR LLVM Integrated Tester
This tool builds an AVR executable from test code lowered by our backend and the
libavrlit
test suite library using a known good toolchain (avr-gcc). Theresulting binary is uploaded to a development board. Test results are collected
using a virtual tty.
Setup
Things you will need:
RedBear Blend (Micro), &c.)
pySerial
python moduleSet the
AVRLIT_PORT
environment variable to the tty path of your board.If your board currently runs an Arduino sketch that uses the serial port, you are
all set. Otherwise, you need to reset the board manually for the first run.
> bin/llvm-lit -v ../llvm/test/CodeGen/AVR/
Writing Tests
The on-target execution tests reside in
llvm/test/CodeGen/AVR
. Like other littests they contain a
RUN:
line callingllvm-avrlit
:All of this is still in flux. I'll explain it if I decide to keep it. ;)