From patchwork Mon Mar 25 13:20:07 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: 161106 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp3969834jan; Mon, 25 Mar 2019 06:26:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqwE3aJamVdZgAOtepOKQLrQiF+5NY2ytTj/3SDYLIf7W7naQcCmxYq2tpV0rglZRABvxFEl X-Received: by 2002:a25:e901:: with SMTP id n1mr20028732ybd.37.1553520382305; Mon, 25 Mar 2019 06:26:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553520382; cv=none; d=google.com; s=arc-20160816; b=NXZ9lR9jzkvHZ+0B5StuZt9Im0R6vjb4QaAGMS3rpsSlMti8VXUtqAwNv9Ml9g3mu4 1cOyTX0rMmm8K+lFIaW0d+qpsKIuZN7BQxB/cGyGRgp/QX+UE/jXOx1zRWM8X2U9MRCx q+o4D7Wmp0HFzQmTzEMPdkchgEFOiyRnxv0rXa0XZjoSxNMQimEsMbwiGedh5Oergg5e WbfretPPb2eMdx/q4RPp5CWA3cFrKwekR9FqtGA6RGscGp6w/ZrptHdvzBcckC1xx3Xi f+vVT/q0MI7TeTNpg5Ea4lY68N8aiDc9AEikaqef2Xekv1aBh96OKYsLmBHxCxYfsR8w ikWQ== 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=F4XFuQIa2qaf7k2No9yQ2dEqhPl7EUgPesP7X8lGC5s=; b=i049lX1PFfLcYtR3IdZdDyrqm4Y+fMKXRPW+ltMBykZPAFQWbq/lq4KNwc7YC62sKZ woWVRBHsAL9xoxGwET7kc5v7+dYN52vQOgJCNeXjqhDiAM8rilbJQC8t2iPES2tetA12 208VNFMQf0IE2qTaa0JdSn+VSeGtozzCmUprWgMaF8kdJaxBNEdT4Lflhd8ngBBg0Pvv w9s2DK4YCAKm3xMBJggAjPH4ANjVPkoH7aCrBvcNIL8weuZ1992NFh27BfWRCGVU3Cmd OMoQmw5/toz61A3j5G/K/GVBvOpfL1DA8Wlz/7OmGSHsFD9ag/VKRAuHJT8vVB5/xWQ9 EnAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=GmEvg27l; 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 n126si9927451ywe.139.2019.03.25.06.26.22 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 25 Mar 2019 06:26:22 -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=GmEvg27l; 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]:42573 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8PcL-0000IJ-NV for patch@linaro.org; Mon, 25 Mar 2019 09:26:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56865) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8PWd-0004GU-FA for qemu-devel@nongnu.org; Mon, 25 Mar 2019 09:20:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h8PWZ-00059S-LG for qemu-devel@nongnu.org; Mon, 25 Mar 2019 09:20:25 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:53189) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h8PWW-00054H-G5 for qemu-devel@nongnu.org; Mon, 25 Mar 2019 09:20:21 -0400 Received: by mail-wm1-x334.google.com with SMTP id a184so8884601wma.2 for ; Mon, 25 Mar 2019 06:20:17 -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=F4XFuQIa2qaf7k2No9yQ2dEqhPl7EUgPesP7X8lGC5s=; b=GmEvg27lSrj6ADXBa3AjhZ13fBqUJOQgW6Fz9CkqYiLU3ywm/Y8/rxJrAWKmdbB9FH 4E98qe2AxOEfYxs2gkcRSUZ1rcKscvUe19Mj+dwJDLQq+5C9fLr9qb9rKTqmf1rjaE0d kQI8tv8krZgZUozl+6U7Md/sCsyXHJasfiN1GL7pXBs9ZQHOI4U4n8kBw1UQccTXEQFQ ew3FjGS30saadLXRUQcj/oQqosmu7x92iU9lTgC65vJ7ZhRFvuajaONZ0PY/UU9i4ZVT mAYfzZZynx6FCfDB4rqdGdp07XKIYIUHJp2tfAcUMjOMFqTe+H44/rCeWSSlD7GAZgBD 756g== 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=F4XFuQIa2qaf7k2No9yQ2dEqhPl7EUgPesP7X8lGC5s=; b=gdT2EiWETMnzeTGYQW041HwtconK+rCLGo2pjU0/ydPHWzD95I5v04AyZI4hkpEM0R TKWqIuIaWjDE96lfs1TxwwuYUo80CRTqS+s15Rdbari6i5TnaCJB+BMm1iXWnXkzqfVL ZSt0x7Ft5HTir+LcHdBcx6/21wSL3jKTZGbRBaDdLG1pl5lRP1pKYlTtuzl7eDyMzlCV Hny2MvJNg5O0x2AYUNgDFywk1CUid5TnJcxYjFNet4PHin+yXtyXIIhptr3e67n9iAEq N7FXQftfgYksKRv0+MRDtvGNLm4aCMpU62o20szrYoKSk/aofILdNZdwpUtMl0UgtoTV dAxA== X-Gm-Message-State: APjAAAVj5YebPpN9ziwNMP6ILOt8aAPmOasgmqr7b6Q8Hg488L+NF3at MWHdVKOL5oPKtUPbdVsv1OIfvQ== X-Received: by 2002:a1c:5f89:: with SMTP id t131mr638751wmb.145.1553520016559; Mon, 25 Mar 2019 06:20:16 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id z129sm15114170wmc.33.2019.03.25.06.20.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Mar 2019 06:20:15 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id EEBB51FF96; Mon, 25 Mar 2019 13:20:09 +0000 (UTC) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Mon, 25 Mar 2019 13:20:07 +0000 Message-Id: <20190325132009.14987-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190325132009.14987-1-alex.bennee@linaro.org> References: <20190325132009.14987-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::334 Subject: [Qemu-devel] [PULL 7/9] docker: Fix travis.py parser and misc change 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-devel@nongnu.org, Wainer dos Santos Moschetta Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Wainer dos Santos Moschetta Fixed the travis.py script that has failed to parse the current QEMU_SRC/.travis.yml file. It no longer makes combinations from env/matrix, instead it uses explicit includes. Also the compiler can be omitted from matrix/include, so that Travis chooses the first entry of the global compiler list. Replaced yaml.load() with yaml.safe_load() so that quieting the following deprecation warning: https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation Signed-off-by: Wainer dos Santos Moschetta Message-Id: <20190320221207.11366-2-wainersm@redhat.com> Reviewed-by: Alex Bennée Signed-off-by: Alex Bennée -- 2.20.1 diff --git a/tests/docker/travis.py b/tests/docker/travis.py index ea1ef169e6..e1433012bd 100755 --- a/tests/docker/travis.py +++ b/tests/docker/travis.py @@ -17,18 +17,17 @@ import yaml import itertools def load_yaml(fname): - return yaml.load(open(fname, "r").read()) + return yaml.safe_load(open(fname, "r").read()) def conf_iter(conf): + # If "compiler" is omitted from the included env then Travis picks the + # first entry of the global compiler list. + default_compiler = conf["compiler"][0] def env_to_list(env): return env if isinstance(env, list) else [env] for entry in conf["matrix"]["include"]: yield {"env": env_to_list(entry["env"]), - "compiler": entry["compiler"]} - for entry in itertools.product(conf["compiler"], - conf["env"]["matrix"]): - yield {"env": env_to_list(entry[1]), - "compiler": entry[0]} + "compiler": entry.get("compiler", default_compiler)} def main(): if len(sys.argv) < 2: