aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEverett Hildenbrandt <hildenb2@illinois.edu>2018-06-01 13:17:18 +0800
committerEverett Hildenbrandt <hildenb2@illinois.edu>2018-06-02 03:21:25 +0800
commitb756fc34083cec2b81651763e1ac7508f01d7013 (patch)
treea6c13e8000827e157d89847f689ecf9638fa7564
parent51e6499aa198cdb5476de083084d5affec408c26 (diff)
downloaddexon-tests-b756fc34083cec2b81651763e1ac7508f01d7013.tar.gz
dexon-tests-b756fc34083cec2b81651763e1ac7508f01d7013.tar.zst
dexon-tests-b756fc34083cec2b81651763e1ac7508f01d7013.zip
Makefile, .travis.yml: test sanitation of VMTests via python file
- disallow the sol and md files in src/VMTestsFiller - only handling VMTests currently, because of massive formatting changes needed
-rw-r--r--.travis.yml11
-rw-r--r--Makefile42
2 files changed, 30 insertions, 23 deletions
diff --git a/.travis.yml b/.travis.yml
index 7b8ce0189..8f03627c2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,12 +9,5 @@ sudo: false
install: "pip install pyyaml jsonschema pysha3"
script:
-# check valid JSON/well formatted
-- python3 test.py format ;
- git diff --quiet &>/dev/null ;
-
-# check test schemas
- python3 test.py validate ./src/VMTestsFiller ./src/GeneralStateTestsFiller ./src/BlockchainTestsFiller ./VMTests ./GeneralStateTests ./BlockchainTests ;
-
-# check test filled
- python3 test.py checkFilled ./BlockhcainTests ./GeneralStateTests ./TransactionTests ./VMTests
+# sanitation checks against testsets
+- make sani
diff --git a/Makefile b/Makefile
index 0e0d4df84..e8e5e29a4 100644
--- a/Makefile
+++ b/Makefile
@@ -5,26 +5,40 @@ tx_tests:=$(wildcard TransactionTests/*)
gs_tests:=$(wildcard GeneralStateTests/*)
bc_tests:=$(wildcard BlockchainTests/*)
vm_tests:=$(wildcard VMTests/*)
-all_tests:=$(tx_tests) $(gs_tests) $(bc_tests) $(vm_tests)
+all_tests:=$(gs_tests) $(bc_tests) $(vm_tests)
-fill-tx: $(tx_tests:=.fill)
-fill-gs: $(gs_tests:=.fill)
-fill-bc: $(bc_tests:=.fill)
-fill-vm: $(vm_tests:=.fill)
-fill-all: fill-tx fill-gs fill-bc fill-vm
+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)
-test-tx: $(tx_tests:=.test)
-test-gs: $(gs_tests:=.test)
-test-bc: $(bc_tests:=.test)
-test-vm: $(vm_tests:=.test)
-test-all: test-tx test-gs test-bc test-vm
+all_schemas:=$(wildcard JSONSchema/*.json)
-# Testing command
+# Testset sanitation
-%.test:
+sani: $(all_schemas:=.format) $(vm_fillers:=.format) $(vm_tests:=.format)
+
+%.format:
+ python3 test.py format ./$*
+ git diff --quiet --exit-code &>/dev/null
+
+%.sani:
+ python3 test.py validate ./$*
+ python3 test.py checkFilled ./$*
+
+# Test running command
+
+run-tests:=$(all-tests:=.test)
+run: $(run-tests)
+
+%.run:
testeth -t $* -- --verbosity 2
-# Actual filling command
+# Test filling command
+
+fill-tests:=$(all-tests:=.fill)
+fill: $(fill-tests)
%.fill:
testeth -t $* -- --filltests --verbosity 2