move test-rig.yaml to tools/

This commit is contained in:
Samuel Sadok
2018-03-23 20:21:25 -07:00
parent 765e63af01
commit 0784bd3413
3 changed files with 6 additions and 3 deletions
+2 -2
View File
@@ -24,11 +24,11 @@ def test_assert_eq(observed, expected, range=None, accuracy=None):
def run(command_line, logger, timeout=None):
"""
Runs a shell command in the Firmware directory
Runs a shell command in the current directory
"""
logger.debug("invoke: " + command_line)
cmd = shlex.split(command_line)
result = subprocess.run(cmd, cwd='../Firmware', timeout=timeout,
result = subprocess.run(cmd, timeout=timeout,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
if result.returncode != 0:
+4 -1
View File
@@ -35,9 +35,12 @@ all_tests = [
logger = Logger()
with open('test-rig.yaml', 'r') as file_stream:
script_path=os.path.dirname(os.path.realpath(__file__))
with open(script_path + '/test-rig.yaml', 'r') as file_stream:
test_rig_yaml = yaml.load(file_stream)
os.chdir(script_path + '/../Firmware')
# Ensure every device has a name
for idx, odrv_yaml in enumerate(test_rig_yaml['odrives']):
if not 'name' in odrv_yaml: