From patchwork Tue Sep 8 09:47:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 1359647 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bm0gs0N7wz9sSJ for ; Tue, 8 Sep 2020 19:47:52 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8A6413870876; Tue, 8 Sep 2020 09:47:48 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 8D1163857C5A for ; Tue, 8 Sep 2020 09:47:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8D1163857C5A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Tobias_Burnus@mentor.com IronPort-SDR: XBl8bvQMS5PlKBU8uC0Ee26aHdIiAeVxa4xJ0nyfU82ps5VAcs/7DyNk4p72McQee0o40cmd2N 3MOs2lMaiJUTXXR3PeXOCCgRX1NOoOxsBILrKpiyadZAmUkp626UZ5P9C6zUZ/bMrVK17jO+5W 42/SvJWensNKre8DioCoc+tuO7B8REP8g4Sj4jOb9pWvFsAZI3gO4EpqLlKbOTR9Oh/VQQIUeE Sg3qTnEW1PBy503jCKbAvVPz8OrWNWiGiLjJgIC+SMT2ZJtrxEy1BGWajW0hhCyDdZ73XcYAYR tbY= X-IronPort-AV: E=Sophos;i="5.76,405,1592899200"; d="diff'?scan'208";a="52659516" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 08 Sep 2020 01:47:44 -0800 IronPort-SDR: 1O0I/U5X78gW48plq2i7qFGpXemAeVmwet+B7kqIteN0zLCM75mbpOjtJGBo6VliyT5cJHKLBx EalCk1QD8zTriB8WvnrWfc4M/XVe41dBrhkd0rycikvjMvf1VWHyCjN6EBrsKanLVevZg0j0Fi w9uTqDsAq4jJjiEmcvQ8GxLniajjg5ChqzedO2Nb9mUNYtQ8xq0RZpfORZywyIgB68g5zqx4AA ScRshuj3GRQn25Mvw08F0RaZrwIwMH9cjFpnyVPTgMHoHNzpyHRbvmOzlGPIQVN9+V7rbUv4TY hfc= To: =?utf-8?q?Martin_Li=C5=A1ka?= , gcc-patches From: Tobias Burnus Subject: [RFC Patch] mklog.py: Parse first 10 lines for PR/DR number Message-ID: <0b0fbd64-2d49-fde5-51ec-8065e0ef2004@codesourcery.com> Date: Tue, 8 Sep 2020 11:47:59 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 Content-Language: en-US X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Hi Martin, hi all, currently, mklog searches for "PR" (and "DR") only in the first line of a new 'testsuite' file. I think in many cases, the PR is listed a bit later than the first line – although, it is usually in the first few lines; in my example, it is in line 3 and 4. Admittedly, I do have cases where later lines are wrong like "! Not tested due to PR ...' How about testing the first, e.g., ten lines? That's what the attached patch does. Tobias ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter mklog.py: Parse first 10 lines for PR/DR number contrib/ChangeLog: * mklog.py: Parse first 10 lines for PR/DR number not only the first line. diff --git a/contrib/mklog.py b/contrib/mklog.py index 243edbb15c5..d334a3875c9 100755 --- a/contrib/mklog.py +++ b/contrib/mklog.py @@ -137,7 +137,10 @@ def generate_changelog(data, no_functions=False, fill_pr_titles=False): # Extract PR entries from newly added tests if 'testsuite' in file.path and file.is_added_file: - for line in list(file)[0]: + # Only search first ten lines as later lines may + # contains commented code which a note that it + # has not been tested due to a certain PR or DR. + for line in list(file)[0][0:10]: m = pr_regex.search(line.value) if m: pr = m.group('pr') @@ -149,8 +152,6 @@ def generate_changelog(data, no_functions=False, fill_pr_titles=False): dr = m.group('dr') if dr not in prs: prs.append(dr) - else: - break if fill_pr_titles: out += get_pr_titles(prs)