Skip to content

Commit be4c807

Browse files
authored
Merge pull request #348 from input-output-hk/lowhung/347-makefile
Update Makefile: add `run` target to run omnibus process
2 parents b01abbb + 17f8934 commit be4c807

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ SHELL := bash
66
CARGO := cargo
77
PYTHON := python3
88
PROCESS_PKG := acropolis_process_omnibus
9+
LOG_LEVEL ?= info
10+
911

1012
# Test snapshots
1113
SNAPSHOT_SMALL ?= tests/fixtures/snapshot-small.cbor
@@ -28,6 +30,7 @@ help:
2830
@echo "Build & Test:"
2931
@echo " all Format, lint, and test"
3032
@echo " build Build the omnibus process"
33+
@echo " run Run the omnibus"
3134
@echo " test Run all tests"
3235
@echo " fmt Run cargo fmt"
3336
@echo " clippy Run cargo clippy -D warnings"
@@ -37,9 +40,11 @@ help:
3740
@echo ""
3841
@echo "Variables:"
3942
@echo " SNAPSHOT=<path> Path to snapshot file (default: Conway epoch 507)"
43+
@echo " LOG_LEVEL=<level> Set log level (default: info, options: error, warn, info, debug, trace)"
4044
@echo ""
4145
@echo "Examples:"
4246
@echo " make snap-test-streaming"
47+
@echo " make run LOG_LEVEL=debug"
4348
@echo " make snap-test-streaming SNAPSHOT=path/to/snapshot.cbor"
4449

4550
all: fmt clippy test
@@ -51,7 +56,7 @@ test:
5156
$(CARGO) test
5257

5358
run:
54-
$(CARGO) run -p $(PROCESS_PKG)
59+
cd processes/omnibus && RUST_LOG=$(LOG_LEVEL) $(CARGO) run --release --bin $(PROCESS_PKG)
5560

5661
fmt:
5762
$(CARGO) fmt --all

0 commit comments

Comments
 (0)