From 944920176ffd7cfdf41756ef33441982c27e8099 Mon Sep 17 00:00:00 2001
From: Scott Lahteine <github@thinkyhead.com>
Date: Sun, 18 Aug 2019 23:29:59 -0500
Subject: [PATCH] Add more platform Travis tests

---
 .travis.yml                                   | 33 +++++++++++++++----
 buildroot/share/git/mftest                    |  3 ++
 buildroot/share/tests/ARMED-tests             | 16 +++++++++
 buildroot/share/tests/BIGTREE_SKR_MINI-tests  | 17 ++++++++++
 buildroot/share/tests/BIGTREE_SKR_PRO-tests   | 18 ++++++++++
 buildroot/share/tests/LPC1768-tests           |  5 ++-
 buildroot/share/tests/LPC1769-tests           |  6 ++--
 buildroot/share/tests/STM32F1-tests           |  3 ++
 buildroot/share/tests/STM32F4-tests           | 16 +++++++++
 buildroot/share/tests/STM32F7-tests           | 18 ++++++++++
 .../tests/adafruit_grandcentral_m4-tests      |  3 ++
 buildroot/share/tests/at90usb1286_cdc-tests   | 17 ++++++++++
 buildroot/share/tests/at90usb1286_dfu-tests   | 17 ++++++++++
 buildroot/share/tests/esp32-tests             |  3 ++
 buildroot/share/tests/fysetc_STM32F1-tests    | 16 +++++++++
 buildroot/share/tests/fysetc_f6_13-tests      | 17 ++++++++++
 buildroot/share/tests/jgaurora_a5s_a1-tests   | 16 +++++++++
 buildroot/share/tests/linux_native-tests      |  3 ++
 buildroot/share/tests/malyanm200-tests        | 13 ++++++++
 buildroot/share/tests/megaatmega1280-tests    | 16 +++++++++
 buildroot/share/tests/megaatmega2560-tests    |  2 +-
 buildroot/share/tests/mks_robin-tests         | 13 ++++++++
 buildroot/share/tests/mks_robin_lite-tests    | 17 ++++++++++
 buildroot/share/tests/mks_robin_mini-tests    | 16 +++++++++
 buildroot/share/tests/mks_robin_nano-tests    | 14 ++++++++
 buildroot/share/tests/rambo-tests             | 21 ++++++++++++
 .../share/tests/sanguino_atmega1284p-tests    | 17 ++++++++++
 .../share/tests/sanguino_atmega644p-tests     | 17 ++++++++++
 28 files changed, 362 insertions(+), 11 deletions(-)
 create mode 100644 buildroot/share/tests/ARMED-tests
 create mode 100644 buildroot/share/tests/BIGTREE_SKR_MINI-tests
 create mode 100644 buildroot/share/tests/BIGTREE_SKR_PRO-tests
 create mode 100644 buildroot/share/tests/STM32F4-tests
 create mode 100644 buildroot/share/tests/STM32F7-tests
 create mode 100644 buildroot/share/tests/at90usb1286_cdc-tests
 create mode 100644 buildroot/share/tests/at90usb1286_dfu-tests
 create mode 100644 buildroot/share/tests/fysetc_STM32F1-tests
 create mode 100644 buildroot/share/tests/fysetc_f6_13-tests
 create mode 100644 buildroot/share/tests/jgaurora_a5s_a1-tests
 create mode 100644 buildroot/share/tests/malyanm200-tests
 create mode 100644 buildroot/share/tests/megaatmega1280-tests
 create mode 100644 buildroot/share/tests/mks_robin-tests
 create mode 100644 buildroot/share/tests/mks_robin_lite-tests
 create mode 100644 buildroot/share/tests/mks_robin_mini-tests
 create mode 100644 buildroot/share/tests/mks_robin_nano-tests
 create mode 100644 buildroot/share/tests/rambo-tests
 create mode 100644 buildroot/share/tests/sanguino_atmega1284p-tests
 create mode 100644 buildroot/share/tests/sanguino_atmega644p-tests

