diff --git a/tests/AnalogInOutSerial/AnalogInOutSerial.ino b/examples/AnalogInOutSerial/AnalogInOutSerial.ino similarity index 100% rename from tests/AnalogInOutSerial/AnalogInOutSerial.ino rename to examples/AnalogInOutSerial/AnalogInOutSerial.ino diff --git a/tests/AnalogInOutSerial/Makefile b/examples/AnalogInOutSerial/Makefile similarity index 100% rename from tests/AnalogInOutSerial/Makefile rename to examples/AnalogInOutSerial/Makefile diff --git a/tests/Blink/Blink.ino b/examples/Blink/Blink.ino similarity index 100% rename from tests/Blink/Blink.ino rename to examples/Blink/Blink.ino diff --git a/tests/Blink/Makefile b/examples/Blink/Makefile similarity index 100% rename from tests/Blink/Makefile rename to examples/Blink/Makefile diff --git a/tests/BlinkChipKIT/BlinkChipKIT.pde b/examples/BlinkChipKIT/BlinkChipKIT.pde similarity index 100% rename from tests/BlinkChipKIT/BlinkChipKIT.pde rename to examples/BlinkChipKIT/BlinkChipKIT.pde diff --git a/tests/BlinkChipKIT/Makefile b/examples/BlinkChipKIT/Makefile similarity index 100% rename from tests/BlinkChipKIT/Makefile rename to examples/BlinkChipKIT/Makefile diff --git a/tests/BlinkInAVRC/Makefile b/examples/BlinkInAVRC/Makefile similarity index 100% rename from tests/BlinkInAVRC/Makefile rename to examples/BlinkInAVRC/Makefile diff --git a/tests/BlinkInAVRC/blink.c b/examples/BlinkInAVRC/blink.c similarity index 100% rename from tests/BlinkInAVRC/blink.c rename to examples/BlinkInAVRC/blink.c diff --git a/tests/BlinkWithoutDelay/BlinkWithoutDelay.ino b/examples/BlinkWithoutDelay/BlinkWithoutDelay.ino similarity index 100% rename from tests/BlinkWithoutDelay/BlinkWithoutDelay.ino rename to examples/BlinkWithoutDelay/BlinkWithoutDelay.ino diff --git a/tests/BlinkWithoutDelay/Makefile b/examples/BlinkWithoutDelay/Makefile similarity index 100% rename from tests/BlinkWithoutDelay/Makefile rename to examples/BlinkWithoutDelay/Makefile diff --git a/tests/Fade/Fade.ino b/examples/Fade/Fade.ino similarity index 100% rename from tests/Fade/Fade.ino rename to examples/Fade/Fade.ino diff --git a/tests/Fade/Makefile b/examples/Fade/Makefile similarity index 100% rename from tests/Fade/Makefile rename to examples/Fade/Makefile diff --git a/tests/HelloWorld/HelloWorld.ino b/examples/HelloWorld/HelloWorld.ino similarity index 100% rename from tests/HelloWorld/HelloWorld.ino rename to examples/HelloWorld/HelloWorld.ino diff --git a/tests/HelloWorld/Makefile b/examples/HelloWorld/Makefile similarity index 100% rename from tests/HelloWorld/Makefile rename to examples/HelloWorld/Makefile diff --git a/tests/TestSuiteCommon.mk b/examples/TestSuiteCommon.mk similarity index 100% rename from tests/TestSuiteCommon.mk rename to examples/TestSuiteCommon.mk diff --git a/tests/WebServer/Makefile b/examples/WebServer/Makefile similarity index 100% rename from tests/WebServer/Makefile rename to examples/WebServer/Makefile diff --git a/tests/WebServer/WebServer.ino b/examples/WebServer/WebServer.ino similarity index 100% rename from tests/WebServer/WebServer.ino rename to examples/WebServer/WebServer.ino diff --git a/tests/master_reader/Makefile b/examples/master_reader/Makefile similarity index 100% rename from tests/master_reader/Makefile rename to examples/master_reader/Makefile diff --git a/tests/master_reader/master_reader.ino b/examples/master_reader/master_reader.ino similarity index 100% rename from tests/master_reader/master_reader.ino rename to examples/master_reader/master_reader.ino diff --git a/tests/toneMelody/Makefile b/examples/toneMelody/Makefile similarity index 100% rename from tests/toneMelody/Makefile rename to examples/toneMelody/Makefile diff --git a/tests/toneMelody/pitches.h b/examples/toneMelody/pitches.h similarity index 100% rename from tests/toneMelody/pitches.h rename to examples/toneMelody/pitches.h diff --git a/tests/toneMelody/toneMelody.ino b/examples/toneMelody/toneMelody.ino similarity index 100% rename from tests/toneMelody/toneMelody.ino rename to examples/toneMelody/toneMelody.ino diff --git a/script/runtests.sh b/script/runtests.sh index ad42f74..5f513da 100755 --- a/script/runtests.sh +++ b/script/runtests.sh @@ -1,11 +1,31 @@ #!/usr/bin/env bash +TESTS_DIR=examples + failures=() -for dir in tests/*/ +# These examples cannot be tested easily at the moment as they require +# alternate cores. The MakefileExample doesn't actually contain any source code +# to compile. +NON_TESTABLE_EXAMPLES=(ATtinyBlink MakefileExample TinySoftWareSerial) + +for dir in $TESTS_DIR/*/ do dir=${dir%*/} example=${dir##*/} + example_is_testable=true + for non_testable_example in "${NON_TESTABLE_EXAMPLES[@]}"; do + if [[ $example == $non_testable_example ]]; then + example_is_testable=false + break + fi + done + + if ! $example_is_testable; then + echo "Skipping non-testable example $example..." + continue + fi + pushd $dir echo "Compiling $example..." make_output=`make clean`