From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by sourceware.org (Postfix) with ESMTPS id 6BF4C3857711 for ; Fri, 2 Jun 2023 15:21:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6BF4C3857711 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2b035e94072so2729541fa.1 for ; Fri, 02 Jun 2023 08:21:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685719282; x=1688311282; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vOMV6dKNLkWxbMOXtMGHhFaHhab9ak8qmS1731nXkkg=; b=hGmCVNSignqbXD1Wu9pAtTiD4oH1Kss4hGPkyObmlXmq2x4SlhgJQC309ezyLBSAuw pK8nRDq/xcSF7JfW2QE5qnXqazL9j0QVhYQ/lIZ2AgI337DNjTXvKahSQ7DRaLtw7EHl cGeCqp0xJ3AO3iVlfyHptk5Xv1XMMfAul/Fx/GWOpxJ95btIp5WmLStwLedUzEQU8Y2T tz+NSCsHlSodCWcY5ENW+9M8f/26/WydznLhpi5pqxizPDgMrMEvBdo8KT2wmLFI8sAH nfOE2YKnsWZI9zAU4LG7+sbd7aZLSab+D8KbV2y0bdFY0nvwXCx8lGBJYP/THIsT21Yi LOOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685719282; x=1688311282; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vOMV6dKNLkWxbMOXtMGHhFaHhab9ak8qmS1731nXkkg=; b=i3wBIpa3bl1kQZ8+2FyMM84tZRD2r7zHS4oSSHOi6PaMhrLHu7yZ2nMERyEfigP1SX 4GQQ1zDbV58v+dVaJ8ijG8DozMTydIB3uIgqKeyQtzQqYJguAUlqCRDTMm9wa5CTB5/h Ib1+tQEjFInFr2VpT6hG6+/MqHrylOBO9L+mJjvujJ1RGMZzJXPNDqzNkTdYg/10Qsep dY4GIqkadNmF+UVMKjKdNLQAIpPG4RDCKXRZUcTFzN+CXsCgXQkGcirfKeVrQLSZCTSF t866Dr5HcLUwINnWi/vcQrOiNXHa1vs9yWq2xIDiHLXjQHHC1yScLk80tC0Df69/67qv VXMw== X-Gm-Message-State: AC+VfDza+wAPHpnIjHz1iB3fQtgCMXOOT9F2vciaIn3KxBr0+TOp1Xzq atu0kaLzJdEECg/1iTdEZ8GJlgZ9cpmCOO7xbkgSt4Q= X-Google-Smtp-Source: ACHHUZ5nmdngJmdOzORDjurEv2SlWrTBkxuHWm3d8CdwoiRZtVE5/PcFCqd2HkCtVcPgr8SHjqvjpg== X-Received: by 2002:a2e:b55a:0:b0:2ad:9d06:8c6e with SMTP id a26-20020a2eb55a000000b002ad9d068c6emr4508655ljn.0.1685719282258; Fri, 02 Jun 2023 08:21:22 -0700 (PDT) Received: from localhost.localdomain (static.225.72.216.95.clients.your-server.de. [95.216.72.225]) by smtp.gmail.com with ESMTPSA id a18-20020a2eb172000000b002a8ac166e55sm255122ljm.44.2023.06.02.08.21.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jun 2023 08:21:20 -0700 (PDT) From: Maxim Kuvyrkov To: gcc-patches@gcc.gnu.org Cc: Diego Novillo , Doug Evans , Maxim Kuvyrkov Subject: [PATCH 04/12] [contrib] validate_failures.py: Simplify GetManifestPath() Date: Fri, 2 Jun 2023 15:20:44 +0000 Message-Id: <20230602152052.1874860-5-maxim.kuvyrkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230602152052.1874860-1-maxim.kuvyrkov@linaro.org> References: <20230602152052.1874860-1-maxim.kuvyrkov@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: ... and don't require a valid build directory when no data from it is necessary. --- contrib/testsuite-management/validate_failures.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/contrib/testsuite-management/validate_failures.py b/contrib/testsuite-management/validate_failures.py index 4733dd89dcb..1bd09e0c20c 100755 --- a/contrib/testsuite-management/validate_failures.py +++ b/contrib/testsuite-management/validate_failures.py @@ -457,7 +457,7 @@ def CompareResults(manifest, actual): return actual_vs_manifest, manifest_vs_actual -def GetManifestPath(srcdir, target, user_provided_must_exist): +def GetManifestPath(user_provided_must_exist): """Return the full path to the manifest file.""" manifest_path = _OPTIONS.manifest if manifest_path: @@ -465,6 +465,7 @@ def GetManifestPath(srcdir, target, user_provided_must_exist): Error('Manifest does not exist: %s' % manifest_path) return manifest_path else: + (srcdir, target) = GetBuildData() if not srcdir: Error('Could not determine the location of GCC\'s source tree. ' 'The Makefile does not contain a definition for "srcdir".') @@ -530,8 +531,7 @@ def PerformComparison(expected, actual, ignore_missing_failures): def CheckExpectedResults(): - srcdir, target = GetBuildData() - manifest_path = GetManifestPath(srcdir, target, True) + manifest_path = GetManifestPath(True) print('Manifest: %s' % manifest_path) manifest = GetManifest(manifest_path) sum_files = GetSumFiles(_OPTIONS.results, _OPTIONS.build_dir) @@ -545,8 +545,7 @@ def CheckExpectedResults(): def ProduceManifest(): - (srcdir, target) = GetBuildData() - manifest_path = GetManifestPath(srcdir, target, False) + manifest_path = GetManifestPath(False) print('Manifest: %s' % manifest_path) if os.path.exists(manifest_path) and not _OPTIONS.force: Error('Manifest file %s already exists.\nUse --force to overwrite.' % @@ -563,15 +562,13 @@ def ProduceManifest(): def CompareBuilds(): - (srcdir, target) = GetBuildData() - sum_files = GetSumFiles(_OPTIONS.results, _OPTIONS.build_dir) actual = GetResults(sum_files) clean = ResultSet() if _OPTIONS.manifest: - manifest_path = GetManifestPath(srcdir, target, True) + manifest_path = GetManifestPath(True) print('Manifest: %s' % manifest_path) clean = GetManifest(manifest_path) -- 2.34.1