Skip to content

Make runtest work for external tests again#4704

Merged
bdbaddog merged 3 commits intoSCons:masterfrom
mwichmann:runtest/external
Apr 3, 2025
Merged

Make runtest work for external tests again#4704
bdbaddog merged 3 commits intoSCons:masterfrom
mwichmann:runtest/external

Conversation

@mwichmann
Copy link
Copy Markdown
Collaborator

An earlier rework had caused external directories not to be searched, even if specified in combination with --external.

Fixes #4699.

Contributor Checklist:

  • I have created a new test or updated the unit tests to cover the new/changed functionality.
  • I have updated CHANGES.txt and RELEASE.txt (and read the README.rst).
  • I have updated the appropriate documentation

An earlier rework had caused external directories not to be searched,
even if specified in combination with --external.

Fixes SCons#4699.

Signed-off-by: Mats Wichmann <mats@linux.com>
@mwichmann mwichmann added the testsuite Things that only affect the SCons testing. Do not use just because a PR has tests. label Apr 2, 2025
@bdbaddog
Copy link
Copy Markdown
Contributor

bdbaddog commented Apr 3, 2025

@mwichmann simplified path specifications as much as possible in calls to test framework.


test = TestRuntest.TestRuntest()
test.subdir('ext', ['ext', 'test'], ['ext', 'test', 'subdir'])
test.subdir('ext/test/subdir')
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I thought you had to "declare" (create) all the test directories, since I've seen it done that way? This was a quick copy-and-mod of test/runtest/testargv.py, by the way. Ah, I see now the subdir docstring does talk about making intermediates, too.

@bdbaddog
Copy link
Copy Markdown
Contributor

bdbaddog commented Apr 3, 2025 via email

@mwichmann
Copy link
Copy Markdown
Collaborator Author

Nope. It calls makedirs() under the hood.

Got it. I thought there was more to it than just make sure the directory exists, and don't know where I got that idea from. Maybe I'll clean up the other runtest tests someday, but of course I have no objection to the change you made - I just copied a test and hacked it without doing further examination.

@bdbaddog bdbaddog merged commit 48ca5f9 into SCons:master Apr 3, 2025
6 of 8 checks passed
@mwichmann mwichmann added this to 4.10 Apr 3, 2025
@mwichmann mwichmann moved this to Done in 4.10 Apr 3, 2025
@mwichmann mwichmann added this to the NextRelease milestone Apr 3, 2025
@mwichmann mwichmann deleted the runtest/external branch April 3, 2025 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testsuite Things that only affect the SCons testing. Do not use just because a PR has tests.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

runtest does not find tests in some cases

2 participants