Local runner - round 3 - #296
Open
kaste wants to merge 12 commits into
Open
Conversation
Build an exclude manifest from Git's standard ignore rules and pass it to rsync when copying a package into the Docker test environment. Retain the existing sync behavior outside Git repositories and for callers that do not provide a manifest.
Move temporary-file cleanup into a context-managed manifest object and use its optional path when constructing the Docker command.
Translate Git's ignored paths into rsync filter rules and include an explicitly selected test file without copying its ignored siblings.
Report repeated --file options instead of silently using only the final value.
Forward tests_dir and pattern through scheduled syntax runs and use them to narrow syntax test and compatibility resources within the selected package.
Add an opt-in fail_if_no_resources setting while preserving the existing failure behavior by default. Forward it through scheduled syntax runs.
Run unit tests, syntax tests and syntax compatibility checks by default. For selected files (`--file`), naivly infer the category. Allow categories to be disabled (the `--no-*` args) and coordinate category runs through the shared CI scripts.
Let tests_dir and pattern constrain every enabled test category instead of implicitly selecting unit tests.
Write selected categories to one schedule with distinct result files. Run synchronous checks before potentially deferred unit tests, aggregate their output and stop Sublime only after every category completes. This removes repeated startup and shutdown costs from the default Docker run while preserving standalone category behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR has three parts.
First three commits tell docker/rsync to not sync gitignored files.
That is really a speed-up if you have temp files or a
.venvdirectoryin the package dir.
Then there are a couple of simple maintenance commits.
Then, the bigger feature, I teach the runner to run syntax tests.
E.g.
ut-run-tests .will now run unit tests, syntax tests, and syntaxcompatibility tests in one go, (
--no-unit-tests --no-syntax-tests --no-syntax-compatibility-checksto tweak the default.) and the--filewill work by our naming conventions
In general, only docker/ and sbin/ files have been touched, but the syntax tests
need a small extension to unittesting/syntax.py:
By default, these commands failed loud ("red") if invoked and no tests could
be found. (Unlike UnitTesting, which just says "0 tests run. OK.")
This behavior can now be flipped by using the option
fail_if_no_resources.Without that change we would need to duplicate the
find_resourceslogic inthe runner, so that it only invokes the actual tests if such resources can be
found. That seemed like needless duplication.
We allow
patternandtests_dirfor these commands now as well. This isto support file selection (
--file).Example