diff --git a/.travis.yml b/.travis.yml
index 18f6e22b754..747ebf9d4d3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,18 +9,37 @@ notifications:
   email: false
 
 env:
-  - TEST_PLATFORM="megaatmega2560"
+  - TEST_PLATFORM="ARMED"
+  #- TEST_PLATFORM="at90usb1286_cdc"
+  #- TEST_PLATFORM="at90usb1286_dfu"
   - TEST_PLATFORM="DUE"
+  - TEST_PLATFORM="esp32"
+  - TEST_PLATFORM="fysetc_f6_13"
+  - TEST_PLATFORM="jgaurora_a5s_a1"
+  - TEST_PLATFORM="linux_native"
   - TEST_PLATFORM="LPC1768"
   - TEST_PLATFORM="LPC1769"
-  - TEST_PLATFORM="STM32F1"
+  #- TEST_PLATFORM="malyanm200"
+  - TEST_PLATFORM="megaatmega1280"
+  - TEST_PLATFORM="megaatmega2560"
+  #- TEST_PLATFORM="mks_robin"
+  #- TEST_PLATFORM="mks_robin_lite"
+  #- TEST_PLATFORM="mks_robin_mini"
+  #- TEST_PLATFORM="mks_robin_nano"
+  - TEST_PLATFORM="rambo"
+  - TEST_PLATFORM="adafruit_grandcentral_m4"
+  - TEST_PLATFORM="sanguino_atmega1284p"
+  - TEST_PLATFORM="sanguino_atmega644p"
+  - TEST_PLATFORM="STM32F103R"
+  #- TEST_PLATFORM="BIGTREE_SKR_MINI"
+  #- TEST_PLATFORM="fysetc_STM32F1"
+  - TEST_PLATFORM="alfawise_U20"
+  #- TEST_PLATFORM="STM32F4"
+  - TEST_PLATFORM="black_stm32f407ve"
+  - TEST_PLATFORM="BIGTREE_SKR_PRO"
+  #- TEST_PLATFORM="STM32F7"
   - TEST_PLATFORM="teensy31"
   - TEST_PLATFORM="teensy35"
-  - TEST_PLATFORM="linux_native"
-  - TEST_PLATFORM="esp32"
-  - TEST_PLATFORM="alfawise_U20"
-  - TEST_PLATFORM="black_stm32f407ve"
-  - TEST_PLATFORM="adafruit_grandcentral_m4"
 
 before_install:
   #
diff --git a/buildroot/share/git/mftest b/buildroot/share/git/mftest
index 3960ccff59e..c2b57086ff1 100755
--- a/buildroot/share/git/mftest
+++ b/buildroot/share/git/mftest
@@ -27,6 +27,9 @@ case $TESTENV in
     lpc9) TESTENV='LPC1769' ;;
     mega) TESTENV='megaatmega2560' ;;
      stm) TESTENV='STM32F1' ;;
+     f1)  TESTENV='STM32F1' ;;
+     f4)  TESTENV='STM32F4' ;;
+     f7)  TESTENV='STM32F7' ;;
   teensy) TESTENV='teensy31' ;;
      t31) TESTENV='teensy31' ;;
      t32) TESTENV='teensy31' ;;
