From 620a7e27921c733b32cf77f202cc3085a7e6acff Mon Sep 17 00:00:00 2001
From: Brendan Bartels <bbartels@iastate.edu>
Date: Sat, 1 Apr 2017 09:39:23 -0500
Subject: [PATCH] quad: run make deep-clean on ci test

- also add some prints to scripts to help with debugging
---
 ci-test.sh                               | 2 +-
 quad/Makefile                            | 4 ++--
 quad/scripts/tests/test_safety_checks.rb | 6 ++++--
 quad/scripts/tests/test_unix_uart.rb     | 4 ++++
 4 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/ci-test.sh b/ci-test.sh
index c79ad9703..2b8060ce4 100644
--- a/ci-test.sh
+++ b/ci-test.sh
@@ -4,4 +4,4 @@ set -e
 export PATH=/usr/local/bin:$PATH
 
 # Quad
-(cd quad && make test)
+(cd quad && make deep-clean && make && make test)
diff --git a/quad/Makefile b/quad/Makefile
index b55274815..f27a39d37 100644
--- a/quad/Makefile
+++ b/quad/Makefile
@@ -38,8 +38,8 @@ test: all
 	$(MAKE) -C src/queue test
 	$(MAKE) -C src/computation_graph test
 	$(MAKE) -C src/quad_app test
-	#ruby scripts/tests/test_safety_checks.rb
-	#ruby scripts/tests/test_unix_uart.rb
+	ruby scripts/tests/test_safety_checks.rb
+	ruby scripts/tests/test_unix_uart.rb
 
 clean:
 	rm -rf $(INCDIR) $(LIBDIR) $(OUTDIR) $(EXEDIR)
diff --git a/quad/scripts/tests/test_safety_checks.rb b/quad/scripts/tests/test_safety_checks.rb
index f4e690495..38ca35008 100644
--- a/quad/scripts/tests/test_safety_checks.rb
+++ b/quad/scripts/tests/test_safety_checks.rb
@@ -78,6 +78,8 @@ def check_led(on)
   assert_equal(led, on)
 end
 
+puts("Setting up...")
+
 script_dir = File.expand_path(File.dirname(__FILE__))
 bin_dir = script_dir + "/../../bin/"
 Dir.chdir(bin_dir)
@@ -92,8 +94,8 @@ sleep 1
 #################
 
 begin
-  puts("beginning tests")
-  
+  puts("Beginning tests...")
+
   # Set gravity
   File.write(I2C_MPU_ACCEL_Z, -1 * GRAVITY)
 
diff --git a/quad/scripts/tests/test_unix_uart.rb b/quad/scripts/tests/test_unix_uart.rb
index 6621744e3..d26ed7e66 100644
--- a/quad/scripts/tests/test_unix_uart.rb
+++ b/quad/scripts/tests/test_unix_uart.rb
@@ -17,6 +17,8 @@ require 'test/unit/assertions'
 require 'thread'
 include Test::Unit::Assertions
 
+puts("Setting up...")
+
 script_dir = File.expand_path(File.dirname(__FILE__))
 bin_dir = script_dir + "/../../bin/"
 Dir.chdir(bin_dir)
@@ -32,6 +34,8 @@ sleep 1
 
 begin
 
+  puts("Beginning tests...")
+
   # Flip gear on
   File.write(GEAR, GEAR_ON)
   sleep 0.015
-- 
GitLab