From patchwork Fri Dec 12 20:04:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas De Schampheleire X-Patchwork-Id: 420667 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id DB7691400DE for ; Sat, 13 Dec 2014 07:06:20 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1B5F692AAC; Fri, 12 Dec 2014 20:06:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DR+gduBfy5uH; Fri, 12 Dec 2014 20:06:16 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 1924A92A7A; Fri, 12 Dec 2014 20:05:49 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 497101C2187 for ; Fri, 12 Dec 2014 20:05:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 46B7D342AF for ; Fri, 12 Dec 2014 20:05:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7l5cwtyw0bKZ for ; Fri, 12 Dec 2014 20:05:43 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by silver.osuosl.org (Postfix) with ESMTPS id 7665E342C6 for ; Fri, 12 Dec 2014 20:05:43 +0000 (UTC) Received: by mail-wg0-f50.google.com with SMTP id a1so10073143wgh.9 for ; Fri, 12 Dec 2014 12:05:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=oTc0lxelnZXlqTE2CLUcaXuKDYdbYQdQdbRvNxdn/7Q=; b=r4t0WWqvzYdq/dCitKC94zJdIy7ns5ks5mpMMn3WNtUuhzNOWxmtqUhFyAFQwD0iVV 1fMCevkXGaw3ZauxN+JKqDoKhMnc+KhvCOptPg2P2a9OLoEoXM6J2NvHk/Xo9mzF+9dW YlHi4AFWJ/UlCAshoRYTZJVKASuBBVmx/AC6KU2+Gz4DtS3Y36AIOQBnHl4iDLzowdTS cMN1+BhxFTtpu0/n8cpSwBkPXhvaF3VkvP8mBXg9h9kFyAe0KMKfgaMzxCnTgwheHZlQ aw6VVaz1dB7rQHHg6YpKny8PxtTDZeh0+oJ3wvVBzboK42jT/kViRBijBU2fwy7j/d8U Pd/g== X-Received: by 10.181.12.17 with SMTP id em17mr10653021wid.45.1418414742052; Fri, 12 Dec 2014 12:05:42 -0800 (PST) Received: from localhost.localdomain (alc112.alcatel.be. [195.207.101.112]) by mx.google.com with ESMTPSA id p1sm3054831wjy.22.2014.12.12.12.05.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Dec 2014 12:05:40 -0800 (PST) From: Thomas De Schampheleire To: thomas.petazzoni@free-electrons.com, buildroot@buildroot.org Date: Fri, 12 Dec 2014 21:04:53 +0100 Message-Id: <1418414696-32584-9-git-send-email-patrickdepinguin@gmail.com> X-Mailer: git-send-email 1.8.5.1 In-Reply-To: <1418414696-32584-1-git-send-email-patrickdepinguin@gmail.com> References: <1418414696-32584-1-git-send-email-patrickdepinguin@gmail.com> Cc: Thomas De Schampheleire Subject: [Buildroot] [PATCH v5 08/11] autobuild-run: save config.log files for failed package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Thomas De Schampheleire This patch will save all config.log files of the failed package in the result tarball, to help problem analysis. This is typically useful for autotools packages, although the added logic does not check that explicitly (i.e. any failing package that has a config.log file in the output directory will see this file saved). The saving of config.log files happens recursively, the directory structure is preserved in the result directory. Signed-off-by: Thomas De Schampheleire --- scripts/autobuild-run | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/scripts/autobuild-run b/scripts/autobuild-run index 32466e8..198c7bc 100755 --- a/scripts/autobuild-run +++ b/scripts/autobuild-run @@ -44,9 +44,6 @@ # # TODO: # -# - Include the config.log file (when it exists) in the tarball for -# failed builds when the failure occurs on an autotools package. -# # - Instead of excluding all configurations that have # BR2_PACKAGE_CLASSPATH=y, improve the script to detect whether the # necessary host machine requirements are there to build classpath. @@ -534,6 +531,26 @@ def send_results(result, **kwargs): extract_end_log(os.path.join(resultdir, "build-end.log")) + def copy_config_log_files(): + """Recursively copy any config.log files from the failing package""" + + reason = get_failure_reason() + if not reason: + return + + srcroot = os.path.join(outputdir, "build", '-'.join(reason)) + destroot = os.path.join(resultdir, '-'.join(reason)) + + for root, dirs, files in os.walk(srcroot): + dest = os.path.join(destroot, os.path.relpath(root, srcroot)) + + for file in files: + if file == 'config.log': + os.makedirs(dest) + shutil.copy(os.path.join(root, file), os.path.join(dest, file)) + + copy_config_log_files() + resultf = open(os.path.join(resultdir, "status"), "w+") if result == 0: resultf.write("OK")