diff --git a/buildroot/share/tests/ARMED-tests b/buildroot/share/tests/ARMED-tests
new file mode 100644
index 00000000000..44af749a482
--- /dev/null
+++ b/buildroot/share/tests/ARMED-tests
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+#
+# Build tests for STM32F1 ARMED
+#
+
+# exit on first failure
+set -e
+
+#
+# Build with the default configurations
+#
+use_example_configs ArmEd
+exec_test $1 $2 "ArmEd Example Configuration"
+
+# clean up
+restore_configs
diff --git a/buildroot/share/tests/BIGTREE_SKR_MINI-tests b/buildroot/share/tests/BIGTREE_SKR_MINI-tests
new file mode 100644
index 00000000000..d27b1d89d0b
--- /dev/null
+++ b/buildroot/share/tests/BIGTREE_SKR_MINI-tests
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+#
+# Build tests for STM32F1 Bigtreetech
+#
+
+# exit on first failure
+set -e
+
+#
+# Build with the default configurations
+#
+restore_configs
+opt_set MOTHERBOARD BOARD_BIGTREE_SKR_E3_DIP
+exec_test $1 $2 "Default Configuration"
+
+# clean up
+restore_configs
diff --git a/buildroot/share/tests/BIGTREE_SKR_PRO-tests b/buildroot/share/tests/BIGTREE_SKR_PRO-tests
new file mode 100644
index 00000000000..d0a99679e6e
--- /dev/null
+++ b/buildroot/share/tests/BIGTREE_SKR_PRO-tests
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+#
+# Build tests for STM32F4 BigTree_SKR_Pro
+#
+
+# exit on first failure
+set -e
+
+#
+# Build with the default configurations
+#
+restore_configs
+opt_set MOTHERBOARD BOARD_BIGTREE_SKR_PRO_V1_1
+opt_set SERIAL_PORT 1
+exec_test $1 $2 "Default Configuration"
+
+# clean up
+restore_configs
diff --git a/buildroot/share/tests/LPC1768-tests b/buildroot/share/tests/LPC1768-tests
index 26dcf8f70eb..0ba62ab6a31 100755
--- a/buildroot/share/tests/LPC1768-tests
+++ b/buildroot/share/tests/LPC1768-tests
@@ -6,9 +6,12 @@
 # exit on first failure
 set -e
 
+#
+# Build with the default configurations
+#
 restore_configs
 opt_set MOTHERBOARD BOARD_RAMPS_14_RE_ARM_EFB
-exec_test $1 $2 "Build Re-ARM Default Configuration"
+exec_test $1 $2 "Default Configuration"
 
 restore_configs
 opt_set MOTHERBOARD BOARD_RAMPS_14_RE_ARM_EFB
diff --git a/buildroot/share/tests/LPC1769-tests b/buildroot/share/tests/LPC1769-tests
index 831df54f405..5d3631aae12 100755
--- a/buildroot/share/tests/LPC1769-tests
+++ b/buildroot/share/tests/LPC1769-tests
@@ -6,9 +6,11 @@
 # exit on first failure
 set -e
 
-restore_configs
+#
+# Build with the default configurations
+#
 use_example_configs Azteeg/X5GT
-exec_test $1 $2 "Azteeg X5GT Example Config"
+exec_test $1 $2 "Azteeg X5GT Example Configuration"
 
 restore_configs
 opt_set MOTHERBOARD BOARD_SMOOTHIEBOARD
diff --git a/buildroot/share/tests/STM32F1-tests b/buildroot/share/tests/STM32F1-tests
index 30cb4e4fce4..d7420a667e1 100755
--- a/buildroot/share/tests/STM32F1-tests
+++ b/buildroot/share/tests/STM32F1-tests
@@ -6,6 +6,9 @@
 # exit on first failure
 set -e
 
+#
+# Build with the default configurations
+#
 restore_configs
 opt_set MOTHERBOARD BOARD_STM32F1R
 opt_set EXTRUDERS 2
