./.github/workflows/build.yml
Runs tox, codecov. Manually run with
tox -e py
https://tox.wiki/en/latest/installation.html
tox.ini
just run tox
or tox -e py
tox.ini also uses pylint, sphinx
https://coverage.readthedocs.io/en/7.3.2/
Triggered by tox. Manually run with:
coverage run --source=pymake -m pytest -vv
coverage combine
coverage report -m
https://docs.pytest.org/en/stable/
# run everything
PYTHONPATH=. pytest
# run verbose
PYTHONPATH=. pytest -v
# run just the shell tests
PYTHONPATH=. pytest -k shell
# run the shell tests with stdout showing
PYTHONPATH=. pytest -vv -s -k shell
On failure, pymake and its test code will write the failing test Makefile to log/fail.mk
The test/test_makefile.py runs several test/*.mk files through both GNU Make and pymake. The output is compared byte-by-byte. On failure, test/test_makefile.py will write the output of the both to /tmp with name "makefilename-test.txt" (the pymake output) and "makefilename-ground.txt" for the ground truth (the GNU Make output). For example, foreach.mk-test.txt and foreach.mk-ground.txt will contain the result of the tests/foreach.mk
https://pubs.opengroup.org/onlinepubs/9799919799/
Closely follow GNU Make's eval() function. Make doesn't have a formal grammar, reserved words, lexical structure. It's an organically grown set of conventions that have been added to over the years. No formal structure makes it very hard to parse. The only grammar documentation is the GNU Make source itself.
- try assignment expressions
- if not (1) then try conditional line
- if not (2) then try export/unxport
- if not (3) then try vpath
- if not (4) then try include/sinclude/-include
- if not (5) then try 'load' (NOT IMPLEMENTED IN PYMAKE)
- if not (6) then try rule+recipe
I keep tripping over this problem. Do not use embedded \n in a line fed to vline. The vline code assumes it receives an array of strings already split by newlines. The embedded newlines confuse the vline parser.
DO NOT DO THIS!!! "SRC\\n=\\nhello.c\\n\n", do this instead: "SRC\\n", "=\\n", "hello.c\\n", "\n"