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
8 changes: 2 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,8 @@ jobs:
go-version-file: go.mod
- name: Install Fossil
run: sudo apt-get update && sudo apt-get install -y fossil
- name: Sim unit tests
run: cd sim && go test . -run 'TestFaultProxy|TestGenerateSchedule|TestBuggify' -count=1
- name: Sim serve tests
run: cd sim && go test . -run 'TestServeHTTP|TestLeafToLeaf|TestAgentServe|TestHubLeafE2E|TestAgentNew_|TestHubNATSFossilSync_' -count=1 -timeout=120s
- name: Interop (short)
run: cd sim && go test . -run 'TestInterop' -count=1 -short -timeout=60s
- name: Sim integration tests
run: cd sim && go test . -run 'TestHubLeafE2E|TestAgentNew_|TestHubNATSFossilSync_' -count=1 -timeout=120s

build:
name: Build
Expand Down
35 changes: 8 additions & 27 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: build test clean leaf bridge edgesync iroh-sidecar wasm-wasi wasm-browser wasm dst dst-full dst-hostile dst-drivers sim sim-full setup-hooks setup test-interop test-iroh update-libfossil auto-release auto-release-dry
.PHONY: build test clean leaf bridge edgesync iroh-sidecar wasm-wasi wasm-browser wasm setup-hooks setup test-iroh update-libfossil auto-release auto-release-dry

# --- Build ---

Expand Down Expand Up @@ -34,18 +34,16 @@ clean:
rm -rf bin/

# --- Test (what CI runs) ---
# Unit tests run in parallel across modules; sim/dst run sequentially after.
# Unit tests run in parallel across modules; sim integration tests run after.
# Iroh tests need the sidecar binary — run them via test-iroh.

test:
@pids=""; fail=0; \
(cd leaf && go test ./... -short -count=1) & pids="$$pids $$!"; \
(cd bridge && go test ./... -short -count=1) & pids="$$pids $$!"; \
for pid in $$pids; do wait $$pid || fail=1; done; \
if [ $$fail -ne 0 ]; then echo "FAIL: unit tests"; exit 1; fi
(cd sim && go test . -run 'TestFaultProxy|TestGenerateSchedule|TestBuggify' -count=1)
(cd sim && go test . -run 'TestServeHTTP|TestLeafToLeaf|TestAgentServe|TestHubLeafE2E|TestAgentNew_|TestHubNATSFossilSync_' -count=1 -timeout=120s)
(cd sim && go test . -run 'TestInterop' -count=1 -short -timeout=60s)
(cd sim && go test . -run 'TestSimulation' -sim.seed=1 -count=1 -timeout=120s)
(cd sim && go test . -run 'TestHubLeafE2E|TestAgentNew_|TestHubNATSFossilSync_' -count=1 -timeout=120s)

vet:
go vet ./...
Expand All @@ -65,27 +63,10 @@ setup-hooks:
@echo "Pre-commit hook installed. Runs ~5s of tests before each commit."
@echo "Skip with: git commit --no-verify"

# --- Sim (Integration Simulation) — run locally, requires fossil ---
# Note: DST tests now live in libfossil (github.com/danmestas/libfossil/dst)

# Quick: 1 seed, normal severity
sim:
cd sim && go test . -run TestSimulation -sim.seed=1 -v -timeout=120s

# Full: 16 seeds × 3 severities
sim-full:
@echo "=== Sim full (16 seeds × 3 severities) ==="
@for severity in normal adversarial hostile; do \
for seed in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16; do \
echo " seed=$$seed severity=$$severity ..."; \
(cd sim && go test . -run TestSimulation -sim.seed=$$seed -sim.severity=$$severity -timeout=120s) || true; \
done; \
done
@echo "=== Sim full done ==="

# Fossil interop: Tier 1 + Tier 2 (requires fossil binary, Tier 2 samples 5K+2K blobs)
test-interop:
cd sim && go test -buildvcs=false . -run TestInterop -timeout=10m -v
# --- Sim (Integration Simulation) ---
# DST and the seed-sweep simulation/interop suites live in go-libfossil
# (github.com/danmestas/go-libfossil): the old sim/dst regex targets here
# ran against tests that were removed in the v0.2.0 handle-API migration.

# Iroh P2P: build sidecar then run iroh unit + integration tests
test-iroh: iroh-sidecar
Expand Down
4 changes: 0 additions & 4 deletions sim/buggify_test.go

This file was deleted.

4 changes: 0 additions & 4 deletions sim/checkout_test.go

This file was deleted.

4 changes: 0 additions & 4 deletions sim/diff_interop_test.go

This file was deleted.

4 changes: 0 additions & 4 deletions sim/equivalence_test.go

This file was deleted.

4 changes: 0 additions & 4 deletions sim/finfo_interop_test.go

This file was deleted.

4 changes: 0 additions & 4 deletions sim/interop_test.go

This file was deleted.

4 changes: 0 additions & 4 deletions sim/otel_test.go

This file was deleted.

4 changes: 0 additions & 4 deletions sim/proxy_test.go

This file was deleted.

4 changes: 0 additions & 4 deletions sim/rebuild_test.go

This file was deleted.

4 changes: 0 additions & 4 deletions sim/schedule_test.go

This file was deleted.

4 changes: 0 additions & 4 deletions sim/serve_test.go

This file was deleted.

4 changes: 0 additions & 4 deletions sim/shun_test.go

This file was deleted.

4 changes: 0 additions & 4 deletions sim/sim_test.go

This file was deleted.

4 changes: 0 additions & 4 deletions sim/uv_test.go

This file was deleted.