[V16,8/9] libqblock: build: add rules for test case

Submitted by Wayne Xia on Jan. 29, 2013, 4:51 a.m.

Details

Message ID 1359435076-13673-9-git-send-email-xiawenc@linux.vnet.ibm.com
State New
Headers show

Commit Message

Wayne Xia Jan. 29, 2013, 4:51 a.m.
Libtool will be used for final link, the rules do nothing if
libqblock was disabled. Temp directory was used to store image
created in test, which will be deleted in clean.

Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
---
 tests/Makefile |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

Comments

Paolo Bonzini Jan. 29, 2013, 12:39 p.m.
Il 29/01/2013 05:51, Wenchao Xia ha scritto:
>   Libtool will be used for final link, the rules do nothing if
> libqblock was disabled. Temp directory was used to store image
> created in test, which will be deleted in clean.
> 
> Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
> ---
>  tests/Makefile |   13 ++++++++++++-
>  1 files changed, 12 insertions(+), 1 deletions(-)
> 
> diff --git a/tests/Makefile b/tests/Makefile
> index a653532..ac7f477 100644
> --- a/tests/Makefile
> +++ b/tests/Makefile
> @@ -134,9 +134,20 @@ qtest-obj-y = tests/libqtest.o libqemuutil.a libqemustub.a
>  qtest-obj-y += tests/libi2c.o tests/libi2c-omap.o
>  $(check-qtest-y): $(qtest-obj-y)
>  
> +#libqblock build rules
> +
> +LIBQBLOCK_TEST_DIR = tests/test_images
> +check-libqblock-$(CONFIG_LIBQBLOCK) = tests/check-libqblock-qcow2$(EXESUF)
> +$(check-libqblock-y): QEMU_INCLUDES += -I$(SRC_PATH)/tests -I$(SRC_PATH)/libqblock
> +
> +$(check-libqblock-y): %$(EXESUF): %.o libqblock.la
> +	$(call LINK, $^)
> +
> +check-unit-y += $(check-libqblock-y)
> +
>  #clean rules
>  
> -CHECK_CLEAN_TARGETS = $(check-unit-y) $(check-qtest-i386-y) $(check-qtest-x86_64-y) $(check-qtest-sparc64-y) $(check-qtest-sparc-y) tests/*.o
> +CHECK_CLEAN_TARGETS = $(check-unit-y) $(check-qtest-i386-y) $(check-qtest-x86_64-y) $(check-qtest-sparc64-y) $(check-qtest-sparc-y) tests/*.o $(check-libqblock-y) $(LIBQBLOCK_TEST_DIR)

Adding check-libqblock-y here is unnecessary, because it is part of
$(check-unit-y).

Paolo

>  .PHONY: check-help
>  check-help:
>

Patch hide | download patch | download mbox

diff --git a/tests/Makefile b/tests/Makefile
index a653532..ac7f477 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -134,9 +134,20 @@  qtest-obj-y = tests/libqtest.o libqemuutil.a libqemustub.a
 qtest-obj-y += tests/libi2c.o tests/libi2c-omap.o
 $(check-qtest-y): $(qtest-obj-y)
 
+#libqblock build rules
+
+LIBQBLOCK_TEST_DIR = tests/test_images
+check-libqblock-$(CONFIG_LIBQBLOCK) = tests/check-libqblock-qcow2$(EXESUF)
+$(check-libqblock-y): QEMU_INCLUDES += -I$(SRC_PATH)/tests -I$(SRC_PATH)/libqblock
+
+$(check-libqblock-y): %$(EXESUF): %.o libqblock.la
+	$(call LINK, $^)
+
+check-unit-y += $(check-libqblock-y)
+
 #clean rules
 
-CHECK_CLEAN_TARGETS = $(check-unit-y) $(check-qtest-i386-y) $(check-qtest-x86_64-y) $(check-qtest-sparc64-y) $(check-qtest-sparc-y) tests/*.o
+CHECK_CLEAN_TARGETS = $(check-unit-y) $(check-qtest-i386-y) $(check-qtest-x86_64-y) $(check-qtest-sparc64-y) $(check-qtest-sparc-y) tests/*.o $(check-libqblock-y) $(LIBQBLOCK_TEST_DIR)
 
 .PHONY: check-help
 check-help: