aboutsummaryrefslogtreecommitdiff
path: root/test/standalone/test_runner_path
AgeCommit message (Collapse)Author
2025-01-20std.Build: extend `test_runner` option to specify whether runner uses ↵mlugg
`std.zig.Server` The previous logic here was trying to assume that custom test runners never used `std.zig.Server` to communicate with the build runner; however, it was flawed, because modifying the `test_runner` field on `Step.Compile` would not update this flag. That might have been intentional (allowing a way for the user to specify a custom test runner which *does* use the compiler server protocol), but if so, it was a flawed API, since it was too easy to update one field without updating the other. Instead, bundle these two pieces of state into a new type `std.Build.Step.Compile.TestRunner`. When passing a custom test runner, you are now *provided* to specify whether it is a "simple" runner, or whether it uses the compiler server protocol. This is a breaking change, but is unlikely to affect many people, since custom test runners are seldom used in the wild.
2025-01-15tests: remove dead codeAndrew Kelley
2024-12-18test-standalone: migrate from deprecated std.Build APIsmlugg
2024-04-11remove deprecated LazyPath.path union tagAndrew Kelley
2024-04-10introduce std.Build.path; deprecate LazyPath.relativeAndrew Kelley
This adds the *std.Build owner to LazyPath so that lazy paths returned from a dependency can be used in the application without friction or footguns. closes #19313
2023-04-10std.Build.CompileStep: remove run() and install()Andrew Kelley
These functions are problematic in light of dependencies because they run and install, respectively, for the *owner* package rather than for the *user* package. By removing these functions, the build script is forced to provide the *Build object to associate the new step with, making everything less surprising. Unfortunately, this is a widely breaking change. see #15079
2023-03-15make the build runner and test runner talk to each otherAndrew Kelley
std.Build.addTest creates a CompileStep as before, however, this kind of step no longer actually runs the unit tests. Instead it only compiles it, and one must additionally create a RunStep from the CompileStep in order to actually run the tests. RunStep gains integration with the default test runner, which now supports the standard --listen=- argument in order to communicate over stdin and stdout. It also reports test statistics; how many passed, failed, and leaked, as well as directly associating the relevant stderr with the particular test name that failed. This separation of CompileStep and RunStep means that `CompileStep.Kind.test_exe` is no longer needed, and therefore has been removed in this commit. * build runner: show unit test statistics in build summary * added Step.writeManifest since many steps want to treat it as a warning and emit the same message if it fails. * RunStep: fixed error message that prints the failed command printing the original argv and not the adjusted argv in case an interpreter was used. * RunStep: fixed not passing the command line arguments to the interpreter. * move src/Server.zig to std.zig.Server so that the default test runner can use it. * the simpler test runner function which is used by work-in-progress backends now no longer prints to stderr, which is necessary in order for the build runner to not print the stderr as a warning message.
2023-03-15re-enable standalone tests based on build.zigAndrew Kelley
2023-01-31combine std.build and std.build.Builder into std.BuildAndrew Kelley
I've been wanting to do this for along time.
2023-01-31update build.zig API usageAndrew Kelley
2022-11-02test: add test_runner_path testdweiller