update CI, makefile has test runner now

This commit is contained in:
protolambda 2019-03-28 23:23:36 +08:00
parent 05970c9383
commit 58f09b20f5
No known key found for this signature in database
GPG Key ID: EC89FDBB2B4C7623
3 changed files with 11 additions and 8 deletions

View File

@ -8,14 +8,12 @@ jobs:
steps:
- checkout
- run:
name: Build phase0 spec
command: make phase0
name: Build pyspec
command: make pyspec
- run:
name: run py-tests
command: |
. venv/bin/activate
pytest tests
command: make test
- run:
name: Generate YAML tests

View File

@ -2,7 +2,7 @@ SPEC_DIR = ./specs
SCRIPT_DIR = ./scripts
TEST_LIBS_DIR = ./test_libs
PY_SPEC_DIR = $(TEST_LIBS_DIR)/pyspec
PY_TEST_DIR = ./py_tests
YAML_TEST_DIR = ./yaml_tests
GENERATOR_DIR = ./test_generators
GENERATOR_VENVS_DIR = $(GENERATOR_DIR)/.venvs
@ -29,9 +29,8 @@ clean:
yaml_tests: $(YAML_TEST_TARGETS)
# runs a limited set of tests against a minimal config
# run pytest with `-m` option to full suite
test: $(PY_SPEC_TARGETS)
pytest -m minimal_config tests/
cd $(PY_TEST_DIR); python3 -m venv venv; . venv/bin/activate; pip3 install -r requirements.txt; pytest -m minimal_config .
# "make pyspec" to create the pyspec for all phases.
pyspec: $(PY_SPEC_TARGETS)

View File

@ -8,6 +8,12 @@ There are ideas to port these tests to the YAML test suite,
## How to run tests
### Automated
Run `make test` from the root of the spec repository.
### Manual
From within the py_tests folder:
Install dependencies: