Skip to content

Commit 3a7ca17

Browse files
[DEBUG] part n+6 of many debugging
### ChangeLog: Changes in file .github/tool_checkmake.sh: process_checkmake_output() { Changes in file Makefile: ifeq "$(RM)" "" install: init build must_be_root must_have_flake:
1 parent 6e55de9 commit 3a7ca17

File tree

2 files changed

+61
-59
lines changed

2 files changed

+61
-59
lines changed

.github/tool_checkmake.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ process_checkmake_output() {
132132
grep -F "${file}" | \
133133
sed -E -e 's/^[[:space:]]+//g' | \
134134
while IFS= read -r line; do
135-
printf "%s\n" "::warning file=${file},title=LINT::${line}: ${emsg}" >&2
135+
printf "%s\n" "::warning file=${file},title=LINT::${line} ${emsg}" >&2
136136
done
137137
return 1
138138
else

Makefile

Lines changed: 60 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -139,27 +139,10 @@ ifeq "$(RMDIR)" ""
139139
RMDIR=$(RM)Rd
140140
endif
141141

142-
.PHONY: cleanup init clean-docs must_be_root must_have_flake must_have_pytest uninstall
142+
.PHONY: all clean test cleanup init help clean-docs must_be_root must_have_flake must_have_pytest uninstall cleanup-dev-backups
143143

144144
help:
145-
$(QUIET)$(ECHO) "HELP"
146-
$(QUIET)$(ECHO) " * house-keeping" ;
147-
$(QUIET)$(ECHO) " make help - this help text" ;
148-
$(QUIET)$(ECHO) " make build - packages the module" ;
149-
$(QUIET)$(ECHO) " make clean - cleans up a bit" ;
150-
$(QUIET)$(ECHO) " make init - sets up requirements for first time" ;
151-
$(QUIET)$(ECHO) " * install/remove" ;
152-
$(QUIET)$(ECHO) " make install - installs the module properly" ;
153-
$(QUIET)$(ECHO) " make user-install - trys an unprivliged install (may not work for some users)" ;
154-
$(QUIET)$(ECHO) " make uninstall - uninstalls the module" ;
155-
$(QUIET)$(ECHO) " make purge - uninstalls the module, and resets most related things" ;
156-
$(QUIET)$(ECHO) " (the big exception is init)" ;
157-
$(QUIET)$(ECHO) " * misc" ;
158-
$(QUIET)$(ECHO) " make build-docs - generate documentation (using sphinx)" ;
159-
$(QUIET)$(ECHO) " make test - run minimal acceptance testing" ;
160-
$(QUIET)$(ECHO) " make test-style - run some code-style testing" ;
161-
$(QUIET)$(ECHO) " make test-pytest - run extensive testing (with pytest)" ;
162-
$(QUIET)$(ECHO) "" ;
145+
$(QUIET)printf "HELP\nHouse-keeping:\n\tmake help - this help text\n\tmake build - packages the module\n\tmake clean - cleans up a bit\n\tmake init - sets up requirements for first time\nInstall/Remove:\n\tmake install - installs the module properly\n\tmake user-install - tries an unprivileged install (may not work for some users)\n\tmake uninstall - uninstalls the module\n\tmake purge - uninstalls the module, and resets most related things\n\t\t(the big exception is init)\nMisc:\n\tmake build-docs - generate documentation (using sphinx)\n\tmake test - run minimal acceptance testing\n\tmake test-style - run some code-style testing\n\tmake test-pytest - run extensive testing (with pytest)\n\n";
163146

164147
MANIFEST.in: init
165148
$(QUIET)$(ECHO) "include requirements.txt" >"$@" ;
@@ -202,20 +185,25 @@ uninstall:
202185
$(QUITE)$(WAIT)
203186
$(QUIET)$(ECHO) "$@: Done."
204187

205-
purge: clean uninstall
188+
legacy-purge: clean uninstall
206189
$(QUIET)$(PYTHON) -W ignore ./setup.py uninstall 2>$(ERROR_LOG_PATH) || :
207190
$(QUIET)$(PYTHON) -W ignore ./setup.py clean 2>$(ERROR_LOG_PATH) || :
208191
$(QUIET)$(RMDIR) ./build/ 2>$(ERROR_LOG_PATH) || :
209192
$(QUIET)$(RMDIR) ./dist/ 2>$(ERROR_LOG_PATH) || :
210193
$(QUIET)$(RMDIR) ./.eggs/ 2>$(ERROR_LOG_PATH) || :
211-
$(QUIET)$(RM) ./test-reports/junit.xml 2>$(ERROR_LOG_PATH) || :
194+
195+
purge: legacy-purge
196+
$(QUIET)$(RM) ./test-reports/*.xml 2>$(ERROR_LOG_PATH) || :
212197
$(QUIET)$(RMDIR) ./test-reports/ 2>$(ERROR_LOG_PATH) || :
213198
$(QUIET)$(ECHO) "$@: Done."
214199

215-
test: cleanup MANIFEST.in
200+
just-test: cleanup MANIFEST.in
216201
$(QUIET)$(COVERAGE) run -p --source=multicast -m unittest discover --verbose --buffer -s ./tests -t $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) || $(PYTHON) -m unittest discover --verbose --buffer -s ./tests -t ./ || DO_FAIL="exit 2" ;
217202
$(QUITE)$(WAIT) ;
218203
$(QUIET)$(DO_FAIL) ;
204+
205+
test: just-test
206+
$(QUIET)$(DO_FAIL) ;
219207
$(QUIET)$(COVERAGE) combine 2>$(ERROR_LOG_PATH) || : ;
220208
$(QUIET)$(COVERAGE) report -m --include=* 2>$(ERROR_LOG_PATH) || : ;
221209
$(QUIET)$(ECHO) "$@: Done."
@@ -260,51 +248,65 @@ must_have_pytest: init
260248
$(QUIET)runner=`$(PYTHON) -m pip freeze --all | grep --count -oF pytest` ; \
261249
if test $$runner -le 0 ; then $(ECHO) "No python framework (pytest) found for test." ; exit 126 ; fi
262250

263-
cleanup:
264-
$(QUIET)$(RM) tests/*.pyc 2>$(ERROR_LOG_PATH) || true
265-
$(QUIET)$(RM) tests/*~ 2>$(ERROR_LOG_PATH) || true
266-
$(QUIET)$(RM) tests/__pycache__/* 2>$(ERROR_LOG_PATH) || true
267-
$(QUIET)$(RM) __pycache__/* 2>$(ERROR_LOG_PATH) || true
251+
cleanup-dev-backups::
252+
$(QUIET)$(RM) ./*/*~ 2>$(ERROR_LOG_PATH) || :
253+
$(QUIET)$(RM) ./.*/*~ 2>$(ERROR_LOG_PATH) || :
254+
$(QUIET)$(RM) ./**/*~ 2>$(ERROR_LOG_PATH) || :
255+
$(QUIET)$(RM) ./*~ 2>$(ERROR_LOG_PATH) || :
256+
$(QUIET)$(RM) ./.*~ 2>$(ERROR_LOG_PATH) || :
257+
258+
cleanup-mac-dir-store::
259+
$(QUIET)$(RM) ./.DS_Store 2>$(ERROR_LOG_PATH) || :
260+
$(QUIET)$(RM) ./*/.DS_Store 2>$(ERROR_LOG_PATH) || :
261+
$(QUIET)$(RM) ./*/.DS_Store 2>$(ERROR_LOG_PATH) || :
262+
$(QUIET)$(RM) ./*/**/.DS_Store 2>$(ERROR_LOG_PATH) || :
263+
264+
cleanup-py-caches: cleanup-dev-backups cleanup-mac-dir-store
265+
$(QUIET)$(RM) ./*.pyc 2>$(ERROR_LOG_PATH) || :
266+
$(QUIET)$(RM) ./*/*.pyc 2>$(ERROR_LOG_PATH) || :
267+
$(QUIET)$(RM) ./*/__pycache__/* 2>$(ERROR_LOG_PATH) || :
268+
$(QUIET)$(RM) ./*/*/*.pyc 2>$(ERROR_LOG_PATH) || :
269+
270+
cleanup-py-cache-dirs: cleanup-py-caches
271+
$(QUIET)$(RMDIR) ./tests/__pycache__ 2>$(ERROR_LOG_PATH) || :
272+
$(QUIET)$(RMDIR) ./*/__pycache__ 2>$(ERROR_LOG_PATH) || :
273+
$(QUIET)$(RMDIR) ./*/*/__pycache__ 2>$(ERROR_LOG_PATH) || :
274+
$(QUIET)$(RMDIR) ./__pycache__ 2>$(ERROR_LOG_PATH) || :
275+
276+
cleanup-hypothesis::
277+
$(QUIET)$(RM) ./.hypothesis/**/* 2>$(ERROR_LOG_PATH) || true
278+
$(QUIET)$(RM) ./.hypothesis/* 2>$(ERROR_LOG_PATH) || true
279+
$(QUIET)$(RMDIR) ./.hypothesis/ 2>$(ERROR_LOG_PATH) || true
280+
281+
cleanup-tests: cleanup-hypothesis cleanup-py-cache-dirs cleanup-py-caches
282+
$(QUIET)$(RM) ./test_env/**/* 2>$(ERROR_LOG_PATH) || true
283+
$(QUIET)$(RM) ./test_env/* 2>$(ERROR_LOG_PATH) || true
284+
$(QUIET)$(RMDIR) ./test_env/ 2>$(ERROR_LOG_PATH) || true
285+
$(QUIET)$(RMDIR) .pytest_cache/ 2>$(ERROR_LOG_PATH) || true
286+
$(QUIET)$(RMDIR) ./.tox/ 2>$(ERROR_LOG_PATH) || true
287+
288+
cleanup-multicast: cleanup-py-cache-dirs cleanup-py-caches
268289
$(QUIET)$(RM) multicast/*.pyc 2>$(ERROR_LOG_PATH) || true
269290
$(QUIET)$(RM) multicast/*~ 2>$(ERROR_LOG_PATH) || true
270291
$(QUIET)$(RM) multicast/__pycache__/* 2>$(ERROR_LOG_PATH) || true
271292
$(QUIET)$(RM) multicast/*/*.pyc 2>$(ERROR_LOG_PATH) || true
272-
$(QUIET)$(RM) multicast/*/*~ 2>$(ERROR_LOG_PATH) || true
273-
$(QUIET)$(RM) multicast/*.DS_Store 2>$(ERROR_LOG_PATH) || true
274-
$(QUIET)$(RM) multicast/*/*.DS_Store 2>$(ERROR_LOG_PATH) || true
275-
$(QUIET)$(RM) multicast/.DS_Store 2>$(ERROR_LOG_PATH) || true
276-
$(QUIET)$(RM) multicast/*/.DS_Store 2>$(ERROR_LOG_PATH) || true
277-
$(QUIET)$(RM) tests/.DS_Store 2>$(ERROR_LOG_PATH) || true
278-
$(QUIET)$(RM) tests/*/.DS_Store 2>$(ERROR_LOG_PATH) || true
293+
294+
cleanup-multicast-eggs: cleanup-dev-backups cleanup-mac-dir-store
279295
$(QUIET)$(RM) multicast.egg-info/* 2>$(ERROR_LOG_PATH) || true
280-
$(QUIET)$(RM) ./*.pyc 2>$(ERROR_LOG_PATH) || true
281-
$(QUIET)$(RM) ./.coverage 2>$(ERROR_LOG_PATH) || true
282-
$(QUIET)$(RM) ./coverage*.xml 2>$(ERROR_LOG_PATH) || true
283-
$(QUIET)$(RM) ./sitecustomize.py 2>$(ERROR_LOG_PATH) || true
284-
$(QUIET)$(RM) ./.DS_Store 2>$(ERROR_LOG_PATH) || true
285-
$(QUIET)$(RM) ./*/.DS_Store 2>$(ERROR_LOG_PATH) || true
286-
$(QUIET)$(RM) ./*/*~ 2>$(ERROR_LOG_PATH) || true
287-
$(QUIET)$(RM) ./.*/*~ 2>$(ERROR_LOG_PATH) || true
288-
$(QUIET)$(RM) ./*~ 2>$(ERROR_LOG_PATH) || true
289-
$(QUIET)$(RM) ./.*~ 2>$(ERROR_LOG_PATH) || true
296+
$(QUIET)$(RMDIR) multicast.egg-info 2>$(ERROR_LOG_PATH) || true
297+
$(QUIET)$(RMDIR) .eggs 2>$(ERROR_LOG_PATH) || true
298+
$(QUIET)$(RMDIR) ./.eggs/ 2>$(ERROR_LOG_PATH) || true
299+
300+
cleanup-src-dir: cleanup-dev-backups cleanup-mac-dir-store
290301
$(QUIET)$(RM) ./src/**/* 2>$(ERROR_LOG_PATH) || true
291302
$(QUIET)$(RM) ./src/* 2>$(ERROR_LOG_PATH) || true
292-
$(QUIET)$(RM) ./test_env/**/* 2>$(ERROR_LOG_PATH) || true
293-
$(QUIET)$(RM) ./test_env/* 2>$(ERROR_LOG_PATH) || true
294-
$(QUIET)$(RM) ./.hypothesis/**/* 2>$(ERROR_LOG_PATH) || true
295-
$(QUIET)$(RM) ./.hypothesis/* 2>$(ERROR_LOG_PATH) || true
296303
$(QUIET)$(RMDIR) ./src/ 2>$(ERROR_LOG_PATH) || true
297-
$(QUIET)$(RMDIR) tests/__pycache__ 2>$(ERROR_LOG_PATH) || true
298-
$(QUIET)$(RMDIR) multicast/__pycache__ 2>$(ERROR_LOG_PATH) || true
299-
$(QUIET)$(RMDIR) multicast/*/__pycache__ 2>$(ERROR_LOG_PATH) || true
300-
$(QUIET)$(RMDIR) ./__pycache__ 2>$(ERROR_LOG_PATH) || true
301-
$(QUIET)$(RMDIR) multicast.egg-info 2>$(ERROR_LOG_PATH) || true
302-
$(QUIET)$(RMDIR) .pytest_cache/ 2>$(ERROR_LOG_PATH) || true
303-
$(QUIET)$(RMDIR) .eggs 2>$(ERROR_LOG_PATH) || true
304-
$(QUIET)$(RMDIR) ./test_env/ 2>$(ERROR_LOG_PATH) || true
304+
305+
cleanup: cleanup-tests cleanup-multicast cleanup-multicast-eggs cleanup-src-dir
306+
$(QUIET)$(RM) ./.coverage 2>$(ERROR_LOG_PATH) || true
307+
$(QUIET)$(RM) ./coverage*.xml 2>$(ERROR_LOG_PATH) || true
308+
$(QUIET)$(RM) ./sitecustomize.py 2>$(ERROR_LOG_PATH) || true
305309
$(QUIET)$(RMDIR) ./test-reports/ 2>$(ERROR_LOG_PATH) || true
306-
$(QUIET)$(RMDIR) ./.tox/ 2>$(ERROR_LOG_PATH) || true
307-
$(QUIET)$(RMDIR) ./.hypothesis/ 2>$(ERROR_LOG_PATH) || true
308310
$(QUIET)$(WAIT) ;
309311

310312
build-docs: ./docs/ ./docs/Makefile docs-reqs

0 commit comments

Comments
 (0)