From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by sourceware.org (Postfix) with ESMTPS id F2E36385C6CE for ; Fri, 2 Jun 2023 15:21:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F2E36385C6CE 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-x235.google.com with SMTP id 38308e7fff4ca-2b1a4be0ba1so2786601fa.0 for ; Fri, 02 Jun 2023 08:21:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685719315; x=1688311315; 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=o76IB/OTveZVnoVGKVgDE2mlJy03CERz8XhJ4cyUhd4=; b=OgE3rwhbCXUNt/0aMltFvka3zqzLjwR5pCMYNgBqa8t0gJF5D0nN/r0M8sbTwQF6pn oPk63phlUw5fGxMAgwRkYT+Qd0whoTXZuzPKhLoCEZWVU9N0fYc03z1JSKERvq8HYMsG +MJKXX9mU2Jqd7wqbF8cNaVAD8fof4z0RqNBWC2DzC1cc58ugThv6fqnotlYZYqXtgHO 9WK1XphyTEMDwYlPUw9+nJ9Axa29XvlJ4MHu/vHie5NfaXHSjg2DqBqafXKGLFNbKNxt MEoQc4R3zhkYJ8pisYhpWmcHpO33+3DP9X1gNDhK6hj9cfVDpZQMt0HvcypSLteq6mj0 XmYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685719315; x=1688311315; 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=o76IB/OTveZVnoVGKVgDE2mlJy03CERz8XhJ4cyUhd4=; b=IoX5HW7apBUxmitOB+wB2hYmO3zIGcfbZCevXXEyRmi5tKrHKuo3p2lWXttDC0kLdw 3zDoHTv2sO3vl8sAyrxkXq4cLKi2nFk00yu62BpLjwJhthhAL9REQ1ZZLXawYi1L/ilO 5IZfdbL+Aj/j/qTZpco8cxKNJMZdR3LLlgg0J0331L/YxVggYsPTk6eoA3epDNGXFBZv Nbeltpvt7zSbBFvKkh41JGdAlrTN8VEdUZBotWik6BlYRl+qfxpVRp7m1oYHXG9WFaDt 3pN/jPE7yhcwh8EtPPGT6xzXt3FeuWpBpDyVz1Xjh3HtM254ldraOXg5bgbgGteZgEOG 6eYA== X-Gm-Message-State: AC+VfDyZqx0d+2mKe6l+pG9AkqfX1ebCTvbj7WJfjE3TqpJOedncMc1K KBEgmpS2fwQTT7L9Y+/7uIWkz8CofApx5P7+4vK7fAU= X-Google-Smtp-Source: ACHHUZ5yA+KwGa+6G8r8mTmUZi6TG1Ykl9MrUHhK77vzsx5PsyBvNv33ujNkHm4E1E6wNFbqV4Xsqw== X-Received: by 2002:a05:651c:1251:b0:2ac:767c:fba0 with SMTP id h17-20020a05651c125100b002ac767cfba0mr4407992ljh.2.1685719315752; Fri, 02 Jun 2023 08:21:55 -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.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jun 2023 08:21:54 -0700 (PDT) From: Maxim Kuvyrkov To: gcc-patches@gcc.gnu.org Cc: Diego Novillo , Doug Evans , Maxim Kuvyrkov Subject: [PATCH 11/12] [contrib] validate_failures.py: Add "--expiry_date YYYYMMDD" option Date: Fri, 2 Jun 2023 15:20:51 +0000 Message-Id: <20230602152052.1874860-12-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.3 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: This option sets "today" date to compare expiration entries against. Setting expiration date into the future allows re-detection of flaky tests and creating fresh entries for them before the current flaky entries expire. --- .../testsuite-management/validate_failures.py | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/contrib/testsuite-management/validate_failures.py b/contrib/testsuite-management/validate_failures.py index 6eb1acd473f..a77aabe0bdd 100755 --- a/contrib/testsuite-management/validate_failures.py +++ b/contrib/testsuite-management/validate_failures.py @@ -206,8 +206,7 @@ class TestResult(object): # Return True if the expiration date of this result has passed. expiration_date = self.ExpirationDate() if expiration_date: - now = datetime.date.today() - return now > expiration_date + return _OPTIONS.expiry_today_date > expiration_date class ResultSet(set): @@ -636,6 +635,11 @@ def Main(argv): default=False, help='When used with --produce_manifest, ' 'it will overwrite an existing manifest file ' '(default = False)') + parser.add_option('--expiry_date', action='store', + dest='expiry_today_date', default=None, + help='Use provided date YYYYMMDD to decide whether ' + 'manifest entries with expiry settings have expired ' + 'or not. (default = Use today date)') parser.add_option('--inverse_match', action='store_true', dest='inverse_match', default=False, help='Inverse result sets in comparison. ' @@ -670,6 +674,22 @@ def Main(argv): global _OPTIONS (_OPTIONS, _) = parser.parse_args(argv[1:]) + # Set "today" date to compare expiration entries against. + # Setting expiration date into the future allows re-detection of flaky + # tests and creating fresh entries for them before the current flaky entries + # expire. + if _OPTIONS.expiry_today_date: + today_date = re.search(r'(\d\d\d\d)(\d\d)(\d\d)', + _OPTIONS.expiry_today_date) + if not today_date: + Error('Invalid --expiry_today_date format "%s". Must be of the form ' + '"expire=YYYYMMDD"' % _OPTIONS.expiry_today_date) + _OPTIONS.expiry_today_date=datetime.date(int(today_date.group(1)), + int(today_date.group(2)), + int(today_date.group(3))) + else: + _OPTIONS.expiry_today_date = datetime.date.today() + if _OPTIONS.produce_manifest: retval = ProduceManifest() elif _OPTIONS.clean_build: -- 2.34.1