fixes for integration and unit tests

Move ros logs dir so that .ulg files are not in the same directory
(mission_test.py:: get_last_log() fails otherwise)
This commit is contained in:
Beat Küng
2018-08-06 14:13:00 +02:00
committed by Lorenz Meier
parent 0edd7c93e1
commit 5363aff879
9 changed files with 50 additions and 19 deletions
@@ -60,8 +60,10 @@ def get_last_log():
try:
log_path = os.environ['PX4_LOG_DIR']
except KeyError:
log_path = os.path.join(os.environ['HOME'],
'.ros/rootfs/fs/microsd/log')
try:
log_path = os.path.join(os.environ['ROS_HOME'], 'log')
except KeyError:
log_path = os.path.join(os.environ['HOME'], '.ros/log')
last_log_dir = sorted(glob.glob(os.path.join(log_path, '*')))[-1]
last_log = sorted(glob.glob(os.path.join(last_log_dir, '*.ulg')))[-1]
return last_log