aboutsummaryrefslogtreecommitdiff
path: root/script/runtests.sh
diff options
context:
space:
mode:
authorChristopher Peplin <chris.peplin@rhubarbtech.com>2014-09-20 16:14:32 -0400
committerChristopher Peplin <chris.peplin@rhubarbtech.com>2014-09-20 16:14:32 -0400
commit086c6e96ca4b98e8a144b5f7f37a7b3b6fedc61d (patch)
treea400644b8017ab3842e980eaf5df0f4e7437ca47 /script/runtests.sh
parent6f46722abb40c60dcaa0e40292342d015906c8bf (diff)
Move tests back to 'examples', skip non-testable examples when testing.
This fixes https://github.com/sudar/Arduino-Makefile/issues/259.
Diffstat (limited to 'script/runtests.sh')
-rwxr-xr-xscript/runtests.sh22
1 files changed, 21 insertions, 1 deletions
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`