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,9 +1,8 @@
[[e2e]]
name = "associate_existing_cache"
comment = """
Tests that tasks with identical commands share cache
"""

[[e2e]]
name = "associate_existing_cache"
steps = [
{ argv = [
"vt",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
[[e2e]]
name = "builtin_different_cwd"
comment = """
Tests that synthetic tasks have separate cache per cwd
"""

[[e2e]]
name = "builtin_different_cwd"
steps = [
{ argv = [
"vt",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
comment = """
Tests that cache: false in task config disables caching
"""

[[e2e]]
name = "task_with_cache_disabled"
comment = """
A task configured with `cache: false` should re-run on every invocation instead of being cached.
"""
steps = [
{ argv = [
"vt",
Expand All @@ -19,6 +18,9 @@ steps = [

[[e2e]]
name = "task_with_cache_enabled"
comment = """
A task with caching enabled should produce a cache hit on the second run.
"""
steps = [
{ argv = [
"vt",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# task_with_cache_disabled

Tests that cache: false in task config disables caching
A task configured with `cache: false` should re-run on every invocation instead of being cached.

## `vt run no-cache-task`

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

Tests that cache: false in task config disables caching
A task with caching enabled should produce a cache hit on the second run.

## `vt run cached-task`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
[[e2e]]
name = "cache_miss_command_change"
comment = """
Tests cache behavior when command changes partially
"""

[[e2e]]
name = "cache_miss_command_change"
steps = [
{ argv = [
"vt",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
comment = """
Test all cache miss reason variants
"""

[[e2e]]
name = "env_value_changed"
comment = """
Changing the value of a tracked env var between runs should invalidate the cache.
"""
steps = [
{ argv = [
"vt",
Expand All @@ -29,6 +28,9 @@ steps = [

[[e2e]]
name = "env_added"
comment = """
Setting a tracked env var that was previously unset should invalidate the cache.
"""
steps = [
{ argv = [
"vt",
Expand All @@ -49,6 +51,9 @@ steps = [

[[e2e]]
name = "env_removed"
comment = """
Unsetting a tracked env var that was previously set should invalidate the cache.
"""
steps = [
{ argv = [
"vt",
Expand All @@ -69,6 +74,9 @@ steps = [

[[e2e]]
name = "untracked_env_added"
comment = """
Adding an `untrackedEnv` entry to the task config should invalidate the cache.
"""
steps = [
{ argv = [
"vt",
Expand All @@ -91,6 +99,9 @@ steps = [

[[e2e]]
name = "untracked_env_removed"
comment = """
Removing an existing `untrackedEnv` entry from the task config should invalidate the cache.
"""
steps = [
{ argv = [
"vtt",
Expand Down Expand Up @@ -120,6 +131,9 @@ steps = [

[[e2e]]
name = "cwd_changed"
comment = """
Changing the task's `cwd` should invalidate the cache, even if the input file exists at the new location.
"""
steps = [
{ argv = [
"vt",
Expand Down Expand Up @@ -154,6 +168,9 @@ steps = [

[[e2e]]
name = "inferred_input_changes"
comment = """
Modifying, removing, and re-adding an input file (tracked via fspy inference) should each invalidate the cache.
"""
steps = [
{ argv = [
"vt",
Expand Down Expand Up @@ -197,6 +214,9 @@ steps = [

[[e2e]]
name = "input_config_changed"
comment = """
Changing the task's `input` configuration should invalidate the cache even when the underlying files are unchanged.
"""
steps = [
{ argv = [
"vt",
Expand All @@ -219,6 +239,9 @@ steps = [

[[e2e]]
name = "glob_input_changes"
comment = """
Modifying, adding, or removing files matched by a glob `input` pattern should each invalidate the cache.
"""
steps = [
{ argv = [
"vt",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# cwd_changed

Test all cache miss reason variants
Changing the task's `cwd` should invalidate the cache, even if the input file exists at the new location.

## `vt run test`

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

Test all cache miss reason variants
Setting a tracked env var that was previously unset should invalidate the cache.

## `vt run test`

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

Test all cache miss reason variants
Unsetting a tracked env var that was previously set should invalidate the cache.

## `MY_ENV=1 vt run test`

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

Test all cache miss reason variants
Changing the value of a tracked env var between runs should invalidate the cache.

## `MY_ENV=1 vt run test`

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

Test all cache miss reason variants
Modifying, adding, or removing files matched by a glob `input` pattern should each invalidate the cache.

## `vt run glob-test`

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

Test all cache miss reason variants
Modifying, removing, and re-adding an input file (tracked via fspy inference) should each invalidate the cache.

## `vt run test`

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

Test all cache miss reason variants
Changing the task's `input` configuration should invalidate the cache even when the underlying files are unchanged.

## `vt run test`

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

Test all cache miss reason variants
Adding an `untrackedEnv` entry to the task config should invalidate the cache.

## `vt run test`

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

Test all cache miss reason variants
Removing an existing `untrackedEnv` entry from the task config should invalidate the cache.

## `vtt replace-file-content vite-task.json '"cache": true' '"cache": true, "untrackedEnv": ["MY_UNTRACKED"]'`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
[[e2e]]
name = "read_file_with_colon_in_name"
comment = """
Tests that a task name with colon works correctly with caching
"""

[[e2e]]
name = "read_file_with_colon_in_name"
steps = [
{ argv = [
"vt",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,35 @@
comment = """
Tests that independent tasks execute concurrently.
Packages a and b have no dependency relationship.
Both use a barrier that requires 2 participants — if run sequentially,
the first would wait forever and the test would timeout.
"""

[[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.
"""
steps = [["vt", "run", "-r", "build"]]

# Both tasks use a single-command barrier (no && splitting). Task a exits with
# code 1 after the barrier, task b hangs after the barrier. Since both
# participate in the same barrier, b is guaranteed to be running when a fails.
# The test completing without timeout proves cancellation kills b.
[[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.
"""
steps = [["vt", "run", "-r", "test"]]

# Same as above but with --cache to exercise the piped stdio / fspy path
# (spawn_with_tracking) instead of the inherited stdio path (spawn_inherited).
[[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.
"""
steps = [["vt", "run", "-r", "--cache", "test"]]

# Task b closes stdout/stderr after the barrier but stays alive (daemonizes).
# The pipe reads EOF but the process doesn't exit. The runner must still be
# able to kill it via the cancellation token + Job Object.
[[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.
"""
steps = [["vt", "run", "-r", "--cache", "daemon"]]
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# failure_kills_concurrent_cached_tasks

Tests that independent tasks execute concurrently.
Packages a and b have no dependency relationship.
Both use a barrier that requires 2 participants — if run sequentially,
the first would wait forever and the test would timeout.
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,9 +1,8 @@
# failure_kills_concurrent_tasks

Tests that independent tasks execute concurrently.
Packages a and b have no dependency relationship.
Both use a barrier that requires 2 participants — if run sequentially,
the first would wait forever and the test would timeout.
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,9 +1,8 @@
# failure_kills_daemonized_concurrent_tasks

Tests that independent tasks execute concurrently.
Packages a and b have no dependency relationship.
Both use a barrier that requires 2 participants — if run sequentially,
the first would wait forever and the test would timeout.
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,9 +1,8 @@
# independent_tasks_run_concurrently

Tests that independent tasks execute concurrently.
Packages a and b have no dependency relationship.
Both use a barrier that requires 2 participants — if run sequentially,
the first would wait forever and the test would timeout.
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
Loading
Loading