diff --git a/buildroot/share/tests/STM32F4-tests b/buildroot/share/tests/STM32F4-tests
new file mode 100644
index 00000000000..b5beb736637
--- /dev/null
+++ b/buildroot/share/tests/STM32F4-tests
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+#
+# Build tests for STM32F4 disco_f407vg
+#
+
+# exit on first failure
+set -e
+
+#
+# Build with the default configurations
+#
+use_example_configs STM32/STM32F4
+exec_test $1 $2 "STM32F4 Default Configuration"
+
+# clean up
+restore_configs
diff --git a/buildroot/share/tests/STM32F7-tests b/buildroot/share/tests/STM32F7-tests
new file mode 100644
index 00000000000..281222f1563
--- /dev/null
+++ b/buildroot/share/tests/STM32F7-tests
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+#
+# Build tests for STM32F7
+#
+
+# exit on first failure
+set -e
+
+#
+# Build with the default configurations
+#
+restore_configs
+opt_set MOTHERBOARD BOARD_REMRAM_V1
+opt_set SERIAL_PORT 1
+exec_test $1 $2 "Default Configuration"
+
+# clean up
+restore_configs
diff --git a/buildroot/share/tests/adafruit_grandcentral_m4-tests b/buildroot/share/tests/adafruit_grandcentral_m4-tests
index 453cefc6ce2..fb8220f7dce 100644
--- a/buildroot/share/tests/adafruit_grandcentral_m4-tests
+++ b/buildroot/share/tests/adafruit_grandcentral_m4-tests
@@ -6,6 +6,9 @@
 # exit on first failure
 set -e
 
+#
+# Build with the default configurations
+#
 restore_configs
 opt_set MOTHERBOARD BOARD_AGCM4_RURAMPS4D_13
 exec_test $1 $2 "Build Grand Central M4 Default Configuration"
diff --git a/buildroot/share/tests/at90usb1286_cdc-tests b/buildroot/share/tests/at90usb1286_cdc-tests
new file mode 100644
index 00000000000..812e2ebcae3
--- /dev/null
+++ b/buildroot/share/tests/at90usb1286_cdc-tests
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+#
+# Build tests for AT90USB1286 ARMED
+#
+
+# exit on first failure
+set -e
+
+#
+# Build with the default configurations
+#
+restore_configs
+opt_set MOTHERBOARD BOARD_BRAINWAVE_PRO
+exec_test $1 $2 "Default Configuration"
+
+# clean up
+restore_configs
diff --git a/buildroot/share/tests/at90usb1286_dfu-tests b/buildroot/share/tests/at90usb1286_dfu-tests
new file mode 100644
index 00000000000..7571994ec47
--- /dev/null
+++ b/buildroot/share/tests/at90usb1286_dfu-tests
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+#
+# Build tests for AT90USB1286 ARMED
+#
+
+# exit on first failure
+set -e
+
+#
+# Build with the default configurations
+#
+restore_configs
+opt_set MOTHERBOARD BOARD_PRINTRBOARD
+exec_test $1 $2 "Default Configuration"
+
+# clean up
+restore_configs
diff --git a/buildroot/share/tests/esp32-tests b/buildroot/share/tests/esp32-tests
index 42466fddf6e..361750141bd 100755
--- a/buildroot/share/tests/esp32-tests
+++ b/buildroot/share/tests/esp32-tests
@@ -6,6 +6,9 @@
 # exit on first failure
 set -e
 
+#
+# Build with the default configurations
+#
 restore_configs
 opt_set MOTHERBOARD BOARD_ESP32
 opt_enable WIFISUPPORT GCODE_MACROS BAUD_RATE_GCODE
