diff --git a/code/python/Makefile b/code/python/Makefile index e9c4822..9726919 100644 --- a/code/python/Makefile +++ b/code/python/Makefile @@ -21,12 +21,12 @@ endif # Macros ################################ -define create_folder_if_not_exists - @if ! [ -d "$(1)" ]; then mkdir "$(1)"; fi +define create_file_if_not_exists + @touch "$(1)"; endef define create_folder_if_not_exists - @touch "$(1)"; + if ! [ -d "$(1)" ]; then mkdir "$(1)"; fi endef define delete_if_file_exists @@ -63,13 +63,15 @@ all: setup run ################################ # TARGETS: testing ################################ -unit-test: unit-tests +tests: unit-tests unit-tests: - @cd tests && \ - ${PYTHON} -m unittest discover -v \ - --start-directory "." \ - --top-level-directory ".." \ - --pattern "test_*.py" + @# For logging purposes (since stdout is rechanneled): + @$(call delete_if_file_exists,logs/debug.log) + @$(call create_folder_if_not_exists,logs) + @$(call create_file_if_not_exists,logs/debug.log) + @# for python unit tests: + @${PYTHON} -m pytest tests --cache-clear --verbose -k test_ + @cat logs/debug.log ################################ # AUXILIARY (INTERNAL TARGETS) ################################ diff --git a/code/rust/Makefile b/code/rust/Makefile index 41365d7..6586695 100644 --- a/code/rust/Makefile +++ b/code/rust/Makefile @@ -19,12 +19,12 @@ endif # Macros ################################ -define create_folder_if_not_exists - @if ! [ -d "$(1)" ]; then mkdir "$(1)"; fi +define create_file_if_not_exists + @touch "$(1)"; endef define create_folder_if_not_exists - @touch "$(1)"; + @if ! [ -d "$(1)" ]; then mkdir "$(1)"; fi endef define delete_if_file_exists