From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58287) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1blGDj-00045D-2H for qemu-devel@nongnu.org; Sat, 17 Sep 2016 10:03:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1blGDi-0002dU-5u for qemu-devel@nongnu.org; Sat, 17 Sep 2016 10:03:54 -0400 Received: from mail-yw0-x242.google.com ([2607:f8b0:4002:c05::242]:33650) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1blGDi-0002dI-2X for qemu-devel@nongnu.org; Sat, 17 Sep 2016 10:03:54 -0400 Received: by mail-yw0-x242.google.com with SMTP id g192so5567336ywh.0 for ; Sat, 17 Sep 2016 07:03:53 -0700 (PDT) From: Pranith Kumar Date: Sat, 17 Sep 2016 10:03:44 -0400 Message-Id: <20160917140349.12431-3-bobby.prani@gmail.com> In-Reply-To: <20160917140349.12431-1-bobby.prani@gmail.com> References: <20160917140349.12431-1-bobby.prani@gmail.com> Subject: [Qemu-devel] [PATCH 2/6] tests/tcg: Move arm tests to arch specific folder List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: alex.bennee@linaro.org, rth@twiddle.net Signed-off-by: Pranith Kumar --- tests/tcg/arm/Makefile | 45 +++++++++++++++++++++++++++++++++++ tests/tcg/{ => arm}/hello-arm.c | 0 tests/tcg/{ => arm}/test-arm-iwmmxt.s | 0 3 files changed, 45 insertions(+) create mode 100644 tests/tcg/arm/Makefile rename tests/tcg/{ => arm}/hello-arm.c (100%) rename tests/tcg/{ => arm}/test-arm-iwmmxt.s (100%) diff --git a/tests/tcg/arm/Makefile b/tests/tcg/arm/Makefile new file mode 100644 index 0000000..c2ae491 --- /dev/null +++ b/tests/tcg/arm/Makefile @@ -0,0 +1,45 @@ +BUILD_DIR?=$(CURDIR) +SRC_PATH=../../../ +include $(BUILD_DIR)/config-host.mak +include $(SRC_PATH)/rules.mak + +$(call set-vpath, $(SRC_PATH)/tests/tcg/arm) + +QEMU=$(BUILD_DIR)/arm-linux-user/qemu-arm + +QEMU_INCLUDES += -I$(BUILD_DIR) +CFLAGS=-Wall -O2 -g -fno-strict-aliasing +LDFLAGS= + +# TODO: automatically detect ARM and MIPS compilers, and run those too + +# runcom maps page 0, so it requires root privileges +# also, pi_10.com runs indefinitely + +TESTS=hello-arm arm-iwmmxt + +all: $(patsubst %,run-%,$(TESTS)) +test: all + +# rules to run tests + +run-%: % + $(QEMU) ./$* + +#.PHONY: $(patsubst %,run-%,$(TESTS)) + +run-hello-arm: hello-arm +run-arm-iwmmxt: arm-iwmmxt + +# arm test +hello-arm: hello-arm.o + arm-linux-gnueabi-ld -o $@ $< + +hello-arm.o: hello-arm.c + arm-linux-gnueabi-gcc -Wall -g -O2 -c -o $@ $< + +arm-iwmmxt: test-arm-iwmmxt.s + cpp < $< | arm-linux-gnueabi-gcc -Wall -static -march=iwmmxt -mabi=aapcs -x assembler - -o $@ + +clean: + rm -f *~ *.o $(TESTS) diff --git a/tests/tcg/hello-arm.c b/tests/tcg/arm/hello-arm.c similarity index 100% rename from tests/tcg/hello-arm.c rename to tests/tcg/arm/hello-arm.c diff --git a/tests/tcg/test-arm-iwmmxt.s b/tests/tcg/arm/test-arm-iwmmxt.s similarity index 100% rename from tests/tcg/test-arm-iwmmxt.s rename to tests/tcg/arm/test-arm-iwmmxt.s -- 2.9.3