@@ -307,7 +307,44 @@ docker run -d --rm --name $1 -it $1 bash
307307docker exec -it $1 bash -c 'if [[ $$(python3 -V ) =~ "Python 3" ]] ; then echo "$$(python3 -V ) installed" ; else echo "No Python3 installation found" ; docker kill $1 ; exit 1 ; fi'
308308docker kill $1
309309endef
310-
310+
311+ test_python2_all : test_splunk_python2_all test_uf_python2_all
312+
313+ test_splunk_python2_all : test_splunk_centos7_python2 test_splunk_redhat8_python2 test_splunk_debian9_python2 test_splunk_debian10_python2
314+
315+ test_uf_python2_all : test_uf_centos7_python2 test_uf_redhat8_python2 test_uf_debian9_python2 test_uf_debian10_python2
316+
317+ test_splunk_centos7_python2 :
318+ $(call test_python2_installation, splunk-centos-7)
319+
320+ test_splunk_redhat8_python2 :
321+ $(call test_python2_installation, splunk-redhat-8)
322+
323+ test_splunk_debian9_python2 :
324+ $(call test_python2_installation, splunk-debian-9)
325+
326+ test_splunk_debian10_python2 :
327+ $(call test_python2_installation, splunk-debian-10)
328+
329+ test_uf_centos7_python2 :
330+ $(call test_python2_installation, uf-centos-7)
331+
332+ test_uf_redhat8_python2 :
333+ $(call test_python2_installation, uf-redhat-8)
334+
335+ test_uf_debian9_python2 :
336+ $(call test_python2_installation, uf-debian-9)
337+
338+ test_uf_debian10_python2 :
339+ $(call test_python2_installation, uf-debian-10)
340+
341+ # python2 version print to stderr, hence the 2>&1
342+ define test_python2_installation
343+ docker run -d --rm --name $1 -it $1 bash
344+ docker exec -it $1 bash -c 'if [[ $$(python -V 2>&1 ) =~ "Python 2" ]] ; then echo "$$(python -V 2>&1 ) is the default python" ; else echo "Python is not default to python2" ; docker kill $1 ; exit 1 ; fi'
345+ docker kill $1
346+ endef
347+
311348
312349setup_clair_scanner :
313350 mkdir clair-scanner-logs
0 commit comments