qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Pranith Kumar <bobby.prani@gmail.com>
To: qemu-devel@nongnu.org
Cc: alex.bennee@linaro.org, rth@twiddle.net
Subject: [Qemu-devel] [PATCH v2 1/4] tests/tcg: Move arm tests to arch specific folder
Date: Mon, 29 Aug 2016 18:49:16 -0400	[thread overview]
Message-ID: <20160829224920.16686-2-bobby.prani@gmail.com> (raw)
In-Reply-To: <20160829224920.16686-1-bobby.prani@gmail.com>

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/
+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

  reply	other threads:[~2016-08-29 22:49 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 ` Pranith Kumar [this message]
2016-09-09 14:43   ` [Qemu-devel] [PATCH v2 1/4] tests/tcg: Move arm tests to arch specific folder Alex Bennée
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=20160829224920.16686-2-bobby.prani@gmail.com \
    --to=bobby.prani@gmail.com \
    --cc=alex.bennee@linaro.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).