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: 1064318 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="GmEvg27l"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44SZmJ6bsXz9s00 for ; Tue, 26 Mar 2019 00:26:40 +1100 (AEDT) Received: from localhost ([127.0.0.1]:42573 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8Pcc-0000IJ-U5 for incoming@patchwork.ozlabs.org; Mon, 25 Mar 2019 09:26:38 -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-Google-Smtp-Source: APXvYqwyMkwKn6GczjMXDdVEsT/4naNtGosajq2o2g1/mRCuEwfmgk8GsmLIvjC033tHBIIwyDH5iQ== 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+incoming=patchwork.ozlabs.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 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: