Skip to content

Commit

Permalink
Makefile fixes: don't force recrating of virtualenv
Browse files Browse the repository at this point in the history
Everytime that we run the tests we create a temporary virtualenv.
This is nice for idempotency, but really a killer for SSDs on developers
machines.
I would recommend also to document the ramdisks target, since running
the tests in the ramdisk should be faster.
  • Loading branch information
oz123 committed May 17, 2022
1 parent 658d19a commit 0163ada
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ ramdisk-virtualenv: ramdisk

.PHONY: virtualenv
virtualenv:
[ ! -e $(venv_dir) ] && rm -rf $(venv_file) && python -m venv $(venv_dir)
[ ! -e $(venv_dir) ] && rm -rvf $(venv_file) && python -m venv $(venv_dir)
@echo $(venv_dir) >> $(venv_file)

.PHONY: test-install
test-install: virtualenv
test-install:
. $(get_venv_path)/bin/activate && \
python -m pip install --upgrade pip -e .[tests,dev] && \
pipenv install --dev
Expand All @@ -67,7 +67,7 @@ submodules:

.PHONY: tests
tests: parallel ?= -n auto
tests: virtualenv submodules test-install
tests: submodules test-install
. $(get_venv_path)/bin/activate && \
pipenv run pytest -ra $(parallel) -vvv --full-trace --tb=long

Expand Down

0 comments on commit 0163ada

Please sign in to comment.