From cc582ce38c5fd2ad19a27ff7e31218f286c1cbdc Mon Sep 17 00:00:00 2001 From: "Matthew D. Scholefield" Date: Thu, 31 May 2018 19:17:26 -0500 Subject: [PATCH] Fix starting skillstest via start-mycroft.sh This also removes the ability to pass the skills dir as the first argument. Instead this was moved to an environment variable called SKILLS_DIR to prevent conflict with pytest arguments --- test/integrationtests/skills/discover_tests.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/integrationtests/skills/discover_tests.py b/test/integrationtests/skills/discover_tests.py index baa689e006..37f5ab09c5 100644 --- a/test/integrationtests/skills/discover_tests.py +++ b/test/integrationtests/skills/discover_tests.py @@ -17,7 +17,6 @@ import pytest import glob import os from os.path import exists, join, expanduser -import sys import imp from mycroft.configuration import Configuration @@ -64,11 +63,13 @@ def discover_tests(skills_dir): def get_skills_dir(): - if len(sys.argv) > 1: - return expanduser(sys.argv[-1]) - - return expanduser(join(Configuration.get()['data_dir'], - Configuration.get()['skills']['msm']['directory'])) + return ( + expanduser(os.environ.get('SKILLS_DIR', '')) or + expanduser(join( + Configuration.get()['data_dir'], + Configuration.get()['skills']['msm']['directory'] + )) + ) skills_dir = get_skills_dir()