Skip to content

Commit

Permalink
test makefile tweak to silence stop-dacs
Browse files Browse the repository at this point in the history
  • Loading branch information
christophercampbell committed Oct 20, 2023
1 parent c7e08d6 commit dd36d99
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
21 changes: 4 additions & 17 deletions test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ run: stop ## Runs a full node for e2e
.PHONY: stop
stop: ## Stop a full data node
make stop-dacs
make stop-dac-dbs
$(STOP)

.PHONY: stop-dacs
stop-dacs:
@./stop-dacs > /dev/null 2>&1

.PHONY: test-e2e
test-e2e: run ## Runs the E2E tests
trap '$(STOP)' EXIT; MallocNanoZone=0 go test -count=1 -race -v -p 1 -timeout 600s ./e2e/...
Expand Down Expand Up @@ -54,19 +57,3 @@ run-network: ## Runs the l1 network
stop-network: ## Stops the l1 network
docker compose stop l1 && docker compose rm -f l1


### manual utility to stop dac nodes that were started by e2e, but not stopped by e2e ###
.PHONY: stop-dac-nodes
stop-dac-nodes:
for i in 0 1 2 3 4 ; do \
(docker kill cdk-data-availability-$$i || true) && (docker rm cdk-data-availability-$$i || true) ; \
done

.PHONY: stop-dac-dbs
stop-dac-dbs:
for i in 0 1 2 3 4 ; do \
(docker kill cdk-validium-data-node-db-$$i || true) && (docker rm cdk-validium-data-node-db-$$i || true); \
done

.PHONY: stop-dacs
stop-dacs: stop-dac-nodes stop-dac-dbs
9 changes: 9 additions & 0 deletions test/stop-dacs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

for i in 0 1 2 3 4 ; do \
docker kill cdk-data-availability-$$i || true
docker rm cdk-data-availability-$$i || true
docker kill cdk-validium-data-node-db-$$i || true
docker rm cdk-validium-data-node-db-$$i || true
done

0 comments on commit dd36d99

Please sign in to comment.