Skip to content

tools: Reorder test configuration priority #6805

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 8, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
sys.path.insert(0, ROOT)

from tools.config import ConfigException
from tools.config import ConfigException, Config
from tools.test_api import test_path_to_name, find_tests, get_test_config, print_tests, build_tests, test_spec_from_test_builds
import tools.test_configs as TestConfig
from tools.test_configs import get_default_config
from tools.options import get_default_options_parser, extract_profile, extract_mcus
from tools.build_api import build_project, build_library
from tools.build_api import print_build_memory_usage
Expand Down Expand Up @@ -144,10 +144,13 @@
config = get_test_config(options.test_config, mcu)
if not config:
args_error(parser, "argument --test-config contains invalid path or identifier")
elif not options.app_config:
config = TestConfig.get_default_config(options.source_dir or ['.'], mcu)
else:
elif options.app_config:
config = options.app_config
else:
config = Config.find_app_config(options.source_dir)

if not config:
config = get_default_config(options.source_dir or ['.'], mcu)

# Find all tests in the relevant paths
for path in all_paths:
Expand Down