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

make -C testsuite parallel always runs tests in subdirs #12744

Conversation

ncik-roberts
Copy link
Contributor

@ncik-roberts ncik-roberts commented Nov 14, 2023

Make it so make -C testsuite parallel runs all tests in all (recursive) subdirectories of testsuite/tests. Previously, the test runner wouldn't descend recursively into subdirectories if the parent directory had any tests at all. This meant that one test wasn't being run by make -C testsuite parallel and so wasn't being run in CI (e.g. this recent run).

That test: testsuite/tests/tool-toplevel/known-bugs/broken_rec_in_show.ml

Prior to this PR, that test would not be run by either of these invocations:

  • make -C testsuite parallel
  • make -C testsuite one DIR=tests/tool-toplevel

Now, both of those invocations will run that test. You can verify this yourself in the CI logs, or by modifying the test locally and confirming that the error is raised by those invocations.

An alternative approach: moving that test up one level of directory structure. This PR's approach is preventative and helps avoid this mistake in the future.

if [ -d $$dir ]; then \
$(MAKE) exec-one DIR=$$dir; \
fi; \
done
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't we use $(ocamltest) -find-test-dirs $(DIR) here, like we do in the new-without-report (called by make all) target?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've made this change. Thanks -- this makes the makefile less complicated.

Copy link
Contributor

@nojb nojb left a comment

Choose a reason for hiding this comment

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

LGTM

@gasche gasche merged commit d1cb680 into ocaml:trunk Nov 15, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants