qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [RFC/POC PATCH 4/4] tests/tcg/Makefile: use docker target f


From: Alex Bennée
Subject: [Qemu-devel] [RFC/POC PATCH 4/4] tests/tcg/Makefile: use docker target for arm-tcg-tests
Date: Wed, 14 Dec 2016 17:12:44 +0000

This means we can type:

  make arm-tcg-tests

And through the power of docker and Debian's emdebian cross tools we
build the misc and arm TCG targets.

Signed-off-by: Alex Bennée <address@hidden>
---
 tests/tcg/Makefile.include | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/tests/tcg/Makefile.include b/tests/tcg/Makefile.include
index 3eff12527c..6d8d666203 100644
--- a/tests/tcg/Makefile.include
+++ b/tests/tcg/Makefile.include
@@ -8,6 +8,7 @@ BUILD_DIR?=$(CURDIR)
 include $(BUILD_DIR)/config-host.mak   # brings in SRC_PATH
 
 UNAME_M := $(shell uname -m)
+BUILD_UID = $(shell id -u)
 
 tests-tcg: prepare $(UNAME_M)
 
@@ -22,9 +23,22 @@ i386:
        cd $(BUILD_DIR)/i386-linux-user/tests/ && \
        make -f $(SRC_PATH)/tests/tcg/i386/Makefile
 
-arm:
-       cd $(BUILD_DIR)/arm-linux-user/tests/ && \
-       make -f $(SRC_PATH)/tests/tcg/arm/Makefile
+arm-tcg-tests: docker-image-debian-multiarch-cross
+       mkdir -p $(BUILD_DIR)/arm-linux-user/tests
+       docker run --rm -it -v $(SRC_PATH):$(SRC_PATH) \
+               -v $(BUILD_DIR):$(BUILD_DIR) \
+               --user $(BUILD_ID):$(BUILD_ID) \
+               -w $(BUILD_DIR)/arm-linux-user/tests \
+               -e CROSS_CC="arm-linux-gnueabihf-gcc" \
+               qemu:debian-multiarch-cross \
+               make -f ../../tests/tcg/misc/Makefile
+       docker run --rm -it -v $(SRC_PATH):$(SRC_PATH) \
+               -v $(BUILD_DIR):$(BUILD_DIR) \
+               --user $(BUILD_ID):$(BUILD_ID) \
+               -w $(BUILD_DIR)/arm-linux-user/tests \
+               -e CROSS_CC="arm-linux-gnueabihf-gcc" \
+               qemu:debian-multiarch-cross \
+               make -f ../../tests/tcg/arm/Makefile
 
 aarch64:
        cd $(BUILD_DIR)/aarch64-linux-user/tests/ && \
-- 
2.11.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]