[Tests] Changed "--test_dir output" by "--test_dir=output"
- The first fails if output exists!!
This commit is contained in:
parent
0c9e049c11
commit
09fca23a42
|
|
@ -52,12 +52,12 @@ jobs:
|
||||||
# Create the caches with macros
|
# Create the caches with macros
|
||||||
python3-coverage run src/kibot --help-outputs > /dev/null
|
python3-coverage run src/kibot --help-outputs > /dev/null
|
||||||
# Individual run for specific tests
|
# Individual run for specific tests
|
||||||
# pytest --log-cli-level debug -k "test_ibom_parse_fail" --test_dir output
|
# pytest --log-cli-level debug -k "test_ibom_parse_fail" --test_dir=output
|
||||||
# Run the 90% faster tests (under 3 s)
|
# Run the 90% faster tests (under 3 s)
|
||||||
# Do it in parallel
|
# Do it in parallel
|
||||||
pytest -v --durations=0 -m "not slow" -n 2 --test_dir output
|
pytest -v --durations=0 -m "not slow" -n 2 --test_dir=output
|
||||||
# Run the slowest at the end and exit on the first error
|
# Run the slowest at the end and exit on the first error
|
||||||
pytest -v --durations=0 -m slow -x --test_dir output
|
pytest -v --durations=0 -m slow -x --test_dir=output
|
||||||
python3-coverage combine
|
python3-coverage combine
|
||||||
python3-coverage report
|
python3-coverage report
|
||||||
python3-coverage html -d output/htmlcov
|
python3-coverage html -d output/htmlcov
|
||||||
|
|
|
||||||
18
Makefile
18
Makefile
|
|
@ -47,8 +47,8 @@ test: lint
|
||||||
rm -f example.kibot.yaml
|
rm -f example.kibot.yaml
|
||||||
rm -f tests/.local
|
rm -f tests/.local
|
||||||
$(PY_COV) erase
|
$(PY_COV) erase
|
||||||
$(PYTEST) -m "not slow" -n 2 --test_dir output
|
$(PYTEST) -m "not slow" -n 2 --test_dir=output
|
||||||
$(PYTEST) -m "slow" --test_dir output
|
$(PYTEST) -m "slow" --test_dir=output
|
||||||
$(PY_COV) combine
|
$(PY_COV) combine
|
||||||
$(PY_COV) report
|
$(PY_COV) report
|
||||||
$(PY_COV) html
|
$(PY_COV) html
|
||||||
|
|
@ -60,7 +60,7 @@ test1:
|
||||||
rm -f example.kibot.yaml
|
rm -f example.kibot.yaml
|
||||||
rm -f tests/.local
|
rm -f tests/.local
|
||||||
$(PY_COV) erase
|
$(PY_COV) erase
|
||||||
$(PYTEST) --log-cli-level debug -k "test_bom_ok" --test_dir output
|
$(PYTEST) --log-cli-level debug -k "test_bom_ok" --test_dir=output
|
||||||
$(PY_COV) combine
|
$(PY_COV) combine
|
||||||
$(PY_COV) report
|
$(PY_COV) report
|
||||||
$(PY_COV) html
|
$(PY_COV) html
|
||||||
|
|
@ -78,7 +78,7 @@ test_docker_local_1:
|
||||||
# Also change the owner of the files to the current user (we run as root like in GitHub)
|
# Also change the owner of the files to the current user (we run as root like in GitHub)
|
||||||
#docker run --rm -it -v $(CWD):$(CWD) --workdir="$(CWD)" setsoft/kicad_auto_test:latest '/bin/bash'
|
#docker run --rm -it -v $(CWD):$(CWD) --workdir="$(CWD)" setsoft/kicad_auto_test:latest '/bin/bash'
|
||||||
docker run --rm -v $(CWD):$(CWD) --workdir="$(CWD)" setsoft/kicad_auto_test:latest \
|
docker run --rm -v $(CWD):$(CWD) --workdir="$(CWD)" setsoft/kicad_auto_test:latest \
|
||||||
/bin/bash -c "flake8 . --count --statistics ; python3-coverage run -a src/kibot --help-outputs > /dev/null; pytest-3 --log-cli-level debug -k 'test_print_pcb_svg_simple_2' --test_dir output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/board_samples/ tests/.config/kiplot/plugins/__pycache__/ tests/test_plot/fake_pcbnew/__pycache__/ tests/.config/kibot/plugins/__pycache__/ .coverage htmlcov/"
|
/bin/bash -c "flake8 . --count --statistics ; python3-coverage run -a src/kibot --help-outputs > /dev/null; pytest-3 --log-cli-level debug -k 'test_print_pcb_svg_simple_2' --test_dir=output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/board_samples/ tests/.config/kiplot/plugins/__pycache__/ tests/test_plot/fake_pcbnew/__pycache__/ tests/.config/kibot/plugins/__pycache__/ .coverage htmlcov/"
|
||||||
#$(PY_COV) report
|
#$(PY_COV) report
|
||||||
#x-www-browser htmlcov/index.html
|
#x-www-browser htmlcov/index.html
|
||||||
# The coverage used in the image is incompatible
|
# The coverage used in the image is incompatible
|
||||||
|
|
@ -91,7 +91,7 @@ test_docker_local_1_ki6:
|
||||||
# Run in the same directory to make the __pycache__ valid
|
# Run in the same directory to make the __pycache__ valid
|
||||||
# Also change the owner of the files to the current user (we run as root like in GitHub)
|
# Also change the owner of the files to the current user (we run as root like in GitHub)
|
||||||
docker run --rm -v $(CWD):$(CWD) --workdir="$(CWD)" setsoft/kicad_auto_test:ki6 \
|
docker run --rm -v $(CWD):$(CWD) --workdir="$(CWD)" setsoft/kicad_auto_test:ki6 \
|
||||||
/bin/bash -c "flake8 . --count --statistics ; python3-coverage run -a src/kibot --help-outputs > /dev/null; pytest-3 --log-cli-level debug -k 'test_dep_pytool' --test_dir output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/board_samples/ tests/.config/kiplot/plugins/__pycache__/ tests/test_plot/fake_pcbnew/__pycache__/ tests/.config/kibot/plugins/__pycache__/ .coverage htmlcov/"
|
/bin/bash -c "flake8 . --count --statistics ; python3-coverage run -a src/kibot --help-outputs > /dev/null; pytest-3 --log-cli-level debug -k 'test_dep_pytool' --test_dir=output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/board_samples/ tests/.config/kiplot/plugins/__pycache__/ tests/test_plot/fake_pcbnew/__pycache__/ tests/.config/kibot/plugins/__pycache__/ .coverage htmlcov/"
|
||||||
#$(PY_COV) report
|
#$(PY_COV) report
|
||||||
#x-www-browser htmlcov/index.html
|
#x-www-browser htmlcov/index.html
|
||||||
|
|
||||||
|
|
@ -102,7 +102,7 @@ test_docker_local:
|
||||||
# Run in the same directory to make the __pycache__ valid
|
# Run in the same directory to make the __pycache__ valid
|
||||||
# Also change the owner of the files to the current user (we run as root like in GitHub)
|
# Also change the owner of the files to the current user (we run as root like in GitHub)
|
||||||
docker run --rm -v $(CWD):$(CWD) --workdir="$(CWD)" setsoft/kicad_auto_test:latest \
|
docker run --rm -v $(CWD):$(CWD) --workdir="$(CWD)" setsoft/kicad_auto_test:latest \
|
||||||
/bin/bash -c "flake8 . --count --statistics ; python3-coverage run -a src/kibot --help-outputs ; pytest-3 --test_dir output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/board_samples/ .coverage htmlcov/"
|
/bin/bash -c "flake8 . --count --statistics ; python3-coverage run -a src/kibot --help-outputs ; pytest-3 --test_dir=output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/board_samples/ .coverage htmlcov/"
|
||||||
# $(PY_COV) report
|
# $(PY_COV) report
|
||||||
# x-www-browser htmlcov/index.html
|
# x-www-browser htmlcov/index.html
|
||||||
$(PY_COV) erase
|
$(PY_COV) erase
|
||||||
|
|
@ -114,7 +114,7 @@ test_docker_local_ki6:
|
||||||
# Run in the same directory to make the __pycache__ valid
|
# Run in the same directory to make the __pycache__ valid
|
||||||
# Also change the owner of the files to the current user (we run as root like in GitHub)
|
# Also change the owner of the files to the current user (we run as root like in GitHub)
|
||||||
docker run --rm -v $(CWD):$(CWD) --workdir="$(CWD)" setsoft/kicad_auto_test:ki6 \
|
docker run --rm -v $(CWD):$(CWD) --workdir="$(CWD)" setsoft/kicad_auto_test:ki6 \
|
||||||
/bin/bash -c "flake8 . --count --statistics ; python3-coverage run -a src/kibot --help-outputs ; pytest-3 --test_dir output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/board_samples/ .coverage htmlcov/"
|
/bin/bash -c "flake8 . --count --statistics ; python3-coverage run -a src/kibot --help-outputs ; pytest-3 --test_dir=output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/board_samples/ .coverage htmlcov/"
|
||||||
$(PY_COV) combine
|
$(PY_COV) combine
|
||||||
$(PY_COV) report
|
$(PY_COV) report
|
||||||
x-www-browser htmlcov/index.html
|
x-www-browser htmlcov/index.html
|
||||||
|
|
@ -132,7 +132,7 @@ docker_shell:
|
||||||
single_test:
|
single_test:
|
||||||
rm -rf pp
|
rm -rf pp
|
||||||
-$(PY_COV) run src/kibot --help-list-outputs > /dev/null
|
-$(PY_COV) run src/kibot --help-list-outputs > /dev/null
|
||||||
-$(PYTEST) --log-cli-level debug -k "$(SINGLE_TEST)" --test_dir pp
|
-$(PYTEST) --log-cli-level debug -k "$(SINGLE_TEST)" --test_dir=pp
|
||||||
@echo "********************" Output
|
@echo "********************" Output
|
||||||
@cat pp/*/output.txt
|
@cat pp/*/output.txt
|
||||||
@echo "********************" Error
|
@echo "********************" Error
|
||||||
|
|
@ -142,7 +142,7 @@ single_test:
|
||||||
single_tests:
|
single_tests:
|
||||||
rm -rf pp
|
rm -rf pp
|
||||||
# 12 threads, for a 6 core CPU w/HT. Almost 4 times faster for BoM tests.
|
# 12 threads, for a 6 core CPU w/HT. Almost 4 times faster for BoM tests.
|
||||||
-$(PYTEST) -n 12 --log-cli-level debug -k "$(SINGLE_TEST)" --test_dir pp
|
-$(PYTEST) -n 12 --log-cli-level debug -k "$(SINGLE_TEST)" --test_dir=pp
|
||||||
@rm -f tests/input_samples/bom.ini
|
@rm -f tests/input_samples/bom.ini
|
||||||
|
|
||||||
deb_clean:
|
deb_clean:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue