From: "Alex Bennée" <alex.bennee@linaro.org>
To: Pranith Kumar <bobby.prani@gmail.com>
Cc: qemu-devel@nongnu.org, rth@twiddle.net
Subject: Re: [Qemu-devel] [PATCH v2 1/4] tests/tcg: Move arm tests to arch specific folder
Date: Fri, 09 Sep 2016 15:43:53 +0100 [thread overview]
Message-ID: <87wpil3zh2.fsf@linaro.org> (raw)
In-Reply-To: <20160829224920.16686-2-bobby.prani@gmail.com>
Pranith Kumar <bobby.prani@gmail.com> writes:
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
> ---
> 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
next prev parent reply other threads:[~2016-09-09 14:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-29 22:49 [Qemu-devel] [PATCH v2 0/4] Clean up TCG tests Pranith Kumar
2016-08-29 22:49 ` [Qemu-devel] [PATCH v2 1/4] tests/tcg: Move arm tests to arch specific folder Pranith Kumar
2016-09-09 14:43 ` Alex Bennée [this message]
2016-08-29 22:49 ` [Qemu-devel] [PATCH v2 2/4] tests/tcg: Move mips test " Pranith Kumar
2016-08-29 22:49 ` [Qemu-devel] [PATCH v2 3/4] tests/tcg: Create and populate misc tests for arch independent tests Pranith Kumar
2016-09-09 14:55 ` Alex Bennée
2016-09-09 16:04 ` Alex Bennée
2016-08-29 22:49 ` [Qemu-devel] [PATCH v2 4/4] tests/tcg: Add tests-tcg hook in Makefile Pranith Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wpil3zh2.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=bobby.prani@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.