aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: c0ebb2131055e6bad2ad0b52af9be1643bf8a3b9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
ETHEREUM_TEST_PATH=$(CURDIR)
export ETHEREUM_TEST_PATH

tx_tests:=$(wildcard TransactionTests/*)
gs_tests:=$(wildcard GeneralStateTests/*)
bc_tests:=$(wildcard BlockchainTests/*)
vm_tests:=$(wildcard VMTests/*)
all_tests:=$(gs_tests) $(bc_tests) $(vm_tests)

tx_fillers:=$(wildcard src/TransactionTestsFiller/*)
gs_fillers:=$(wildcard src/GeneralStateTestsFiller/*)
bc_fillers:=$(wildcard src/BlockchainTestsFiller/*)
vm_fillers:=$(filter-out %.sol %.md, $(wildcard src/VMTestsFiller/*))
all_fillers:=$(gs_fillers) $(bc_fillers) $(vm_fillers)

all_schemas:=$(wildcard JSONSchema/*.json)

# Testset sanitation

sani: sani-schema sani-vm

sani-schema: $(all_schemas:=.format)

sani-vm: $(vm_tests:=.format) $(vm_fillers:=.format) \
         $(vm_tests:=.valid)  $(vm_fillers:=.valid)  \
         $(vm_tests:=.filled)

%.format:
    python3 test.py format ./$*
    git diff --quiet --exit-code &>/dev/null

%.valid:
    python3 test.py validate ./$*

%.filled:
    python3 test.py checkFilled ./$*

# Test running command

run-tests:=$(all-tests:=.test)
run: $(run-tests)

%.run:
    testeth -t $* -- --verbosity 2

# Test filling command

fill-tests:=$(all-tests:=.fill)
fill: $(fill-tests)

%.fill:
    testeth -t $* -- --filltests --verbosity 2 --all
    python3 test.py format ./$*