aboutsummaryrefslogtreecommitdiff
path: root/test/standalone/empty_env/build.zig
AgeCommit message (Collapse)Author
2025-11-14std.Build: don't force all children to inherit color optionMatthew Lugg
The build runner was previously forcing child processes to have their stderr colorization match the build runner by setting `CLICOLOR_FORCE` or `NO_COLOR`. This is a nice idea in some cases---for instance a simple `Run` step which we just expect to exit with code 0 and whose stderr is not being programmatically inspected---but is a bad idea in others, for instance if there is a check on stderr or if stderr is captured, in which case forcing color on the child could cause checks to fail. Instead, this commit adds a field to `std.Build.Step.Run` which specifies a behavior for the build runner to employ in terms of assigning the `CLICOLOR_FORCE` and `NO_COLOR` environment variables. The default behavior is to set `CLICOLOR_FORCE` if the build runner's output is colorized and the step's stderr is not captured, and to set `NO_COLOR` otherwise. Alternatively, colors can be always enabled, always disabled, always match the build runner, or the environment variables can be left untouched so they can be manually controlled through `env_map`. Notably, this fixes a failure when running `zig build test-cli` in a TTY (or with colors explicitly enabled). GitHub CI hadn't caught this because it does not request color, but Codeberg CI now does, and we were seeing a failure in the `zig init` test because the actual output had color escape codes in it due to 6d280dc.
2024-12-18test-standalone: migrate from deprecated std.Build APIsmlugg
2024-10-08untangle skip conditionsParzival-3141
2024-10-08revert disabling `aarch64` skipParzival-3141
I was too optimistic in disabling the aarch64 skip, assuming it was also caused by ConEmu. Unfortunately I don't have access to a machine for testing.
2024-10-08fix `standalone/empty_env` testParzival-3141
The problem seems to be ConEmu setting environment variables before executing the test process. The test passes when run in Windows CMD.
2024-06-13Change deprecated b.host to b.graph.host in tests and Zig's build.zigKrzysztof Wolicki
2024-05-27std.Build.Step.Run: account for new environment variableAndrew Kelley
Introduces `disable_zig_progress` which prevents the build runner from assigning the child process a progress node. This is needed for the empty_env test which requires the environment to be completely empty.
2024-04-11remove deprecated LazyPath.path union tagAndrew Kelley
2024-01-01zig build system: change target, compilation, and module APIsAndrew Kelley
Introduce the concept of "target query" and "resolved target". A target query is what the user specifies, with some things left to default. A resolved target has the default things discovered and populated. In the future, std.zig.CrossTarget will be rename to std.Target.Query. Introduces `std.Build.resolveTargetQuery` to get from one to the other. The concept of `main_mod_path` is gone, no longer supported. You have to put the root source file at the module root now. * remove deprecated API * update build.zig for the breaking API changes in this branch * move std.Build.Step.Compile.BuildId to std.zig.BuildId * add more options to std.Build.ExecutableOptions, std.Build.ObjectOptions, std.Build.SharedLibraryOptions, std.Build.StaticLibraryOptions, and std.Build.TestOptions. * remove `std.Build.constructCMacro`. There is no use for this API. * deprecate `std.Build.Step.Compile.defineCMacro`. Instead, `std.Build.Module.addCMacro` is provided. - remove `std.Build.Step.Compile.defineCMacroRaw`. * deprecate `std.Build.Step.Compile.linkFrameworkNeeded` - use `std.Build.Module.linkFramework` * deprecate `std.Build.Step.Compile.linkFrameworkWeak` - use `std.Build.Module.linkFramework` * move more logic into `std.Build.Module` * allow `target` and `optimize` to be `null` when creating a Module. Along with other fields, those unspecified options will be inherited from parent `Module` when inserted into an import table. * the `target` field of `addExecutable` is now required. pass `b.host` to get the host target.
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
2019-03-11add test for spawning child process with empty environmentAndrew Kelley
thanks to BenoitJGirard for pointing out the child process implementation needs 3 extra null bytes in #2031