From 196b3c06a21b0ea3d0eb7b9274751ecb891bb1d7 Mon Sep 17 00:00:00 2001 From: Everett Hildenbrandt Date: Mon, 28 May 2018 14:41:53 -0600 Subject: .travis.yml: switch to using test.py for validating test schemas --- .travis.yml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to '.travis.yml') diff --git a/.travis.yml b/.travis.yml index a8cc9bd7a..26e0ce8b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,25 +1,17 @@ language: python python: - - "2.7" -node_js: - - "8" + - "3.6" branches: only: - master - develop sudo: false -install: "npm install jsonschema json-dup-key-validator" +install: "pip install jsonschema" script: # won't fail, but print problems - find . -name 'node_modules' -prune -o \( -name "*.json" -not -name "*Filler.json" -exec echo {} \; -exec python -mjson.tool {} /dev/null \; 2>&1 \) | grep -v -B 1 "^\./" | cat # will fail, if linting fails - find . -name 'node_modules' -prune -o \( -name "*.json" -not -name "*Filler.json" -print0 \) | xargs -I file -n1 -0 python -mjson.tool file /dev/null -# run schema tests against GeneralStateTests -- echo "Linting state tests" -- echo -e "$(find GeneralStateTests -name '*.json')" | node JSONSchema/validate.js JSONSchema/st-schema.json -- echo -e "$(find src/GeneralStateTestsFiller -name '*.json')" | node JSONSchema/validate.js JSONSchema/st-filler-schema.json - -# run schema tests against BlockchainTests -- echo "Linting blockchain tests" -- echo -e "$(find BlockchainTests -name '*.json')" | node JSONSchema/validate.js JSONSchema/bc-schema.json +# check test schemas +- python3 test.py validate ./src/VMTestsFiller ./src/GeneralStateTestsFiller ./VMTests ./GeneralStateTests ./BlockchainTests -- cgit