From patchwork Fri Jun 22 14:11:55 2018 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: 139661 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp941826lji; Fri, 22 Jun 2018 07:29:53 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIvr0k8v6N0WevsINSNkuo34j4S2cEaB8GahED2XvB5m6mF4Lp1RGUy8TnfgDrFvHz2Xc54 X-Received: by 2002:a37:a8d6:: with SMTP id r205-v6mr1454669qke.93.1529677793243; Fri, 22 Jun 2018 07:29:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529677793; cv=none; d=google.com; s=arc-20160816; b=abJ0gACj9NGM5w+S+RTnMkvmHCjY7uXB1Df+kKqrouhjRokl1MLO2TPhSkXnMRyPC+ v29FjmJBvINqu98ZF8vj3OGPB8rMVr4ru1YlEsdxDtBx2NdWxa0dz+GPJQR80gvCSPYB X/gp+dY1aC9TXEC6nanpDrNhTPhkeePhWzcuDWNd0yq8VVKLeYUGAH4lYWzUstXoyujf 9nmFZmrLrmCmUGW5s937TeMy5zWzJMOUQU95p7AWl8JLCdYut2QeKmaX8z0dIYPa6UW1 UDrY1iNKAnobcLQ6I6m9ZpvyioykhiQfUi09qbJCTEpuw0mH0FCmS65uOvHfOlQ2v6kO 7UBQ== 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:arc-authentication-results; bh=/IZQ4p0hwe86+xUxCaKvDsHzWjVNlBH8FOK7w9lXmkc=; b=sr/uoEdfEva9mTyMqkFJ6Z8Vhkyw0W2eyrNcYfVtyd8mleHiCxEsURUxcpJLkDfYmz j/nhrV6UGreRGRd9zxVo5wLHk6CmoV1Tjpt90XCfWeAewMO+6JKhSs04nZ73OkNR/Q9D t2Jk2AVjB++mdo0bmXjfPneliQIn0qsnXhdJdbytFPvYN55JzLtT0R+l1douwLOJO4Rh 6WNlJn8sLf2ytVwK1bfR+TJQR4FKP273gA1/e5g70rL/eglk/CtQ+DBOoSux5ceuYwSe 9ketrf7Tat7QAuqd39NW0FsArXgv5v56up9b/fufk8s+/+06Nwf774EuX1t5R3NudsMk BT3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ETWW926s; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 37-v6si975735qtp.243.2018.06.22.07.29.53 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 22 Jun 2018 07:29:53 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ETWW926s; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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 ([::1]:34400 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWN4S-00047L-Bw for patch@linaro.org; Fri, 22 Jun 2018 10:29:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41833) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWMwz-0005wq-1q for qemu-devel@nongnu.org; Fri, 22 Jun 2018 10:22:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWMwx-0003Yw-KY for qemu-devel@nongnu.org; Fri, 22 Jun 2018 10:22:08 -0400 Received: from mail-wr0-x231.google.com ([2a00:1450:400c:c0c::231]:41380) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fWMwx-0003YA-Bm for qemu-devel@nongnu.org; Fri, 22 Jun 2018 10:22:07 -0400 Received: by mail-wr0-x231.google.com with SMTP id h10-v6so6879736wrq.8 for ; Fri, 22 Jun 2018 07:22:07 -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=/IZQ4p0hwe86+xUxCaKvDsHzWjVNlBH8FOK7w9lXmkc=; b=ETWW926sgH+LggAQPT6aZOEhatpg84ZlkpAkIPq1l02LA88nKf+BlOT/Tq0kqA/p7M 94MKjiYaSikHCjcm1IFqYLO94xoh52Lh8y8V/BMM4PxOH0/4WatekuCZ6n7Mf9JEP1MH pavNR8plhT/AauZNhiYwQeQvh9YJZwIWqYFbE= 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=/IZQ4p0hwe86+xUxCaKvDsHzWjVNlBH8FOK7w9lXmkc=; b=maU4EaE8lPWk/UnpK6AZJvM3EIqJKoZsWI4O9zqQxT2pf2hL+ljYjwr0ltf5Fp3A7E OoH3aQ7OImdMU9hyqnnbEihvWsfcVpM+XXKPcHQz0pRZCzUgQgRxLtSSCeFJHc1792xC VmY8aRtVnvrJoXiUJGi8JxbGCdog+JBb184XQVz7EgsxJtPfnjRU2CxOl0ma+S5hKI1R YntjqELYIFrW9YF6qv5RPQqhlZBHb7t3UqE5v7p7UeFJkmFD2RTPo29PTkcEmrAF44nv 0lOXJEFoaYDPsPyZfsLj81WjReyiq7NavOQ1bjcSHg9Rs85SGK88ngw6N4NSFtOPoqbj 5Z2w== X-Gm-Message-State: APt69E22Z8dddetGXHbBW1dkX4CeWIeptNs9+HCgOvtmuFkaf0VPwVAh 4KClxgMQpiPY3z6n/062oeK4iQ== X-Received: by 2002:adf:8142:: with SMTP id 60-v6mr1760989wrm.192.1529677326190; Fri, 22 Jun 2018 07:22:06 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id j131-v6sm3906967wmg.24.2018.06.22.07.22.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Jun 2018 07:22:04 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id E32A23E0B71; Fri, 22 Jun 2018 15:12:05 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Fri, 22 Jun 2018 15:11:55 +0100 Message-Id: <20180622141205.16306-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180622141205.16306-1-alex.bennee@linaro.org> References: <20180622141205.16306-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:400c:c0c::231 Subject: [Qemu-devel] [RISU PATCH v4 12/22] contrib/generate_all.sh: allow passing of arguments to risugen 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: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, richard.henderson@linaro.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This allows us to use any new risugen options when generating all our test patterns. Signed-off-by: Alex Bennée --- contrib/generate_all.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) -- 2.17.1 Reviewed-by: Richard Henderson diff --git a/contrib/generate_all.sh b/contrib/generate_all.sh index 1e6b847..651cb23 100755 --- a/contrib/generate_all.sh +++ b/contrib/generate_all.sh @@ -12,11 +12,11 @@ # Alex Bennée - initial implementation # # Usage: -# ./contrib/generate_all.sh +# ./contrib/generate_all.sh -- risugen args set -e -USAGE="Usage: `basename $0` [-h] [-n x] " +USAGE="Usage: `basename $0` [-h] [-n x] -- [risugen args]" SPLIT=4 RISUGEN=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd -P)/risugen @@ -41,18 +41,24 @@ done # Remove the switches we parsed above. shift `expr $OPTIND - 1` -while [ $# -ne 0 ]; do +# Parse up to and including any -- +RISUGEN_ARGS="" +while [ $# -ne 0 ] && [ -z "$RISUGEN_ARGS" ]; do if [ -f $1 ]; then RISU_FILE=$1; elif [ -d $1 ]; then TARGET_DIR=$1; + elif [ "$1" = "--" ]; then + RISUGEN_ARGS=$1 elif [ ! -e $1 ]; then TARGET_DIR=$1 fi shift done +# anything left is for RISUGEN +RISUGEN_ARGS=$@ if test -z "${RISUGEN}" || test ! -x "${RISUGEN}"; then echo "Couldn't find risugen (${RISUGEN})" @@ -90,7 +96,7 @@ while test $# -gt 0 ; do fi done I_FILE="${I_FILE}_INC.risu.bin" - CMD="${RISUGEN} ${INSN_PATTERNS} ${RISU_FILE} ${I_FILE}" + CMD="${RISUGEN} ${RISUGEN_ARGS} ${INSN_PATTERNS} ${RISU_FILE} ${I_FILE}" echo "Running: $CMD" $CMD done