Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
[[e2e]]
name = "force_color_env_is_always_one_in_cached_child"
comment = """
The parent shell sets `FORCE_COLOR=0`, but a cached task's child always sees
`FORCE_COLOR=1`. Color-related env vars are not passed through by default for
cached tasks — the runner injects `FORCE_COLOR=1` so cached output is always
colored, and the reporter strips colors at display time when the terminal
does not support them. (For uncached tasks the parent's environment flows
through untouched.)
The parent shell sets `FORCE_COLOR=0`, but a cached task's child always sees `FORCE_COLOR=1`. Color-related env vars are not passed through by default for cached tasks — the runner injects `FORCE_COLOR=1` so cached output is always colored, and the reporter strips colors at display time when the terminal does not support them. (For uncached tasks the parent's environment flows through untouched.)
"""
steps = [
{ argv = [
Expand All @@ -24,22 +19,9 @@ steps = [
[[e2e]]
name = "cached_output_keeps_colors_across_force_color_values"
comment = """
A task that emits ANSI escape sequences is run twice. Each cache entry
carries the raw coloured bytes — the runner spawns cached tasks with
`FORCE_COLOR=1` regardless of the parent's value — and the reporter
strips colours at the writer level only when the user's terminal cannot
render them.
A task that emits ANSI escape sequences is run twice. Each cache entry carries the raw coloured bytes — the runner spawns cached tasks with `FORCE_COLOR=1` regardless of the parent's value — and the reporter strips colours at the writer level only when the user's terminal cannot render them.

Plain-text snapshot steps use the default `vt100::Screen::contents()`
renderer, which flattens any rendered ANSI styling into plain characters
(so colors don't pollute snapshots). The two `formatted-snapshot = true`
steps switch to `vt100::Screen::rows_formatted` (joined with newlines),
which preserves SGR escapes without emitting cursor positioning or other
rendering state — the latter varies across platforms and would make the
snapshot flaky. Bytes are then routed through `std::ascii::escape_default`
so escapes appear as `\\xNN`. Those two steps prove that the cached
bytes contained colour all along — even when the corresponding initial
run had displayed them in plain text.
Plain-text snapshot steps use the default `vt100::Screen::contents()` renderer, which flattens any rendered ANSI styling into plain characters (so colors don't pollute snapshots). The two `formatted-snapshot = true` steps switch to `vt100::Screen::rows_formatted` (joined with newlines), which preserves SGR escapes without emitting cursor positioning or other rendering state — the latter varies across platforms and would make the snapshot flaky. Bytes are then routed through `std::ascii::escape_default` so escapes appear as `\\xNN`. Those two steps prove that the cached bytes contained colour all along — even when the corresponding initial run had displayed them in plain text.
"""

[[e2e.steps]]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
# cached_output_keeps_colors_across_force_color_values

A task that emits ANSI escape sequences is run twice. Each cache entry
carries the raw coloured bytes — the runner spawns cached tasks with
`FORCE_COLOR=1` regardless of the parent's value — and the reporter
strips colours at the writer level only when the user's terminal cannot
render them.

Plain-text snapshot steps use the default `vt100::Screen::contents()`
renderer, which flattens any rendered ANSI styling into plain characters
(so colors don't pollute snapshots). The two `formatted-snapshot = true`
steps switch to `vt100::Screen::rows_formatted` (joined with newlines),
which preserves SGR escapes without emitting cursor positioning or other
rendering state — the latter varies across platforms and would make the
snapshot flaky. Bytes are then routed through `std::ascii::escape_default`
so escapes appear as `\xNN`. Those two steps prove that the cached
bytes contained colour all along — even when the corresponding initial
run had displayed them in plain text.
A task that emits ANSI escape sequences is run twice. Each cache entry carries the raw coloured bytes — the runner spawns cached tasks with `FORCE_COLOR=1` regardless of the parent's value — and the reporter strips colours at the writer level only when the user's terminal cannot render them.

Plain-text snapshot steps use the default `vt100::Screen::contents()` renderer, which flattens any rendered ANSI styling into plain characters (so colors don't pollute snapshots). The two `formatted-snapshot = true` steps switch to `vt100::Screen::rows_formatted` (joined with newlines), which preserves SGR escapes without emitting cursor positioning or other rendering state — the latter varies across platforms and would make the snapshot flaky. Bytes are then routed through `std::ascii::escape_default` so escapes appear as `\xNN`. Those two steps prove that the cached bytes contained colour all along — even when the corresponding initial run had displayed them in plain text.

## `FORCE_COLOR=1 vt run print-colored-a`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# force_color_env_is_always_one_in_cached_child

The parent shell sets `FORCE_COLOR=0`, but a cached task's child always sees
`FORCE_COLOR=1`. Color-related env vars are not passed through by default for
cached tasks — the runner injects `FORCE_COLOR=1` so cached output is always
colored, and the reporter strips colors at display time when the terminal
does not support them. (For uncached tasks the parent's environment flows
through untouched.)
The parent shell sets `FORCE_COLOR=0`, but a cached task's child always sees `FORCE_COLOR=1`. Color-related env vars are not passed through by default for cached tasks — the runner injects `FORCE_COLOR=1` so cached output is always colored, and the reporter strips colors at display time when the terminal does not support them. (For uncached tasks the parent's environment flows through untouched.)

## `FORCE_COLOR=0 vt run print-force-color`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,35 +1,27 @@
[[e2e]]
name = "independent_tasks_run_concurrently"
comment = """
Two packages with no dependency relationship should run concurrently. Both tasks
participate in a 2-way barrier, so sequential execution would hang forever and
time out.
Two packages with no dependency relationship should run concurrently. Both tasks participate in a 2-way barrier, so sequential execution would hang forever and time out.
"""
steps = [["vt", "run", "-r", "build"]]

[[e2e]]
name = "failure_kills_concurrent_tasks"
comment = """
When one concurrent task fails, the sibling running under inherited stdio must
be cancelled. Task a exits 1 after the shared barrier, task b hangs after it —
completing without timeout proves cancellation killed b.
When one concurrent task fails, the sibling running under inherited stdio must be cancelled. Task a exits 1 after the shared barrier, task b hangs after it — completing without timeout proves cancellation killed b.
"""
steps = [["vt", "run", "-r", "test"]]

[[e2e]]
name = "failure_kills_concurrent_cached_tasks"
comment = """
Same failure-cancellation scenario, but with `--cache` so execution goes through
the piped stdio / fspy path (spawn_with_tracking) instead of the inherited-stdio
path.
Same failure-cancellation scenario, but with `--cache` so execution goes through the piped stdio / fspy path (spawn_with_tracking) instead of the inherited-stdio path.
"""
steps = [["vt", "run", "-r", "--cache", "test"]]

[[e2e]]
name = "failure_kills_daemonized_concurrent_tasks"
comment = """
Cancellation must also kill a sibling that has daemonized — closing stdout/stderr
(EOF on the pipe) while the process itself stays alive. The runner must reach
the process via the cancellation token + Job Object, not by pipe closure.
Cancellation must also kill a sibling that has daemonized — closing stdout/stderr (EOF on the pipe) while the process itself stays alive. The runner must reach the process via the cancellation token + Job Object, not by pipe closure.
"""
steps = [["vt", "run", "-r", "--cache", "daemon"]]
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# failure_kills_concurrent_cached_tasks

Same failure-cancellation scenario, but with `--cache` so execution goes through
the piped stdio / fspy path (spawn_with_tracking) instead of the inherited-stdio
path.
Same failure-cancellation scenario, but with `--cache` so execution goes through the piped stdio / fspy path (spawn_with_tracking) instead of the inherited-stdio path.

## `vt run -r --cache test`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# failure_kills_concurrent_tasks

When one concurrent task fails, the sibling running under inherited stdio must
be cancelled. Task a exits 1 after the shared barrier, task b hangs after it —
completing without timeout proves cancellation killed b.
When one concurrent task fails, the sibling running under inherited stdio must be cancelled. Task a exits 1 after the shared barrier, task b hangs after it — completing without timeout proves cancellation killed b.

## `vt run -r test`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# failure_kills_daemonized_concurrent_tasks

Cancellation must also kill a sibling that has daemonized — closing stdout/stderr
(EOF on the pipe) while the process itself stays alive. The runner must reach
the process via the cancellation token + Job Object, not by pipe closure.
Cancellation must also kill a sibling that has daemonized — closing stdout/stderr (EOF on the pipe) while the process itself stays alive. The runner must reach the process via the cancellation token + Job Object, not by pipe closure.

## `vt run -r --cache daemon`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# independent_tasks_run_concurrently

Two packages with no dependency relationship should run concurrently. Both tasks
participate in a 2-way barrier, so sequential execution would hang forever and
time out.
Two packages with no dependency relationship should run concurrently. Both tasks participate in a 2-way barrier, so sequential execution would hang forever and time out.

## `vt run -r build`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ steps = [
[[e2e]]
name = "ctrl_c_prevents_future_tasks"
comment = """
Ctrl+C while running sequentially (b depends on a) should terminate a and
prevent b from being scheduled.
Ctrl+C while running sequentially (b depends on a) should terminate a and prevent b from being scheduled.
"""
steps = [
{ argv = [
Expand All @@ -53,8 +52,7 @@ steps = [
[[e2e]]
name = "ctrl_c_prevents_caching"
comment = """
A task interrupted by Ctrl+C must not populate the cache, even if it happens to
exit 0 — the following run should be a cache miss, not a hit.
A task interrupted by Ctrl+C must not populate the cache, even if it happens to exit 0 — the following run should be a cache miss, not a hit.
"""
steps = [
{ argv = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# ctrl_c_prevents_caching

A task interrupted by Ctrl+C must not populate the cache, even if it happens to
exit 0 — the following run should be a cache miss, not a hit.
A task interrupted by Ctrl+C must not populate the cache, even if it happens to exit 0 — the following run should be a cache miss, not a hit.

## `vt run @ctrl-c/a#dev`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# ctrl_c_prevents_future_tasks

Ctrl+C while running sequentially (b depends on a) should terminate a and
prevent b from being scheduled.
Ctrl+C while running sequentially (b depends on a) should terminate a and prevent b from being scheduled.

## `vt run -r --no-cache dev`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,15 @@ steps = [{ argv = ["vt", "run", "-r", "fail"], comment = "pkg-a fails, pkg-b is
[[e2e]]
name = "dependency_failure_fast_fails_dependents"
comment = """
When a dependency fails under `-t`, dependents should be skipped rather than
run anyway.
When a dependency fails under `-t`, dependents should be skipped rather than run anyway.
"""
cwd = "packages/pkg-b"
steps = [{ argv = ["vt", "run", "-t", "check"], comment = "pkg-a fails, pkg-b is skipped" }]

[[e2e]]
name = "chained_command_with____stops_at_first_failure"
comment = """
In a `&&`-chained command, a non-zero exit from the first sub-command should
short-circuit and skip the rest.
In a `&&`-chained command, a non-zero exit from the first sub-command should short-circuit and skip the rest.
"""
steps = [
{ argv = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# chained_command_with____stops_at_first_failure

In a `&&`-chained command, a non-zero exit from the first sub-command should
short-circuit and skip the rest.
In a `&&`-chained command, a non-zero exit from the first sub-command should short-circuit and skip the rest.

## `vt run pkg-a#chained`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# dependency_failure_fast_fails_dependents

When a dependency fails under `-t`, dependents should be skipped rather than
run anyway.
When a dependency fails under `-t`, dependents should be skipped rather than run anyway.

## `vt run -t check`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,47 +1,41 @@
[[e2e]]
name = "partial_match_warns_for_unmatched_filter"
comment = """
When some `--filter` flags match and one does not, the run should proceed and
warn only for the unmatched filter.
When some `--filter` flags match and one does not, the run should proceed and warn only for the unmatched filter.
"""
steps = [["vt", "run", "--filter", "@test/app", "--filter", "nonexistent", "build"]]

[[e2e]]
name = "multiple_unmatched_filters_warn_individually"
comment = """
Each unmatched `--filter` should produce its own warning — warnings must not
be collapsed into a single message.
Each unmatched `--filter` should produce its own warning — warnings must not be collapsed into a single message.
"""
steps = [["vt", "run", "--filter", "@test/app", "--filter", "nope1", "--filter", "nope2", "build"]]

[[e2e]]
name = "whitespace_split_filter_warns_for_unmatched_token"
comment = """
A whitespace-split `--filter` argument should warn about each of its individual
unmatched tokens.
A whitespace-split `--filter` argument should warn about each of its individual unmatched tokens.
"""
steps = [["vt", "run", "--filter", "@test/app nope", "build"]]

[[e2e]]
name = "unmatched_exclusion_filter_does_not_warn"
comment = """
An exclusion filter (`!...`) that matches nothing should be silent; only
unmatched inclusion filters warn.
An exclusion filter (`!...`) that matches nothing should be silent; only unmatched inclusion filters warn.
"""
steps = [["vt", "run", "--filter", "@test/app", "--filter", "!nonexistent", "build"]]

[[e2e]]
name = "unmatched_glob_filter_warns"
comment = """
A glob `--filter` that matches no packages should warn like any other
unmatched inclusion filter.
A glob `--filter` that matches no packages should warn like any other unmatched inclusion filter.
"""
steps = [["vt", "run", "--filter", "@test/app", "--filter", "@nope/*", "build"]]

[[e2e]]
name = "unmatched_directory_filter_warns"
comment = """
A directory-style `--filter` (`./packages/...`) that points nowhere should
warn just like an unmatched name filter.
A directory-style `--filter` (`./packages/...`) that points nowhere should warn just like an unmatched name filter.
"""
steps = [["vt", "run", "--filter", "@test/app", "--filter", "./packages/nope", "build"]]
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# multiple_unmatched_filters_warn_individually

Each unmatched `--filter` should produce its own warning — warnings must not
be collapsed into a single message.
Each unmatched `--filter` should produce its own warning — warnings must not be collapsed into a single message.

## `vt run --filter @test/app --filter nope1 --filter nope2 build`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# partial_match_warns_for_unmatched_filter

When some `--filter` flags match and one does not, the run should proceed and
warn only for the unmatched filter.
When some `--filter` flags match and one does not, the run should proceed and warn only for the unmatched filter.

## `vt run --filter @test/app --filter nonexistent build`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# unmatched_directory_filter_warns

A directory-style `--filter` (`./packages/...`) that points nowhere should
warn just like an unmatched name filter.
A directory-style `--filter` (`./packages/...`) that points nowhere should warn just like an unmatched name filter.

## `vt run --filter @test/app --filter ./packages/nope build`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# unmatched_exclusion_filter_does_not_warn

An exclusion filter (`!...`) that matches nothing should be silent; only
unmatched inclusion filters warn.
An exclusion filter (`!...`) that matches nothing should be silent; only unmatched inclusion filters warn.

## `vt run --filter @test/app --filter !nonexistent build`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# unmatched_glob_filter_warns

A glob `--filter` that matches no packages should warn like any other
unmatched inclusion filter.
A glob `--filter` that matches no packages should warn like any other unmatched inclusion filter.

## `vt run --filter @test/app --filter @nope/* build`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# whitespace_split_filter_warns_for_unmatched_token

A whitespace-split `--filter` argument should warn about each of its individual
unmatched tokens.
A whitespace-split `--filter` argument should warn about each of its individual unmatched tokens.

## `vt run --filter '@test/app nope' build`

Expand Down
Loading
Loading