Commit 3fb252d0 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

add simple compile and option-combination tests for posix arch

parent 0f648924
Loading
Loading
Loading
Loading
+0 −0

Empty file added.

+31 −0
Original line number Diff line number Diff line
#include "arch.h"
#include "driver/gpio.h"
#include "driver/stdout.h"
#include "driver/uptime.h"

void loop(void)
{
	kout << "Loop" << endl;
	gpio.led_toggle(0);
#ifdef TIMER_S
	kout << dec << uptime.get_s() << endl;
#endif
}

int main(void)
{
	arch.setup();
	gpio.setup();
	kout.setup();

	/*
	 * There may be some delay between program start and UART capture start.
	 */
	for (uint8_t i = 0; i < 255; i++) {
		kout << "Hello, World!" << endl;
	}

	arch.idle_loop();

	return 0;
}
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ run: build/system.elf

monitor: run

program:
program: build/system.elf

arch_clean:
	rm -f ${OBJECTS}

tests/posix

0 → 100755
+10 −0
Original line number Diff line number Diff line
#!/bin/sh

uarttest() {
	~/var/projects/uarttest/bin/uarttest.py "$@"
}

uarttest --runtime=2 --check "grep 'Hello, World!$'" '!build/system.elf' './mp app=test_basic arch=posix loop={!1} aspectc={0!1} gpio_trace={!1} arch_drivers={!counter} drivers={!softi2c}'

# Loop
uarttest --runtime=2 --check "grep 'Hello, World!$'" '!build/system.elf' './mp app=test_basic arch=posix loop=1 aspectc={0!1} gpio_trace={!1} arch_drivers={!counter}'