avr-test-suite

Crates.ioavr-test-suite
lib.rsavr-test-suite
version0.1.1
sourcesrc
created_at2017-11-16 13:19:04.17754
updated_at2017-11-17 00:21:37.030984
descriptionAn AVR compiler integration test suite
homepage
repositoryhttps://github.com/dylanmckay/avr-test-suite
max_upload_size
id39545
size47,433
Dylan McKay (dylanmckay)

documentation

https://docs.rs/avr-test-suite

README

avr-test-suite

Crates.io Build Status license

A standalone test-suite for AVR compilers.

Uses simavr under the hood.

Usage

git clone https://github.com/dylanmckay/avr-test-suite.git
cd avr-test-suite

# Run all tests
./test.sh

Binaries

There are two binaries included in this crate.

avr-lit

The test runner.

Usage

cd avr-test-suite

# Run all tests
cargo run --bin avr-lit

# Run specific test
cargo run --bin avr-lit tests/add.cpp

avr-sim

An avr simulator that will flash binaries given to it onto an emulated AVR and execute the program until it goes into indefinite sleep mode with interrupts disabled.

It will also connect the simulated UART to standard output, which can then be used by tests or other stuff.

Usage

cd avr-test-suite

# Run a program by loading it via disk
cargo run --bin avr-sim MyExecutable.elf

# Compile a file and pipe it directly into the simulator to run.
echo 'int main() { return 0; }' > main.c
avr-gcc main.c -mmcu=atmega328 -o /dev/stdout | cargo run --bin avr-sim MyExecutable

Test format

Uses the lit crate.

Commit count: 93

cargo fmt