Skip to content

Commit

Permalink
Move tests back to 'examples', skip non-testable examples when testing.
Browse files Browse the repository at this point in the history
This fixes #259.
  • Loading branch information
peplin committed Sep 20, 2014
1 parent 6f46722 commit 086c6e9
Show file tree
Hide file tree
Showing 23 changed files with 21 additions and 1 deletion.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 21 additions & 1 deletion 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`
Expand Down

0 comments on commit 086c6e9

Please sign in to comment.