Browse Source

smoke script now exercises Due

[#21]
James Bowman 6 years ago
parent
commit
8970d10cb2
2 changed files with 75 additions and 0 deletions
  1. 42 0
      scripts/confirm
  2. 33 0
      scripts/smoke

+ 42 - 0
scripts/confirm

@@ -0,0 +1,42 @@
+# Usage:
+#
+#   confirm target sketch...
+#
+# Builds sketch for target
+# Target can be: uno, due, d1
+#
+# Uses the Arduino command line interface
+#
+# https://github.com/arduino/Arduino/blob/master/build/shared/manpage.adoc
+
+set -e
+
+TARGET=$1; shift
+cp ~/.arduino15/preferences.txt-$TARGET ~/.arduino15/preferences.txt
+
+for F in $*
+do
+  echo
+  echo ${F}:
+
+  rm -rf w
+  mkdir -p w
+
+  cp $F.ino w/
+  if [ "$TARGET" = "due" ]
+  then
+    sed -i '/EEPROM/d' w/$F.ino
+  fi
+  for A in converted-assets/${F}*_assets.h
+  do
+    [ -f $A ] && cp $A w/
+  done
+  cd w/
+
+  # --preserve-temp-files 
+  # -v
+  # --upload
+
+  $HOME/arduino-1.8.3/arduino --verify $F.ino
+  cd ..
+done

+ 33 - 0
scripts/smoke

@@ -0,0 +1,33 @@
+EXAMPLES=" \
+blobs \
+chess \
+cobra \
+cube \
+cube2 \
+fizz \
+frogger \
+helloworld \
+jnr \
+jpeg \
+kenney \
+logo \
+mono \
+nightstrike \
+noisy \
+radarchart \
+reflection \
+selftest \
+simon \
+sketch \
+slotgag \
+song \
+sprites \
+tiled \
+tilt \
+video1 \
+video2 \
+viewer \
+walk \
+widgets"
+
+scripts/confirm due $EXAMPLES