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

No tests by default #11317

Closed
wants to merge 3 commits into from
Closed

Conversation

gaudetja
Copy link

Creating to try and help out #6511

@@ -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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Hm?

Copy link
Author

Choose a reason for hiding this comment

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

Should be fixed

@@ -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())
Copy link
Contributor

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?

Copy link
Author

Choose a reason for hiding this comment

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

Should be fixed

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)
Copy link
Contributor

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?

Copy link
Author

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

if file.name in ('sitemap.txt', 'meson-test-run.txt'):
continue
check_file(root / file)

Copy link
Contributor

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?

Copy link
Author

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!

@gaudetja gaudetja force-pushed the no-tests-by-default branch from 09f2476 to a9ccc13 Compare January 23, 2023 17:57
@gaudetja
Copy link
Author

@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!

@gaudetja gaudetja force-pushed the no-tests-by-default branch from cc347b1 to a4937cb Compare January 23, 2023 20:43
Copy link
Contributor

@tristan957 tristan957 left a 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?

@@ -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...')
Copy link
Contributor

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')
Copy link
Contributor

Choose a reason for hiding this comment

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

Why remove this?

@gaudetja gaudetja closed this Apr 26, 2023
@tristan957
Copy link
Contributor

Why close?

@bonzini bonzini reopened this Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants