From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54878) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biN2B-0004Xq-Ln for qemu-devel@nongnu.org; Fri, 09 Sep 2016 10:44:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1biN25-0000DF-QD for qemu-devel@nongnu.org; Fri, 09 Sep 2016 10:44:02 -0400 Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]:37519) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biN25-0000Cx-C5 for qemu-devel@nongnu.org; Fri, 09 Sep 2016 10:43:57 -0400 Received: by mail-wm0-x22f.google.com with SMTP id w12so37254582wmf.0 for ; Fri, 09 Sep 2016 07:43:56 -0700 (PDT) References: <20160829224920.16686-1-bobby.prani@gmail.com> <20160829224920.16686-2-bobby.prani@gmail.com> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <20160829224920.16686-2-bobby.prani@gmail.com> Date: Fri, 09 Sep 2016 15:43:53 +0100 Message-ID: <87wpil3zh2.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v2 1/4] tests/tcg: Move arm tests to arch specific folder List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pranith Kumar Cc: qemu-devel@nongnu.org, rth@twiddle.net Pranith Kumar writes: > 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..da92305 > --- /dev/null > +++ b/tests/tcg/arm/Makefile > @@ -0,0 +1,45 @@ > +BUILD_DIR=../../../build/ I think this needs to come from the calling Makefile or be set if being called direct: BUILD_DIR?=$(CURDIR) The BUILD_DIR can be outside of the tree. > +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 $@ The ld/gcc/cpp calls need to be done via env variables so they can be changed easily. > + > +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 -- Alex Bennée