From 58f09b20f5c9b8bf75b486b8aefaa5f7b5384919 Mon Sep 17 00:00:00 2001 From: protolambda Date: Thu, 28 Mar 2019 23:23:36 +0800 Subject: [PATCH] update CI, makefile has test runner now --- .circleci/config.yml | 8 +++----- Makefile | 5 ++--- py_tests/README.md | 6 ++++++ 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 411eb9230..efe4d0723 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 diff --git a/Makefile b/Makefile index 84dbd0c26..65839254a 100644 --- a/Makefile +++ b/Makefile @@ -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) diff --git a/py_tests/README.md b/py_tests/README.md index 86e2b541d..ca2bed4cc 100644 --- a/py_tests/README.md +++ b/py_tests/README.md @@ -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: