-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
No tests by default #11317
No tests by default #11317
Conversation
1fa07db
to
09f2476
Compare
mesonbuild/mtest.py
Outdated
@@ -1,6 +1,3 @@ | |||
# Copyright 2016-2017 The Meson development team | |||
|
|||
# Licensed under the Apache License, Version 2.0 (the "License"); | |||
# you may not use this file except in compliance with the License. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fixed
mesonbuild/backend/vs2010backend.py
Outdated
@@ -363,7 +363,7 @@ def generate_solution_dirs(self, ofile, parents): | |||
|
|||
def generate_solution(self, sln_filename, projlist): | |||
default_projlist = self.get_build_by_default_targets() | |||
default_projlist.update(self.get_testlike_targets()) | |||
default_projlist.update(self.get_test_targets()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the motivation for this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fixed
mesonbuild/backend/ninjabackend.py
Outdated
for t in self.get_testlike_targets(benchmark=False).values(): | ||
test_targetlist.append(os.path.join(self.get_target_dir(t), t.get_outputs()[0])) | ||
|
||
test_elem = NinjaBuildElement(self.all_outputs, 'meson-build-tests', 'phony', test_targetlist) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why rename meson-test-prereq and meson-enchmark-prereq? Isn't the relevant thing to change here just whether to do the
if targ == 'all':
targetlist.extend(['meson-test-prereq', 'meson-benchmark-prereq'])
piece?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call! I've taken a deeper dive on the fix, and tried to stay as close as I could to the paradigms of the current code
run_project_tests.py
Outdated
if file.name in ('sitemap.txt', 'meson-test-run.txt'): | ||
continue | ||
check_file(root / file) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This, and a few other bits, seems independent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mistakes from rebasing old changesets; thanks for your patience!
09f2476
to
a9ccc13
Compare
@anarazel Thank you for the quick review, and for dealing with my limited understanding of the meson code! I've changed my approach to just be derivative of @dcbaker. I'll admit I got a bit lost during the rebase since I was not familiar with the original source, or the fix. This should be a bit closer to the paradigms currently in use! |
cc347b1
to
a4937cb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be worth having a release notes snippet and maybe some documentation?
run_project_tests.py
Outdated
@@ -1430,6 +1438,11 @@ def check_meson_commands_work(use_tmpdir: bool, extra_args: T.List[str]) -> None | |||
pc, o, e = Popen_safe(compile_commands + dir_args, cwd=build_dir) | |||
if pc.returncode != 0: | |||
raise RuntimeError(f'Failed to build {testdir!r}:\n{e}\n{o}') | |||
print('Checking that building tests works...') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need to be removed
@@ -1,8 +1,7 @@ | |||
# Comment on the first line | |||
project('trivial test', | |||
# Comment inside a function call + array for language list | |||
['c'], default_options: ['buildtype=debug'], | |||
meson_version : '>=0.52.0') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove this?
Why close? |
Creating to try and help out #6511