From patchwork Wed Apr 26 12:08:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 68297 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C9A6A3858C27 for ; Wed, 26 Apr 2023 12:08:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C9A6A3858C27 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1682510905; bh=4s7JxIhj0BZfkF+pdy4xBY4IWkM8O4Rsv58p4vcIHyE=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Help: List-Subscribe:From:Reply-To:From; b=t5Tf6RF4BgWN0zlNQiClCcXl+C5DaQXvDSki2SJ3YB6YjbG2y8OFIy2kj1j/HcKmS CPU6aAwyNRyfe6IcCp6CiHvLpl4m1wazSUW/fAwRrtoMijBKxaj23/BfswOa/u5Uf8 TosGV/pXisz2DCxwJ7deRevDkHiyjN7f/uWgzBto= X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id D27373858C54 for ; Wed, 26 Apr 2023 12:08:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D27373858C54 Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-659-TVTDRLSGNDy9ZCysqY7ixA-1; Wed, 26 Apr 2023 08:08:18 -0400 X-MC-Unique: TVTDRLSGNDy9ZCysqY7ixA-1 Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-3ef65714d24so65972611cf.1 for ; Wed, 26 Apr 2023 05:08:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682510898; x=1685102898; h=mime-version:user-agent:message-id:date:organization:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4s7JxIhj0BZfkF+pdy4xBY4IWkM8O4Rsv58p4vcIHyE=; b=C6iCU/u5pikd/jZcH8BuCE+GgdZuVhyLy9wU/8uOucjXI6CIJxWKSQkq4lN05XOW1M 0JFEEY+ZSbXTnqxuI0+Ige8Dtr38zEV6c4muUtmw5Bgt75myXEZB8rk3u9u4nSH5fGMW tqFhJ6xn1B/h2ZuDHhJ7mhPgVCoQ76ve2OvjnhaCcpwKkmEUPKxvjrXOFbvs905MqxRa GL3am/YdqLo5VjVPdkw6jSs2OqzjpFcJix1au5ZbZtchCycsmrkKK4JGtKthzpwRTydx Q7wl0ISub1b68sWSQ2t9G8tFptC2HQPlTCWkAkjNaF3/dIrBsvFE0zxeWGVYCgF/vefN nqTQ== X-Gm-Message-State: AAQBX9cl6Qsgynr/08uePaDjEyWzk5ty5qw8TyQbZ+kt0e4rj+xKh2x0 FQ+tb4ttIJBdr+XPyWRkWsiPdL1F57lrjua/4cYtaQMAa3u7rmR3Vq9fcMIZejEEN8TSBbfGs+H OQNe2dfQ08pO9ihEmdftlUoNlkvLLE6k4bPM98Z9j+I+dP6nrnCsRI12vUYme633vqSDTGkWUQB 4H X-Received: by 2002:a05:622a:1820:b0:3e3:9508:39f0 with SMTP id t32-20020a05622a182000b003e3950839f0mr36644321qtc.51.1682510898264; Wed, 26 Apr 2023 05:08:18 -0700 (PDT) X-Google-Smtp-Source: AKy350YkDtz0xA92BH9Bglkzll+1TvU7mUvtZupp+zF4DyKUh4tMYNrODXagv5wh+VtSDj2x2tJSpA== X-Received: by 2002:a05:622a:1820:b0:3e3:9508:39f0 with SMTP id t32-20020a05622a182000b003e3950839f0mr36644286qtc.51.1682510897980; Wed, 26 Apr 2023 05:08:17 -0700 (PDT) Received: from localhost ([88.120.130.27]) by smtp.gmail.com with ESMTPSA id l13-20020a05622a050d00b003ef38277445sm5257416qtx.16.2023.04.26.05.08.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Apr 2023 05:08:17 -0700 (PDT) Received: by localhost (Postfix, from userid 1000) id 41742B5078; Wed, 26 Apr 2023 14:08:15 +0200 (CEST) To: libabigail@sourceware.org Subject: [PATCH, applied] tests/update-test-output.py: Adapt to some broken test output Organization: Red Hat / France X-Operating-System: CentOS Stream release 9 X-URL: http://www.redhat.com Date: Wed, 26 Apr 2023 14:08:15 +0200 Message-ID: <87ildi9780.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, 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 X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-Patchwork-Original-From: Dodji Seketeli via Libabigail From: Dodji Seketeli Reply-To: Dodji Seketeli Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libabigail" Hello, Sometimes, the output of runtestreaddwarf or runtestannotate are broken due the fact that they execute test units in parallel and each unit might emit output that watch on each other toes. This fixes tests/update-test-output.py to take that into account. As this is a helper tool used to update updates, it won't have any impact on libabigail's output. * tests/update-test-output.py (process): Don't expect the start pattern of the main diff hunk to begin at the end of a line because that can be broken for runtestreaddwarf and co. Signed-off-by: Dodji Seketeli --- tests/update-test-output.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/tests/update-test-output.py b/tests/update-test-output.py index 39d96d72..7e321911 100755 --- a/tests/update-test-output.py +++ b/tests/update-test-output.py @@ -54,17 +54,20 @@ def main(): def process(input_file): - source = "" - dest = "" + source = None + dest = None for line in input_file: - m = re.match(r'^--- (.*?)\t', line) + m = re.match(r'(.*?)--- (.*?)\t', line) if m: - dest = m.group(1) + dest = m.group(2) else: - m = re.match(r'^\+\+\+ (.*?)\t', line) + m = re.match(r'(.*?)\+\+\+ (.*?)\t', line) if m: - source = m.group(1) - sys.stdout.write("cp " + source + " " + dest + "\n"); + source = m.group(2) + if source != None and dest != None: + sys.stdout.write("cp " + source + " " + dest + "\n"); + source = None + dest = None if __name__ == "__main__": main()