1- all : poetry
1+ default : kevm-pyk
22
33
44# Building
1111endif
1212
1313KEVM_PYK_DIR := ./kevm-pyk
14- POETRY := poetry -C $(KEVM_PYK_DIR )
15- POETRY_RUN := $(POETRY ) run --
14+ UV := uv --project $(KEVM_PYK_DIR )
15+ UV_RUN := $(UV ) run --
1616
17-
18- .PHONY : poetry-env download-json-fixtures
19- poetry-env :
20- $(POETRY ) env use --no-cache $(PYTHON_BIN )
21-
22- poetry : poetry-env
23- $(POETRY ) install
24-
25- shell : poetry
26- $(POETRY ) shell
27-
28- kevm-pyk : poetry-env
17+ .PHONY : kevm-pyk
18+ kevm-pyk :
2919 $(MAKE ) -C $(KEVM_PYK_DIR )
3020
3121
@@ -37,10 +27,12 @@ test: test-integration test-conformance test-prove test-interactive
3727
3828# Conformance Tests
3929
40- test-conformance : poetry
30+ .PHONY : test-conformance
31+ test-conformance :
4132 $(MAKE ) -C kevm-pyk/ test-integration PYTEST_ARGS+=" -k test_conformance.py"
4233
43- conformance-failing-list : poetry
34+ .PHONY : conformance-failing-list
35+ conformance-failing-list :
4436 cat /dev/null > tests/failing.llvm
4537 - $(MAKE ) -C kevm-pyk/ test-integration PYTEST_ARGS+=" -k test_conformance.py --save-failing --maxfail=10000"
4638 LC_ALL=en_US.UTF-8 sort -f -d -o tests/failing.llvm tests/failing.llvm
@@ -51,14 +43,15 @@ conformance-failing-list: poetry
5143 sed -i ' 1{/^[[:space:]]*$$/d;}' tests/failing.llvm ; \
5244 fi
5345
46+ .PHONY : download-json-fixtures
5447download-json-fixtures :
5548 rm -rf tests/execution-spec-tests/fixtures
5649 cd tests/execution-spec-tests && bash get_execution_spec_tests.sh
5750
58- test-fixtures : poetry download-json-fixtures
51+ test-fixtures : download-json-fixtures
5952 $(MAKE ) -C kevm-pyk/ test-integration PYTEST_ARGS+=" -k test_execution_spec_tests.py"
6053
61- fixtures-failing-list : poetry download-json-fixtures
54+ fixtures-failing-list : download-json-fixtures
6255 cat /dev/null > tests/execution-spec-tests/failing.llvm
6356 - $(MAKE ) -C kevm-pyk/ test-integration PYTEST_ARGS+=" -k test_execution_spec_tests.py --save-failing --maxfail=10000"
6457 LC_ALL=en_US.UTF-8 sort -f -d -o tests/execution-spec-tests/failing.llvm tests/execution-spec-tests/failing.llvm
@@ -69,49 +62,61 @@ fixtures-failing-list: poetry download-json-fixtures
6962 sed -i ' 1{/^[[:space:]]*$$/d;}' tests/execution-spec-tests/failing.llvm ; \
7063 fi
7164
72- test-vm : poetry
65+ .PHONY : test-vm
66+ test-vm :
7367 $(MAKE ) -C kevm-pyk/ test-integration PYTEST_ARGS+=" -k test_vm"
7468
75- test-rest-vm : poetry
69+ .PHONY : test-rest-vm
70+ test-rest-vm :
7671 $(MAKE ) -C kevm-pyk/ test-integration PYTEST_ARGS+=" -k test_rest_vm"
7772
78- test-bchain : poetry
73+ .PHONY : test-bchain
74+ test-bchain :
7975 $(MAKE ) -C kevm-pyk/ test-integration PYTEST_ARGS+=" -k test_bchain"
8076
81- test-rest-bchain : poetry
77+ .PHONY : test-rest-bchain
78+ test-rest-bchain :
8279 $(MAKE ) -C kevm-pyk/ test-integration PYTEST_ARGS+=" -k test_rest_bchain"
8380
8481
8582# Proof Tests
8683
8784test-prove : test-prove-rules test-prove-functional test-prove-optimizations test-prove-dss
8885
89- test-prove-rules : poetry
86+ .PHONY : test-prove-rules
87+ test-prove-rules :
9088 $(MAKE ) -C kevm-pyk/ test-integration PYTEST_ARGS+=" -k test_prove_rules"
9189
92- test-prove-functional : poetry
90+ .PHONY : test-prove-functional
91+ test-prove-functional :
9392 $(MAKE ) -C kevm-pyk/ test-integration PYTEST_ARGS+=" -k test_prove_functional"
9493
95- test-prove-optimizations : poetry
94+ .PHONY : test-prove-optimizations
95+ test-prove-optimizations :
9696 $(MAKE ) -C kevm-pyk/ test-integration PYTEST_ARGS+=" -k test_prove_optimizations"
9797
98- test-prove-summaries : poetry
98+ .PHONY : test-prove-summaries
99+ test-prove-summaries :
99100 $(MAKE ) -C kevm-pyk/ test-integration PYTEST_ARGS+=" -k test_prove_summaries"
100101
101- test-prove-dss : poetry
102+ .PHONY : test-prove-dss
103+ test-prove-dss :
102104 $(MAKE ) -C kevm-pyk/ test-integration PYTEST_ARGS+=" -k test_prove_dss"
103105
104106
105107# Integration Tests
106108
107- test-integration : poetry
108- $(MAKE ) -C kevm-pyk/ test-integration PYTEST_ARGS+=' -k "(test_kast.py or test_run.py or test_solc_to_k.py)"'
109+ .PHONY : test-integration
110+ test-integration :
111+ $(MAKE ) -C kevm-pyk/ test-integration PYTEST_ARGS+=' -k "(test_kast.py or test_run.py)"'
109112
110- profile : poetry
113+ .PHONY : profile
114+ profile :
111115 $(MAKE ) -C kevm-pyk/ profile
112116 find /tmp/pytest-of-$$(whoami ) /pytest-current/ -type f -name ' *.prof' | sort | xargs tail -n +1
113117
114- test-summarize : poetry
118+ .PHONY : test-summarize
119+ test-summarize :
115120 $(MAKE ) -C kevm-pyk/ test-integration PYTEST_ARGS+=' -k "test_summarize"'
116121
117122
@@ -126,31 +131,13 @@ KPROVE_EXT = k
126131KEVM_OPTS ?=
127132KPROVE_OPTS ?=
128133
129-
130- tests/specs/examples/% -bin-runtime.k : KEVM_OPTS += --verbose
131-
132- tests/specs/examples/erc20-spec/haskell/timestamp : tests/specs/examples/erc20-bin-runtime.k
133- tests/specs/examples/erc20-bin-runtime.k : tests/specs/examples/ERC20.sol $(KEVM_LIB ) /$(haskell_kompiled ) poetry
134- $(KEVM ) solc-to-k $< ERC20 $(KEVM_OPTS ) --verbose --definition $(KEVM_LIB ) /$(haskell_dir ) --main-module ERC20-VERIFICATION > $@
135-
136- tests/specs/examples/erc721-spec/haskell/timestamp : tests/specs/examples/erc721-bin-runtime.k
137- tests/specs/examples/erc721-bin-runtime.k : tests/specs/examples/ERC721.sol $(KEVM_LIB ) /$(haskell_kompiled ) poetry
138- $(KEVM ) solc-to-k $< ERC721 $(KEVM_OPTS ) --verbose --definition $(KEVM_LIB ) /$(haskell_dir ) --main-module ERC721-VERIFICATION > $@
139-
140- tests/specs/examples/storage-spec/haskell/timestamp : tests/specs/examples/storage-bin-runtime.k
141- tests/specs/examples/storage-bin-runtime.k : tests/specs/examples/Storage.sol $(KEVM_LIB ) /$(haskell_kompiled ) poetry
142- $(KEVM ) solc-to-k $< Storage $(KEVM_OPTS ) --verbose --definition $(KEVM_LIB ) /$(haskell_dir ) --main-module STORAGE-VERIFICATION > $@
143-
144- tests/specs/examples/empty-bin-runtime.k : tests/specs/examples/Empty.sol $(KEVM_LIB ) /$(haskell_kompiled ) poetry
145- $(KEVM ) solc-to-k $< Empty $(KEVM_OPTS ) --verbose --definition $(KEVM_LIB ) /$(haskell_dir ) --main-module EMPTY-VERIFICATION > $@
146-
147134.SECONDEXPANSION :
148135tests/specs/% .prove : tests/specs/% tests/specs/$$(firstword $$(subst /, ,$$* ) ) /$$(KPROVE_FILE ) /$(TEST_SYMBOLIC_BACKEND ) /timestamp
149- $(POETRY_RUN ) kevm-pyk prove $< $(KEVM_OPTS ) $(KPROVE_OPTS ) \
136+ $(UV_RUN ) kevm-pyk prove $< $(KEVM_OPTS ) $(KPROVE_OPTS ) \
150137 --definition tests/specs/$(firstword $(subst /, ,$* ) ) /$(KPROVE_FILE ) /$(TEST_SYMBOLIC_BACKEND )
151138
152139tests/specs/% /timestamp : tests/specs/$$(firstword $$(subst /, ,$$* ) ) /$$(KPROVE_FILE ) .$$(KPROVE_EXT )
153- $(POETRY_RUN ) kevm-pyk kompile-spec \
140+ $(UV_RUN ) kevm-pyk kompile-spec \
154141 $< \
155142 --target $(word 3, $(subst /, , $* ) ) \
156143 --output-definition tests/specs/$(firstword $(subst /, ,$* ) ) /$(KPROVE_FILE ) /$(word 3, $(subst /, , $* ) ) \
@@ -181,9 +168,9 @@ tests/ethereum-tests/BlockchainTests/GeneralStateTests/VMTests/%: KEVM_MODE
181168tests/ethereum-tests/BlockchainTests/GeneralStateTests/VMTests/% : KEVM_SCHEDULE = DEFAULT
182169
183170tests/% .run-interactive : tests/%
184- $(POETRY_RUN ) kevm-pyk run $< $(KEVM_OPTS ) $(KRUN_OPTS ) --target $(TEST_CONCRETE_BACKEND ) \
185- --mode $(KEVM_MODE ) --schedule $(KEVM_SCHEDULE ) --chainid $(KEVM_CHAINID ) \
186- > tests/$* .$(TEST_CONCRETE_BACKEND ) -out \
171+ $(UV_RUN ) kevm-pyk run $< $(KEVM_OPTS ) $(KRUN_OPTS ) --target $(TEST_CONCRETE_BACKEND ) \
172+ --mode $(KEVM_MODE ) --schedule $(KEVM_SCHEDULE ) --chainid $(KEVM_CHAINID ) \
173+ > tests/$* .$(TEST_CONCRETE_BACKEND ) -out \
187174 || $(CHECK ) tests/$* .$(TEST_CONCRETE_BACKEND ) -out tests/templates/output-success-$(TEST_CONCRETE_BACKEND ) .json
188175 $(KEEP_OUTPUTS ) || rm -rf tests/$* .$(TEST_CONCRETE_BACKEND ) -out
189176
0 commit comments