[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libosinfo] [osinfo-db PATCH] Only use pytest --log-level arg if it is supported



Older versions of pytest don't have the --log-level arg

Signed-off-by: Daniel P. Berrangé <berrange redhat com>
---
 Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 254b7af..c63cb6e 100644
--- a/Makefile
+++ b/Makefile
@@ -34,6 +34,8 @@ ZANATA = zanata
 
 PYTHON = python3
 
+PYTEST_LOG_LEVEL = $(shell $(PYTHON) -m pytest --help | grep log-level >/dev/null && echo "--log-level=info")
+
 V = 0
 
 V_I18N = $(V_I18N_$(V))
@@ -121,4 +123,4 @@ update-po:
         done
 
 check: $(DATA_FILES) $(SCHEMA_FILES)
-	$(PYTHON) -m pytest --log-level=info
+	$(PYTHON) -m pytest $(PYTEST_LOG_LEVEL)
-- 
2.20.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]