|
| 1 | +.PHONY: help build-docker clean-docker docker-info verify |
| 2 | +.PHONY: test test-local test-v1.9.1 test-v1.10.1 test-v1.9.1-local test-v1.10.1-local |
| 3 | +.PHONY: test-genesis test-genesis-local test-genesis-v1.9.1 test-genesis-v1.10.1 test-genesis-v1.9.1-local test-genesis-v1.10.1-local |
| 4 | +.PHONY: test-ica test-ica-local test-ica-v1.9.1 test-ica-v1.10.1 test-ica-v1.9.1-local test-ica-v1.10.1-local |
| 5 | +.PHONY: test-all-versions test-all-versions-local full-test |
| 6 | + |
| 7 | +# Default target |
| 8 | +help: |
| 9 | + @echo "Lumera Interchaintest Makefile" |
| 10 | + @echo "" |
| 11 | + @echo "Docker:" |
| 12 | + @echo " build-docker Build lumerad Docker image from local source" |
| 13 | + @echo " clean-docker Remove local Docker images" |
| 14 | + @echo " docker-info Show Docker image info" |
| 15 | + @echo " verify Verify local setup" |
| 16 | + @echo "" |
| 17 | + @echo "Genesis tests:" |
| 18 | + @echo " test-genesis-v1.9.1 Test genesis for v1.9.1" |
| 19 | + @echo " test-genesis-v1.10.1 Test genesis for v1.10.1" |
| 20 | + @echo " test-genesis-v1.9.1-local ... with local image" |
| 21 | + @echo " test-genesis-v1.10.1-local ... with local image" |
| 22 | + @echo "" |
| 23 | + @echo "ICA tests:" |
| 24 | + @echo " test-ica-v1.9.1 Run ICA tests for v1.9.1" |
| 25 | + @echo " test-ica-v1.10.1 Run ICA tests for v1.10.1" |
| 26 | + @echo " test-ica-v1.9.1-local ... with local image" |
| 27 | + @echo " test-ica-v1.10.1-local ... with local image" |
| 28 | + @echo "" |
| 29 | + @echo "All tests for a version:" |
| 30 | + @echo " test-v1.9.1 Run all tests for v1.9.1" |
| 31 | + @echo " test-v1.10.1 Run all tests for v1.10.1" |
| 32 | + @echo " test-v1.9.1-local ... with local image" |
| 33 | + @echo " test-v1.10.1-local ... with local image" |
| 34 | + @echo "" |
| 35 | + @echo "Shortcuts (default v1.10.1):" |
| 36 | + @echo " test-genesis Test genesis (v1.10.1)" |
| 37 | + @echo " test-genesis-local Test genesis with local image" |
| 38 | + @echo " test-ica Run ICA tests (v1.10.1)" |
| 39 | + @echo " test-ica-local Run ICA tests with local image" |
| 40 | + @echo " test Run all tests (v1.10.1)" |
| 41 | + @echo " test-local Run all tests with local image" |
| 42 | + @echo "" |
| 43 | + @echo "Multi-version:" |
| 44 | + @echo " test-all-versions Test both v1.9.1 and v1.10.1" |
| 45 | + @echo " test-all-versions-local Test both versions with local image" |
| 46 | + @echo " full-test Build + test all versions locally" |
| 47 | + |
| 48 | +# ── Docker ────────────────────────────────────────────── |
| 49 | + |
| 50 | +build-docker: |
| 51 | + @echo "Building lumerad Docker image..." |
| 52 | + ./build-docker.sh |
| 53 | + |
| 54 | +clean-docker: |
| 55 | + -docker rmi lumerad-local:local 2>/dev/null || true |
| 56 | + @echo "Cleanup complete" |
| 57 | + |
| 58 | +docker-info: |
| 59 | + @docker images | grep -E "(REPOSITORY|lumerad-local|lumeraprotocol)" || echo "No lumera images found" |
| 60 | + |
| 61 | +verify: |
| 62 | + @echo "Verifying setup..." |
| 63 | + @which docker > /dev/null && docker --version || echo " Docker not found" |
| 64 | + @which go > /dev/null && go version || echo " Go not found" |
| 65 | + @test -d ../lumera && echo " Lumera source: found at ../lumera" || echo " Lumera source: not found at ../lumera" |
| 66 | + @test -f ../lumera/claims.csv && echo " claims.csv: found" || echo " claims.csv: not found (optional)" |
| 67 | + |
| 68 | +# ── Genesis tests ─────────────────────────────────────── |
| 69 | + |
| 70 | +test-genesis-v1.9.1: |
| 71 | + LUMERA_VERSION=v1.9.1 go test -v -timeout 10m -run TestLumeraGenesisSetup |
| 72 | + |
| 73 | +test-genesis-v1.10.1: |
| 74 | + LUMERA_VERSION=v1.10.1 go test -v -timeout 10m -run TestLumeraGenesisSetup |
| 75 | + |
| 76 | +test-genesis-v1.9.1-local: build-docker |
| 77 | + LUMERA_VERSION=v1.9.1 USE_LOCAL_IMAGE=true go test -v -timeout 10m -run TestLumeraGenesisSetup |
| 78 | + |
| 79 | +test-genesis-v1.10.1-local: build-docker |
| 80 | + LUMERA_VERSION=v1.10.1 USE_LOCAL_IMAGE=true go test -v -timeout 10m -run TestLumeraGenesisSetup |
| 81 | + |
| 82 | +# Shortcuts (default v1.10.1) |
| 83 | +test-genesis: test-genesis-v1.10.1 |
| 84 | +test-genesis-local: test-genesis-v1.10.1-local |
| 85 | + |
| 86 | +# ── ICA tests ─────────────────────────────────────────── |
| 87 | + |
| 88 | +test-ica-v1.9.1: |
| 89 | + LUMERA_VERSION=v1.9.1 go test -v -timeout 20m -run TestOsmosisLumeraICA |
| 90 | + |
| 91 | +test-ica-v1.10.1: |
| 92 | + LUMERA_VERSION=v1.10.1 go test -v -timeout 20m -run TestOsmosisLumeraICA |
| 93 | + |
| 94 | +test-ica-v1.9.1-local: build-docker |
| 95 | + LUMERA_VERSION=v1.9.1 USE_LOCAL_IMAGE=true go test -v -timeout 20m -run TestOsmosisLumeraICA |
| 96 | + |
| 97 | +test-ica-v1.10.1-local: build-docker |
| 98 | + LUMERA_VERSION=v1.10.1 USE_LOCAL_IMAGE=true go test -v -timeout 20m -run TestOsmosisLumeraICA |
| 99 | + |
| 100 | +# Shortcuts (default v1.10.1) |
| 101 | +test-ica: test-ica-v1.10.1 |
| 102 | +test-ica-local: test-ica-v1.10.1-local |
| 103 | + |
| 104 | +# ── All tests for a version ───────────────────────────── |
| 105 | + |
| 106 | +test-v1.9.1: |
| 107 | + LUMERA_VERSION=v1.9.1 go test -v -timeout 30m ./... |
| 108 | + |
| 109 | +test-v1.10.1: |
| 110 | + LUMERA_VERSION=v1.10.1 go test -v -timeout 30m ./... |
| 111 | + |
| 112 | +test-v1.9.1-local: build-docker |
| 113 | + LUMERA_VERSION=v1.9.1 USE_LOCAL_IMAGE=true go test -v -timeout 30m ./... |
| 114 | + |
| 115 | +test-v1.10.1-local: build-docker |
| 116 | + LUMERA_VERSION=v1.10.1 USE_LOCAL_IMAGE=true go test -v -timeout 30m ./... |
| 117 | + |
| 118 | +# Shortcuts (default v1.10.1) |
| 119 | +test: test-v1.10.1 |
| 120 | +test-local: test-v1.10.1-local |
| 121 | + |
| 122 | +# ── Multi-version ─────────────────────────────────────── |
| 123 | + |
| 124 | +test-all-versions: |
| 125 | + go test -v -timeout 30m -run TestBothVersions |
| 126 | + |
| 127 | +test-all-versions-local: build-docker |
| 128 | + USE_LOCAL_IMAGE=true go test -v -timeout 30m -run TestBothVersions |
| 129 | + |
| 130 | +full-test: build-docker test-all-versions-local |
0 commit comments