|
1 | 1 | .PHONY: test-unit test-e2e test-coverage test-all \ |
2 | | - test-vm test-vm-run test-vm-parallel test-vm-inner test-vm-inner-run \ |
| 2 | + test-vm-inner test-vm-inner-run \ |
3 | 3 | install-hooks uninstall-hooks |
4 | 4 |
|
5 | | -# VM A: install/journey tests that touch real system state (longest-running). |
6 | | -VM_A_TESTS := TestVM_Journey_FirstTimeUser|TestVM_Journey_DryRunIsCompletelySafe|TestVM_Interactive_InstallScript |
7 | | -# VM B: all other VM tests — dotfiles, macOS, edge cases, smoke, real-install, sync. |
8 | | -VM_B_TESTS := TestVM_Journey_Dotfiles|TestVM_Journey_MacOS|TestVM_Journey_FullSetupConfiguresEverything|TestVM_Edge_|TestSmoke_|TestE2E_ |
9 | | - |
10 | 5 | BINARY_NAME=openboot |
11 | 6 | BINARY_PATH=./$(BINARY_NAME) |
12 | 7 | VERSION ?= dev |
@@ -34,38 +29,17 @@ test-all: |
34 | 29 | $(MAKE) test-coverage |
35 | 30 |
|
36 | 31 | # ============================================================================= |
37 | | -# Tart VM e2e — destructive tests run inside a throwaway Tart VM provisioned |
38 | | -# by scripts/vm/run.sh. Files tagged `e2e,vm` run via `make test-vm-inner`; |
39 | | -# files tagged `e2e && !vm` (auth, snapshot_api) run as L3 on the host. |
40 | | -# |
41 | | -# Requires Apple Silicon + Tart installed locally. See scripts/vm/README.md |
42 | | -# for one-time setup. The relevant targets are defined immediately below |
43 | | -# this header: test-vm, test-vm-run, test-vm-inner, test-vm-inner-run. |
| 32 | +# L4 VM e2e — destructive tests tagged `e2e,vm`. Run directly on any clean |
| 33 | +# macOS host (Apple Silicon). In CI this is a GitHub Actions macos-14 runner |
| 34 | +# (see .github/workflows/vm-e2e-spike.yml). Locally, run on a throwaway |
| 35 | +# machine or a Tart VM — do NOT run on your primary dev machine. |
44 | 36 | # ============================================================================= |
45 | 37 |
|
46 | | -# Developer-facing: provisions a Tart VM and runs the full e2e suite inside. |
47 | | -test-vm: build |
48 | | - scripts/vm/run.sh test-vm-inner |
49 | | - |
50 | | -# Developer-facing: runs one named test inside a Tart VM. |
51 | | -test-vm-run: build |
52 | | - scripts/vm/run.sh "test-vm-inner-run TEST=$(TEST)" |
53 | | - |
54 | | -# Developer-facing: runs e2e in two parallel VMs — VM A (system tests) and |
55 | | -# VM B (mock-server tests). Requires ~16 GB RAM and 8 cores free. |
56 | | -# Exit code is non-zero if either VM fails. |
57 | | -test-vm-parallel: build |
58 | | - @OPENBOOT_VM_TEST='$(VM_A_TESTS)' scripts/vm/run.sh test-vm-inner & PID_A=$$!; \ |
59 | | - OPENBOOT_VM_TEST='$(VM_B_TESTS)' scripts/vm/run.sh test-vm-inner & PID_B=$$!; \ |
60 | | - A_EXIT=0; B_EXIT=0; \ |
61 | | - wait $$PID_A || A_EXIT=$$?; \ |
62 | | - wait $$PID_B || B_EXIT=$$?; \ |
63 | | - [ $$A_EXIT -eq 0 ] && [ $$B_EXIT -eq 0 ] |
64 | | - |
65 | | -# In-VM: invoked over SSH by run.sh — not called by developers directly. |
| 38 | +# Run the full L4 suite (same command CI uses). |
66 | 39 | test-vm-inner: |
67 | 40 | go test -v -timeout 60m -tags="e2e,vm" ./test/e2e/... |
68 | 41 |
|
| 42 | +# Run a single L4 test by name: make test-vm-inner-run TEST=TestVM_Journey_FirstTimeUser |
69 | 43 | test-vm-inner-run: |
70 | 44 | go test -v -timeout 45m -tags="e2e,vm" -run '$(TEST)' ./test/e2e/... |
71 | 45 |
|
|
0 commit comments