aboutsummaryrefslogtreecommitdiff
path: root/docs/dev/Testing.md
blob: 40930f5d6a1cf8cfd933e9e4152c57f3772bcc72 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Testing

## Testing a new `zen` binary via ushell

Both ushell commands that shell out to the `zen` CLI honor two environment variables. They let you drop a freshly built `zen` executable in front of ushell without touching the UE tree.

### Affected commands

- **`.zen`**`status`, `start`, `stop`, `version`, `import-snapshot`, `create-workspace`, `create-share`, and any other `ZenUtilityBaseCmd`. Implemented in `channels/unreal/core/pylib/zen/cmd.py` (`ZenUtilityBaseCmd.get_zen_utility_command`, ~line 657).
  - Note: `.zen start` and `.zen dashboard` launch `ZenLaunch` / `ZenDashboard` UE program targets from the engine tree — **those are not affected** by these variables. Only invocations of the `zen` utility itself are.
- **`.getbuild`**`channels/unreal/core/cmds/getbuild.py` (`GetBuild.run_zen`, ~line 365). Used for both the `builds list` query and the `builds download` step.

### `UE_ZEN_BINARY_PATH`

Absolute path to the `zen` executable to invoke.

- **Default:** `<EngineDir>/Binaries/<HostPlatform>/zen[.exe]` from the active UE tree.
- **When set:** the value is used verbatim — no platform folder, no `.exe` suffix added. Point it straight at your build output, e.g. `.../Zen/Source/Programs/Zen/out/build/x64-Debug/zen.exe`.
- Both commands log `Using zen binary from UE_ZEN_BINARY_PATH: <path>` on each invocation, and raise `FileNotFoundError` if the file doesn't exist.

### `UE_ZEN_ARGS`

Extra global arguments prepended to every `zen` invocation.

- Shell-split on whitespace (`str.split()`), then inserted **before** the subcommand args and before any user passthrough (`zenargs` / `runargs`).
- Useful for things like `--log-level=debug`, custom config overrides, or experimental flags your new build understands.
- Logged as `Using extra zen args from UE_ZEN_ARGS: <args>` when non-empty.

### Typical workflow

```bash
# bash
export UE_ZEN_BINARY_PATH=/path/to/new/zen.exe
export UE_ZEN_ARGS="--log-level=debug"

# PowerShell
$env:UE_ZEN_BINARY_PATH = "C:\path\to\new\zen.exe"
$env:UE_ZEN_ARGS        = "--log-level=debug"

# cmd
set UE_ZEN_BINARY_PATH=C:\path\to\new\zen.exe
set UE_ZEN_ARGS=--log-level=debug
```

Then inside ushell:

```
.zen version        # confirms which binary is being invoked
.zen status
.getbuild win64 staged --match <cl>
```

Unset the variables (or open a fresh shell) to fall back to the in-tree `zen` shipped with the current UE sync.