Skip to content
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

[tools] Fix build test discovery (not enough arguments) #2285

Closed
wants to merge 1 commit into from
Closed
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
8 changes: 6 additions & 2 deletions tools/build_everything.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,12 @@
base_source_paths = options.source_dir
if not base_source_paths:
base_source_paths = ['.']

all_tests = find_tests(base_source_paths[0])

all_tests = {}
for platform in platforms:
for toolchain in toolchains:
platform_toolchain_tests = find_tests(base_source_paths[0], platform, toolchain)
all_tests.update(platform_toolchain_tests)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because tests now change between targets and toolchains, this really needs to be moved above the build_tests call inside the main build loop. Otherwise this will try to compile tests that aren't valid for certain combinations of targets and toolchains.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't find_tests() care of this? I just recently started looking at the build system and I'm not that familiar with general architecture but this seems to me good idea regarding separation of concern.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It used to be that this was the case. The tests that were ran were always the same for every target and toolchain. But now certain boards have certain "features" that other boards don't support. There could (and should) be tests under these feature folders that should only be built/tested if the board supports this feature. So this is why test discovery is now dependent on target and toolchain.


start = time()
build_report = {}
Expand Down