diff --git a/buildroot/share/tests/fysetc_STM32F1-tests b/buildroot/share/tests/fysetc_STM32F1-tests
new file mode 100644
index 00000000000..ad0f5ea81bd
--- /dev/null
+++ b/buildroot/share/tests/fysetc_STM32F1-tests
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+#
+# Build tests for STM32F1 FYSETC
+#
+
+# exit on first failure
+set -e
+
+#
+# Build with the default configurations
+#
+use_example_configs "FYSETC/Cheetah 1.2/base"
+exec_test $1 $2 "Cheetah 1.2 Configuration"
+
+# clean up
+restore_configs
diff --git a/buildroot/share/tests/fysetc_f6_13-tests b/buildroot/share/tests/fysetc_f6_13-tests
new file mode 100644
index 00000000000..5ddbac554e7
--- /dev/null
+++ b/buildroot/share/tests/fysetc_f6_13-tests
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+#
+# Build tests for AVR ATmega FYSETC F6 1.3
+#
+
+# exit on first failure
+set -e
+
+#
+# Build with the default configurations
+#
+restore_configs
+opt_set MOTHERBOARD BOARD_FYSETC_F6_13
+exec_test $1 $2 "Default Configuration"
+
+# clean up
+restore_configs
diff --git a/buildroot/share/tests/jgaurora_a5s_a1-tests b/buildroot/share/tests/jgaurora_a5s_a1-tests
new file mode 100644
index 00000000000..c6cc9e3f9c9
--- /dev/null
+++ b/buildroot/share/tests/jgaurora_a5s_a1-tests
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+#
+# Build tests for STM32F103ZE JGAurora A5S A1
+#
+
+# exit on first failure
+set -e
+
+#
+# Build with the default configurations
+#
+use_example_configs JGAurora/A5S
+exec_test $1 $2 "JGAurora/A5S Configuration"
+
+# clean up
+restore_configs
diff --git a/buildroot/share/tests/linux_native-tests b/buildroot/share/tests/linux_native-tests
index 1ea3fd5bb68..38f531dadc4 100755
--- a/buildroot/share/tests/linux_native-tests
+++ b/buildroot/share/tests/linux_native-tests
@@ -6,6 +6,9 @@
 # exit on first failure
 set -e
 
+#
+# Build with the default configurations
+#
 restore_configs
 opt_set MOTHERBOARD BOARD_LINUX_RAMPS
 opt_set TEMP_SENSOR_BED 1
diff --git a/buildroot/share/tests/malyanm200-tests b/buildroot/share/tests/malyanm200-tests
new file mode 100644
index 00000000000..3856d058669
--- /dev/null
+++ b/buildroot/share/tests/malyanm200-tests
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+#
+# Build tests for STM32F1 malyanM200
+#
+
+# exit on first failure
+set -e
+
+use_example_configs Malyan/M200
+exec_test $1 $2 "Default Configuration"
+
+# cleanup
+restore_configs
diff --git a/buildroot/share/tests/megaatmega1280-tests b/buildroot/share/tests/megaatmega1280-tests
new file mode 100644
index 00000000000..ec30d478d59
--- /dev/null
+++ b/buildroot/share/tests/megaatmega1280-tests
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+#
+# Build tests for AVR ATmega1280
+#
+
+# exit on first failure
+set -e
+
+#
+# Build with the default configurations
+#
+restore_configs
+exec_test $1 $2 "Default Configuration"
+
+# clean up
+restore_configs
diff --git a/buildroot/share/tests/megaatmega2560-tests b/buildroot/share/tests/megaatmega2560-tests
index 740c17e8b78..a1c10a4942c 100755
--- a/buildroot/share/tests/megaatmega2560-tests
+++ b/buildroot/share/tests/megaatmega2560-tests
@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 #
-# Build tests for AVR
+# Build tests for AVR ATmega2560
 #
 
 # exit on first failure
