From e45eaef9b6ec4af55402980aba726e860f771bb6 Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Thu, 10 Aug 2017 16:50:25 +0800 Subject: [PATCH 1/5] Makefile: Let "make check-help" work without running ./configure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently if you do "make check-help" in a fresh checkout, only an error is printed which is not nice: $ make check-help V=1 cc -nostdlib -o check-help.mo cc: fatal error: no input files compilation terminated. rules.mak:115: recipe for target 'check-help.mo' failed make: *** [check-help.mo] Error 1 Move the config-host.mak condition into the body of tests/Makefile.include and always include the rule for check-help. Reported-by: Philippe Mathieu-Daudé Signed-off-by: Fam Zheng Message-Id: <20170810085025.14076-1-famz@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Fam Zheng --- Makefile | 2 -- tests/Makefile.include | 46 +++++++++++++++++++++++------------------- 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/Makefile b/Makefile index 97a58a0f4e..81447b1f08 100644 --- a/Makefile +++ b/Makefile @@ -281,9 +281,7 @@ dummy := $(call unnest-vars,, \ common-obj-m \ trace-obj-y) -ifneq ($(wildcard config-host.mak),) include $(SRC_PATH)/tests/Makefile.include -endif all: $(DOCS) $(TOOLS) $(HELPERS-y) recurse-all modules diff --git a/tests/Makefile.include b/tests/Makefile.include index eb4895f94a..37c1bed683 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -1,3 +1,26 @@ + +.PHONY: check-help +check-help: + @echo "Regression testing targets:" + @echo + @echo " make check Run all tests" + @echo " make check-qtest-TARGET Run qtest tests for given target" + @echo " make check-qtest Run qtest tests" + @echo " make check-unit Run qobject tests" + @echo " make check-speed Run qobject speed tests" + @echo " make check-qapi-schema Run QAPI schema tests" + @echo " make check-block Run block tests" + @echo " make check-report.html Generates an HTML test report" + @echo " make check-clean Clean the tests" + @echo + @echo "Please note that HTML reports do not regenerate if the unit tests" + @echo "has not changed." + @echo + @echo "The variable SPEED can be set to control the gtester speed setting." + @echo "Default options are -k and (for make V=1) --verbose; they can be" + @echo "changed with variable GTESTER_OPTIONS." + +ifneq ($(wildcard config-host.mak),) export SRC_PATH qapi-py = $(SRC_PATH)/scripts/qapi.py $(SRC_PATH)/scripts/ordereddict.py @@ -802,27 +825,6 @@ $(check-qtest-y): $(qtest-obj-y) tests/test-qga: tests/test-qga.o $(qtest-obj-y) -.PHONY: check-help -check-help: - @echo "Regression testing targets:" - @echo - @echo " make check Run all tests" - @echo " make check-qtest-TARGET Run qtest tests for given target" - @echo " make check-qtest Run qtest tests" - @echo " make check-unit Run qobject tests" - @echo " make check-speed Run qobject speed tests" - @echo " make check-qapi-schema Run QAPI schema tests" - @echo " make check-block Run block tests" - @echo " make check-report.html Generates an HTML test report" - @echo " make check-clean Clean the tests" - @echo - @echo "Please note that HTML reports do not regenerate if the unit tests" - @echo "has not changed." - @echo - @echo "The variable SPEED can be set to control the gtester speed setting." - @echo "Default options are -k and (for make V=1) --verbose; they can be" - @echo "changed with variable GTESTER_OPTIONS." - SPEED = quick GTESTER_OPTIONS = -k $(if $(V),--verbose,-q) GCOV_OPTIONS = -n $(if $(V),-f,) @@ -917,3 +919,5 @@ all: $(QEMU_IOTESTS_HELPERS-y) -include $(wildcard tests/*.d) -include $(wildcard tests/libqos/*.d) + +endif From 6aef2ad70b2ab119bb93423ba916f3314e0ca012 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 28 Jul 2017 20:33:13 -0300 Subject: [PATCH 2/5] docker: use one package per line in CentOS config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This ease rebase/cherry-pick, also it is faster to visually find if a package is here. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20170728233316.13352-2-f4bug@amsat.org> Signed-off-by: Fam Zheng --- tests/docker/dockerfiles/centos6.docker | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/docker/dockerfiles/centos6.docker b/tests/docker/dockerfiles/centos6.docker index 17a4d24d54..9b91e832c2 100644 --- a/tests/docker/dockerfiles/centos6.docker +++ b/tests/docker/dockerfiles/centos6.docker @@ -1,8 +1,18 @@ FROM centos:6 RUN yum install -y epel-release -ENV PACKAGES libfdt-devel ccache \ - tar git make gcc g++ flex bison \ - zlib-devel glib2-devel SDL-devel pixman-devel \ - epel-release +ENV PACKAGES \ + bison \ + ccache \ + flex \ + g++ \ + gcc \ + git \ + glib2-devel \ + libfdt-devel \ + make \ + pixman-devel \ + SDL-devel \ + tar \ + zlib-devel RUN yum install -y $PACKAGES RUN rpm -q $PACKAGES | sort > /packages.txt From 18a2b7affce162af22d707eea4eff2131ba9536f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 28 Jul 2017 20:33:14 -0300 Subject: [PATCH 3/5] docker: add Xen libs to centos6 image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20170728233316.13352-3-f4bug@amsat.org> Signed-off-by: Fam Zheng --- tests/docker/dockerfiles/centos6.docker | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/docker/dockerfiles/centos6.docker b/tests/docker/dockerfiles/centos6.docker index 9b91e832c2..8588a12eab 100644 --- a/tests/docker/dockerfiles/centos6.docker +++ b/tests/docker/dockerfiles/centos6.docker @@ -1,5 +1,5 @@ FROM centos:6 -RUN yum install -y epel-release +RUN yum install -y epel-release centos-release-xen ENV PACKAGES \ bison \ ccache \ @@ -13,6 +13,7 @@ ENV PACKAGES \ pixman-devel \ SDL-devel \ tar \ + xen-devel \ zlib-devel RUN yum install -y $PACKAGES RUN rpm -q $PACKAGES | sort > /packages.txt From 06f3c7b852206dfeae886b54ef6ea6ba9f45bdb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 28 Jul 2017 20:33:15 -0300 Subject: [PATCH 4/5] docker: install more packages on CentOS to extend code coverage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20170728233316.13352-4-f4bug@amsat.org> Signed-off-by: Fam Zheng --- tests/docker/dockerfiles/centos6.docker | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/docker/dockerfiles/centos6.docker b/tests/docker/dockerfiles/centos6.docker index 8588a12eab..f6aae13f29 100644 --- a/tests/docker/dockerfiles/centos6.docker +++ b/tests/docker/dockerfiles/centos6.docker @@ -2,17 +2,27 @@ FROM centos:6 RUN yum install -y epel-release centos-release-xen ENV PACKAGES \ bison \ + bzip2-devel \ ccache \ + csnappy-devel \ flex \ g++ \ gcc \ git \ glib2-devel \ + libepoxy-devel \ libfdt-devel \ + librdmacm-devel \ + lzo-devel \ make \ + mesa-libEGL-devel \ + mesa-libgbm-devel \ pixman-devel \ SDL-devel \ + spice-glib-devel \ + spice-server-devel \ tar \ + vte-devel \ xen-devel \ zlib-devel RUN yum install -y $PACKAGES From a8132a2f288c260fb43243eb3c092b5186d84968 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 28 Jul 2017 20:33:16 -0300 Subject: [PATCH 5/5] docker: add centos7 image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20170728233316.13352-5-f4bug@amsat.org> Signed-off-by: Fam Zheng --- tests/docker/dockerfiles/centos7.docker | 31 +++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tests/docker/dockerfiles/centos7.docker diff --git a/tests/docker/dockerfiles/centos7.docker b/tests/docker/dockerfiles/centos7.docker new file mode 100644 index 0000000000..0b59aa2f26 --- /dev/null +++ b/tests/docker/dockerfiles/centos7.docker @@ -0,0 +1,31 @@ +FROM centos:7 +RUN yum install -y epel-release centos-release-xen +RUN yum -y update +ENV PACKAGES \ + bison \ + bzip2-devel \ + ccache \ + csnappy-devel \ + flex \ + g++ \ + gcc \ + git \ + glib2-devel \ + libepoxy-devel \ + libfdt-devel \ + librdmacm-devel \ + lzo-devel \ + make \ + mesa-libEGL-devel \ + mesa-libgbm-devel \ + pixman-devel \ + SDL-devel \ + spice-glib-devel \ + spice-server-devel \ + tar \ + vte-devel \ + xen-devel \ + zlib-devel +RUN yum install -y $PACKAGES +RUN rpm -q $PACKAGES | sort > /packages.txt +