From patchwork Tue Mar 12 17:09:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 160149 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp13365894jad; Tue, 12 Mar 2019 10:29:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqy2YAsCNrSa97/3I89endgdzSf7AcKABIHPAM9TxVyx8dT9NkVXzWERYK1wOWK+xzIad/nv X-Received: by 2002:a25:b28e:: with SMTP id k14mr15011888ybj.501.1552411754915; Tue, 12 Mar 2019 10:29:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552411754; cv=none; d=google.com; s=arc-20160816; b=0GIvnDlDq+xRbBIgB2/IgN9y0EnbjueyHymRW6o+xclPoND4XMafmBHU6QF/jm5z8b v7bWdtVHdJ66lyaDEAPsaAI8tmdj6iGdN7zkfS74MevzlOJJ7Syf6apuuDrwwYLwDO3Z kCOMY1unjffMCVGb4pCYPD1JwikLU9Rdj54Jn/iehWEhMA5ViDBGLNPm/YwtqvuohtS2 wgKf0QZE2RujrL3oPuG0W/cJ5UhOb7ojbVPuhhrd3FJmMoEvmdRcPIHOJQI70xD4EbIV oojx4n02iLcYEtw3xmZ2H7988rOlHzseGbcw1RHBEOfwxFrrrDZtnPrHChXSX+NUkdWg 4tBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=d+lgv+5F7e90K6HKwZlH61wW/Nn4npzeGtRg0TRnP6k=; b=twItjWWpvpND0cFBY+FqbCRbNJUMhdWMKW0B/Nueki9PfIW4J92qrpgnIJo/J5Fwlp WY48HNTHK89StRSJK0w5m/ZFNfk8ZXekm9SqlzfmQSizHyQqNFMbH20PoIeZ3j3IITg/ r7HdzHMhg2r21WRrCknhHFw9diUwtjN/VFqH4wn60+MDhMNc+grWE5flXxCjYTkcAKgy IPOBj+b2q0kkbnls5VUffm8jfkaiQJg3nGdCnabB/11VJ0JciYXiYmSe+fzlE39rWyGJ 99SSxGp98ZmyErECO/CMYoipq9ftcHOiWbVq5ysdMu7C/7QZjzOgppVNUmSNN4hXmfPF dcAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ZOzR0CHZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s10si5031150ybg.203.2019.03.12.10.29.14 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 12 Mar 2019 10:29:14 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ZOzR0CHZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:56411 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3lDG-0007SD-DM for patch@linaro.org; Tue, 12 Mar 2019 13:29:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3l2w-0005OA-9O for qemu-devel@nongnu.org; Tue, 12 Mar 2019 13:18:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3kuM-00071k-8b for qemu-devel@nongnu.org; Tue, 12 Mar 2019 13:09:43 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:37789) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h3kuM-00070r-0l for qemu-devel@nongnu.org; Tue, 12 Mar 2019 13:09:42 -0400 Received: by mail-wm1-x336.google.com with SMTP id x10so3427658wmg.2 for ; Tue, 12 Mar 2019 10:09:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=d+lgv+5F7e90K6HKwZlH61wW/Nn4npzeGtRg0TRnP6k=; b=ZOzR0CHZSOQ3W5UARxIiN3KGcHUU0W3CzYj2lRzfPLQp/yNUUQfbGt/EvnWjbq/SF2 S4oOczbgLgrsIO7d/d9nSNNT3R7VK3jO3IaqpIjYM+DZy2rvQ3Bui5Mis8x9kIXxGwXF ZFAzUmjnXajSWGbpJO3Ps8LGpQtw/YAMGjR0xZ+Qz7hsPXZsVzSaTxjgGa66LXYkaidk Dr8E+XTDkrbkOYDPwZiey/Rfuou6ByZRIIVDp0yRHMe4Cv6y72Y/FtHaWN1j5KCL6LoV sRJsuTbsSN/oN9pmIKUYIV34U4qTi1xZ6UWrp3shIW2SKf7tHAdDMQsq/usArzibGQVv a82g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=d+lgv+5F7e90K6HKwZlH61wW/Nn4npzeGtRg0TRnP6k=; b=idOXWyBLS4MlbisWyas8eK0ZdCn3bPDrcF30Qelu0WSVBK8dQLiOgJp//27dv4+dEf MCdnKyWmZi6P2j8kLIZdu31RIOcgTfKKr/E/sTcmty65QCcACm4wqvgXdY8kRyv259lo F8scdJyAnaU79j/giPrWHyMSStJmXdJvr8/6NbU2dBaf2S1Kp6Flt0EDVG9Omww2XGEz UYpaHSbigvoSw+BrGK84YCSEmVPkBgFjXKSGFtJhYZzn3fHB2fB4c5FAko0gNok2xWsI 8JMKmUWvt8GPCx1nLUTAoekAkUM28TR6xKmP0UnyGRfnUfsoXMwSBtY+83SlJqH8pb6G dfbg== X-Gm-Message-State: APjAAAUynLdfeM8fAOhUKDJ9LV6miql5raNiz84GD4EzMD9rlHGk2czM /9DyU8KJrRihJ6ew06eWbcQhQb1jeCc= X-Received: by 2002:a1c:44d7:: with SMTP id r206mr3276942wma.40.1552410580776; Tue, 12 Mar 2019 10:09:40 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id b17sm12096948wrt.39.2019.03.12.10.09.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2019 10:09:36 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id AC9E21FF90; Tue, 12 Mar 2019 17:09:31 +0000 (UTC) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Tue, 12 Mar 2019 17:09:11 +0000 Message-Id: <20190312170931.25013-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190312170931.25013-1-alex.bennee@linaro.org> References: <20190312170931.25013-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::336 Subject: [Qemu-devel] [PULL 06/26] tests/tcg: add softmmu awareness to Makefile X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson -- 2.20.1 diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile index bf06415390..55feab0f67 100644 --- a/tests/tcg/Makefile +++ b/tests/tcg/Makefile @@ -26,7 +26,7 @@ # # We also accept SPEED=slow to enable slower running tests # -# We also expect to be in the tests build dir for the FOO-linux-user. +# We also expect to be in the tests build dir for the FOO-(linux-user|softmmu). # -include ../../config-host.mak @@ -52,7 +52,11 @@ QEMU_CFLAGS= LDFLAGS= # The QEMU for this TARGET +ifdef CONFIG_USER_ONLY QEMU=../qemu-$(TARGET_NAME) +else +QEMU=../qemu-system-$(TARGET_NAME) +endif # If TCG debugging is enabled things are a lot slower ifeq ($(CONFIG_DEBUG_TCG),y) @@ -61,6 +65,7 @@ else TIMEOUT=15 endif +ifdef CONFIG_USER_ONLY # The order we include is important. We include multiarch, base arch # and finally arch if it's not the same as base arch. -include $(SRC_PATH)/tests/tcg/multiarch/Makefile.target @@ -77,6 +82,16 @@ endif %: %.c $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) +else +# For softmmu targets we include a different Makefile fragement as the +# build options for bare programs are usually pretty different. They +# are expected to provide their own build recipes. +-include $(SRC_PATH)/tests/tcg/$(TARGET_BASE_ARCH)/Makefile.softmmu-target +ifneq ($(TARGET_BASE_ARCH),$(TARGET_NAME)) +-include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.softmmu-target +endif + +endif all: $(TESTS) diff --git a/tests/tcg/Makefile.include b/tests/tcg/Makefile.include index c581bd6ffc..73b5626fc5 100644 --- a/tests/tcg/Makefile.include +++ b/tests/tcg/Makefile.include @@ -67,7 +67,7 @@ endif ifneq ($(GUEST_BUILD),) guest-tests: $(GUEST_BUILD) -run-guest-tests: guest-tests qemu-$(TARGET_NAME) +run-guest-tests: guest-tests qemu-$(subst y,system-,$(CONFIG_SOFTMMU))$(TARGET_NAME) $(call quiet-command, \ (cd tests && $(MAKE) -f $(TCG_MAKE) SPEED=$(SPEED) run), \ "RUN", "tests for $(TARGET_NAME)")