diff --git a/buildroot/share/tests/mks_robin-tests b/buildroot/share/tests/mks_robin-tests
new file mode 100644
index 00000000000..99d41ef4ad5
--- /dev/null
+++ b/buildroot/share/tests/mks_robin-tests
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+#
+# Build tests for STM32F1 genericSTM32F103ZE
+#
+
+# exit on first failure
+set -e
+
+use_example_configs Mks/Robin
+exec_test $1 $2 "Default Configuration"
+
+# cleanup
+restore_configs
diff --git a/buildroot/share/tests/mks_robin_lite-tests b/buildroot/share/tests/mks_robin_lite-tests
new file mode 100644
index 00000000000..a50d7347f5b
--- /dev/null
+++ b/buildroot/share/tests/mks_robin_lite-tests
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+#
+# Build tests for STM32F1 genericSTM32F103RC
+#
+
+# exit on first failure
+set -e
+
+use_example_configs Mks/Robin
+opt_set MOTHERBOARD BOARD_MKS_ROBIN_LITE
+opt_set EXTRUDERS 1
+opt_set TEMP_SENSOR_1 0
+opt_disable FSMC_GRAPHICAL_TFT
+exec_test $1 $2 "Default Configuration"
+
+# cleanup
+restore_configs
diff --git a/buildroot/share/tests/mks_robin_mini-tests b/buildroot/share/tests/mks_robin_mini-tests
new file mode 100644
index 00000000000..c8ba5a5a487
--- /dev/null
+++ b/buildroot/share/tests/mks_robin_mini-tests
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+#
+# Build tests for STM32F1 genericSTM32F103VE
+#
+
+# exit on first failure
+set -e
+
+use_example_configs Mks/Robin
+opt_set MOTHERBOARD BOARD_MKS_ROBIN_MINI
+opt_set EXTRUDERS 1
+opt_set TEMP_SENSOR_1 0
+exec_test $1 $2 "Default Configuration"
+
+# cleanup
+restore_configs
diff --git a/buildroot/share/tests/mks_robin_nano-tests b/buildroot/share/tests/mks_robin_nano-tests
new file mode 100644
index 00000000000..809fd6e6f50
--- /dev/null
+++ b/buildroot/share/tests/mks_robin_nano-tests
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+#
+# Build tests for STM32F1 genericSTM32F103VE
+#
+
+# exit on first failure
+set -e
+
+use_example_configs Mks/Robin
+opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO
+exec_test $1 $2 "Default Configuration"
+
+# cleanup
+restore_configs
diff --git a/buildroot/share/tests/rambo-tests b/buildroot/share/tests/rambo-tests
new file mode 100644
index 00000000000..649a0801dc2
--- /dev/null
+++ b/buildroot/share/tests/rambo-tests
@@ -0,0 +1,21 @@
+#!/usr/bin/env bash
+#
+# Build tests for AVR ATmega2560 RAMBo
+#
+
+# exit on first failure
+set -e
+
+#
+# Build with the default configurations
+#
+restore_configs
+opt_set MOTHERBOARD BOARD_EINSY_RAMBO
+opt_set X_DRIVER_TYPE TMC2130
+opt_set Y_DRIVER_TYPE TMC2130
+opt_set Z_DRIVER_TYPE TMC2130
+opt_set E0_DRIVER_TYPE TMC2130
+exec_test $1 $2 "Default Configuration"
+
+# clean up
+restore_configs
diff --git a/buildroot/share/tests/sanguino_atmega1284p-tests b/buildroot/share/tests/sanguino_atmega1284p-tests
new file mode 100644
index 00000000000..7181f961c48
--- /dev/null
+++ b/buildroot/share/tests/sanguino_atmega1284p-tests
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+#
+# Build tests for AVR ATmega 1284p
+#
+
+# exit on first failure
+set -e
+
+#
+# Build with the default configurations
+#
+restore_configs
+opt_set MOTHERBOARD BOARD_SANGUINOLOLU_12
+exec_test $1 $2 "Default Configuration"
+
+# clean up
+restore_configs
diff --git a/buildroot/share/tests/sanguino_atmega644p-tests b/buildroot/share/tests/sanguino_atmega644p-tests
new file mode 100644
index 00000000000..41626b23f70
--- /dev/null
+++ b/buildroot/share/tests/sanguino_atmega644p-tests
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+#
+# Build tests for AVR ATmega 644p
+#
+
+# exit on first failure
+set -e
+
+#
+# Build with the default configurations
+#
+restore_configs
+opt_set MOTHERBOARD BOARD_SANGUINOLOLU_12
+exec_test $1 $2 "Default Configuration"
+
+# clean up
+restore_configs