Skip to content
Snippets Groups Projects
Commit 7f3359ca authored by bbartels's avatar bbartels
Browse files

quad: run make deep-clean on ci test

- Add some prints to scripts to help with debugging
- Add sleep statements to ensure process spanws correctly
- Add more time to allow changes to take effect
parent c123eeb9
No related branches found
No related tags found
No related merge requests found
...@@ -4,4 +4,4 @@ set -e ...@@ -4,4 +4,4 @@ set -e
export PATH=/usr/local/bin:$PATH export PATH=/usr/local/bin:$PATH
# Quad # Quad
(cd quad && make test) (cd quad && make deep-clean && make && make test)
...@@ -38,8 +38,8 @@ test: all ...@@ -38,8 +38,8 @@ test: all
$(MAKE) -C src/queue test $(MAKE) -C src/queue test
$(MAKE) -C src/computation_graph test $(MAKE) -C src/computation_graph test
$(MAKE) -C src/quad_app test $(MAKE) -C src/quad_app test
#ruby scripts/tests/test_safety_checks.rb ruby scripts/tests/test_safety_checks.rb
#ruby scripts/tests/test_unix_uart.rb ruby scripts/tests/test_unix_uart.rb
clean: clean:
rm -rf $(INCDIR) $(LIBDIR) $(OUTDIR) $(EXEDIR) rm -rf $(INCDIR) $(LIBDIR) $(OUTDIR) $(EXEDIR)
......
...@@ -78,10 +78,14 @@ def check_led(on) ...@@ -78,10 +78,14 @@ def check_led(on)
assert_equal(led, on) assert_equal(led, on)
end end
puts("Setting up...")
script_dir = File.expand_path(File.dirname(__FILE__)) script_dir = File.expand_path(File.dirname(__FILE__))
bin_dir = script_dir + "/../../bin/" bin_dir = script_dir + "/../../bin/"
Dir.chdir(bin_dir) Dir.chdir(bin_dir)
sleep 1
# Start virtual quad # Start virtual quad
quad = Process.spawn("./virt-quad") quad = Process.spawn("./virt-quad")
...@@ -92,8 +96,8 @@ sleep 1 ...@@ -92,8 +96,8 @@ sleep 1
################# #################
begin begin
puts("beginning tests") puts("Beginning tests...")
# Set gravity # Set gravity
File.write(I2C_MPU_ACCEL_Z, -1 * GRAVITY) File.write(I2C_MPU_ACCEL_Z, -1 * GRAVITY)
...@@ -132,7 +136,7 @@ begin ...@@ -132,7 +136,7 @@ begin
puts("Check that the LED turns on when gear is flipped on") puts("Check that the LED turns on when gear is flipped on")
# (motors should still be off because our throttle is low) # (motors should still be off because our throttle is low)
File.write(GEAR, GEAR_ON) File.write(GEAR, GEAR_ON)
sleep 0.020 sleep 0.050
check_led 1 check_led 1
check_motors_are_off check_motors_are_off
...@@ -146,7 +150,7 @@ begin ...@@ -146,7 +150,7 @@ begin
# Check that gear switch kills the motors # Check that gear switch kills the motors
# (and that light goes off) # (and that light goes off)
File.write(GEAR, GEAR_OFF) File.write(GEAR, GEAR_OFF)
sleep 0.040 sleep 0.050
check_motors_are_off check_motors_are_off
check_led 0 check_led 0
...@@ -155,7 +159,7 @@ begin ...@@ -155,7 +159,7 @@ begin
# Check that we can resume flight # Check that we can resume flight
File.write(GEAR, GEAR_ON) File.write(GEAR, GEAR_ON)
sleep 0.040 sleep 0.050
check_led 1 check_led 1
sleep 1 sleep 1
......
...@@ -17,10 +17,14 @@ require 'test/unit/assertions' ...@@ -17,10 +17,14 @@ require 'test/unit/assertions'
require 'thread' require 'thread'
include Test::Unit::Assertions include Test::Unit::Assertions
puts("Setting up...")
script_dir = File.expand_path(File.dirname(__FILE__)) script_dir = File.expand_path(File.dirname(__FILE__))
bin_dir = script_dir + "/../../bin/" bin_dir = script_dir + "/../../bin/"
Dir.chdir(bin_dir) Dir.chdir(bin_dir)
sleep 1
# Start virtual quad # Start virtual quad
quad = Process.spawn("./virt-quad") quad = Process.spawn("./virt-quad")
...@@ -32,6 +36,8 @@ sleep 1 ...@@ -32,6 +36,8 @@ sleep 1
begin begin
puts("Beginning tests...")
# Flip gear on # Flip gear on
File.write(GEAR, GEAR_ON) File.write(GEAR, GEAR_ON)
sleep 0.015 sleep 0.015
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment