From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Jones Subject: [kvm-unit-tests PATCH 14/18] arm/arm64: allow building a single test Date: Thu, 5 Nov 2015 18:24:39 -0600 Message-ID: <1446769483-21586-15-git-send-email-drjones@redhat.com> References: <1446769483-21586-1-git-send-email-drjones@redhat.com> Cc: alex.bennee@linaro.org, cov@codeaurora.org To: pbonzini@redhat.com, kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:54508 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966050AbbKFAZ2 (ORCPT ); Thu, 5 Nov 2015 19:25:28 -0500 In-Reply-To: <1446769483-21586-1-git-send-email-drjones@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: This is mostly useful for building new tests that don't yet (and may never) have entries in the makefiles (config-arm*.mak). Of course it can be used to build tests that do have entries as well, in order to avoid building all tests, if the plan is to run just the one. Just do 'make TEST=some-test' to use it, where "some-test" matches the name of the source file, i.e. arm/some-test.c Signed-off-by: Andrew Jones --- config/config-arm-common.mak | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/config-arm-common.mak b/config/config-arm-common.mak index 698555d6a676f..937d408574751 100644 --- a/config/config-arm-common.mak +++ b/config/config-arm-common.mak @@ -13,6 +13,11 @@ tests-common = \ $(TEST_DIR)/selftest.flat \ $(TEST_DIR)/spinlock-test.flat +ifneq ($(TEST),) + tests = $(TEST_DIR)/$(TEST).flat + tests-common = +endif + all: test_cases ################################################################## @@ -68,5 +73,6 @@ generated_files = $(asm-offsets) test_cases: $(generated_files) $(tests-common) $(tests) +$(TEST_DIR)/$(TEST).elf: $(cstart.o) $(TEST_DIR)/$(TEST).o $(TEST_DIR)/selftest.elf: $(cstart.o) $(TEST_DIR)/selftest.o $(TEST_DIR)/spinlock-test.elf: $(cstart.o) $(TEST_DIR)/spinlock-test.o -- 2.4.3