Repository navigation
Run all build system tests from make test-build #9445
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
bab23ad
Run all build system tests from make test-build
cknitt f19ec24
Keep the integration suite running when no process matches on Windows
cknitt 7bdd4e0
Let the integration suite run alongside the other build tests
cknitt 8e72784
Catch leftover watchers again in the integration target
cknitt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| - `make test-build` runs all build system tests (unit, isolated and integration) through `tests/build_tests/Makefile`, whose targets CI calls; `scripts/test.js -build` is now `-projects`. |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| SHELL = /bin/bash | ||
|
|
||
| # The build system's tests (see README.md). `make test-build` at the | ||
| # repository root builds the toolchain and runtime and then runs `test`; CI | ||
| # runs the targets one at a time. RESCRIPT is the executable under test, by | ||
| # default the one in the platform package; pass an absolute path to override. | ||
|
|
||
| ROOT := $(abspath ../..) | ||
| # Relative, so that a make that spells paths the MSYS way still gives node | ||
| # a path it can resolve. | ||
| RESCRIPT ?= $(shell node -p "require('../../cli/common/bins.cjs').rescript_exe") | ||
|
|
||
| test: unit snapshots verbose interactive isolated integration | ||
|
|
||
| # OUnit tests of the build system's modules. The executable runs directly, not | ||
| # through `dune test`, so a stuck test still shows its progress. | ||
| unit: | ||
| cd $(ROOT) && dune build tests/build_tests/unit/build_system_tests_main.exe | ||
| $(ROOT)/_build/default/tests/build_tests/unit/build_system_tests_main.exe -runner sequential | ||
|
|
||
| # Output snapshots of configuration acceptance and command validation, and the | ||
| # check that suite.sh runs every integration script. On Windows CI they run | ||
| # under a watchdog that stops runaway processes. | ||
| snapshots: | ||
| . isolated/process_watchdog.sh && start_process_watchdog && \ | ||
| bash isolated/check_integration_test_coverage.sh && \ | ||
| bash isolated/check_config_acceptance.sh "$(RESCRIPT)" && \ | ||
| bash isolated/check_command_validation.sh "$(RESCRIPT)" | ||
|
|
||
| verbose: | ||
| bash isolated/check_verbose_output.sh "$(RESCRIPT)" | ||
|
|
||
| # Needs the `script` PTY, which Windows lacks. | ||
| interactive: | ||
| bash isolated/check_interactive_output.sh "$(RESCRIPT)" | ||
|
|
||
| isolated: | ||
| sh isolated/run.sh "$(RESCRIPT)" | ||
|
|
||
| # The suite fails when another process runs its executable as it starts, so it | ||
| # runs a copy of the binaries: the other suites, run alongside it with -j or by | ||
| # another make, use the original. The copy's path is always the same, so a | ||
| # watcher left by an interrupted earlier run still counts as a leftover, and | ||
| # the next run replaces it. | ||
| INTEGRATION_BIN := $(ROOT)/tmp/integration-bin | ||
|
|
||
| integration: | ||
| rm -rf "$(INTEGRATION_BIN)" | ||
| mkdir -p "$(INTEGRATION_BIN)" | ||
| cp -R "$$(dirname "$(RESCRIPT)")"/. "$(INTEGRATION_BIN)" | ||
| ./integration/suite.sh "$(INTEGRATION_BIN)/$$(basename "$(RESCRIPT)")" | ||
|
|
||
| .PHONY: test unit snapshots verbose interactive isolated integration | ||
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.