Skip to content

Testing improvements, break up repl/plugins tests, add TAP output to repl characterisation tests - #16421

Open
xokdvium wants to merge 6 commits into
masterfrom
break-up-repl-plugins-tests-tap
Open

Testing improvements, break up repl/plugins tests, add TAP output to repl characterisation tests#16421
xokdvium wants to merge 6 commits into
masterfrom
break-up-repl-plugins-tests-tap

Conversation

@xokdvium

@xokdvium xokdvium commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Motivation

I decided to start doing more things to battle our test suite, which is starting to look more like an incoherent collection of disorganized trash.

Things done:

  • Break up the monolithic repl.sh into a separate test suite. REPL/debugger characterisation now lives in a separate test, which I also implemented TAP (https://testanything.org/tap-version-14-specification.html) output for. See the last commit for details and example output.
  • Move the plugins test suite out of the main test suite directory to (tentatively the new canonical location for test suites under tests/functional/suites/). Also split up the directory structure there into a src/ tree and separate tests.
  • Re-enable daemon install tests, which should now work fine.
  • Silence git warnings about default branch name + deduplicate repo creation.

Context

For SHA256 git support that I want to do once libgit2 2.0 is finally out (#16349 was the latest bit) I'd also want to apply the same treatment to all git fetching tests so that we can exercise both object formats equally well. Hence why I decided to start small and do the smaller test suites first. Everything else should easily follow.

lang/ and other characterisation tests should also benefit pretty nicely from TAP support, but I'm going to leave that for later.


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

…bdirectory

It was already a separate test suite, just inexplicably located in the top-level
directory.

Split up the tests and simplify the common.sh setup machinery with the help of BASH_ENV.
To get rid of:

hint: Using 'master' as the name for the initial branch. This default branch name
hint: will change to "main" in Git 3.0.

Changing that from master breaks the tests.

Also dedups test to use createGitRepo
That file is entirely too large and unmanageable. The stack size ulimit
issue was fixed too, though I'm not too sure how. I was able to reproduce
that but it was gone after the reorganisation and changing the directory
structure.

The remaining repl.sh test stay as is because they do building and are
also relevant to CA test suite, which re-runs it with a different config.
@xokdvium
xokdvium requested a review from edolstra as a code owner September 3, 2026 20:58
@github-actions github-actions Bot added the with-tests Issues related to testing. PRs with tests have some priority label Sep 3, 2026
@xokdvium
xokdvium force-pushed the break-up-repl-plugins-tests-tap branch from e83b498 to 35c5468 Compare September 3, 2026 21:08
This provides much more legible output:

1/1 repl - nix-functional-tests:characterisation        OK               1.40s   35 subtests passed

Or with verbose mode:

▶ 1/1 multiline-string-function-binding                 OK
▶ 1/1 multiple-bindings-same-line                       OK
▶ 1/1 nested-attr-path                                  OK
▶ 1/1 pretty-print-idempotent                           OK
▶ 1/1 printing                                          OK
1/1 repl - nix-functional-tests:characterisation        OK               1.40s   35 subtests passed
@xokdvium
xokdvium force-pushed the break-up-repl-plugins-tests-tap branch from 35c5468 to 316bbdd Compare September 3, 2026 21:11
Comment thread tests/functional/repl.sh
Comment on lines -28 to -34
# FIXME: repl tests fail on systems with stack limits
stack_ulimit="$(ulimit -Hs)"
stack_required="$((64 * 1024 * 1024))"
if [[ "$stack_ulimit" != "unlimited" ]]; then
((stack_ulimit < stack_required)) && skipTest "repl tests cannot run on systems with stack size <$stack_required ($stack_ulimit)"
fi

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This got fixed somehow.... maybe worth digging into

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

with-tests Issues related to testing. PRs with tests have some priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant