From patchwork Thu Apr 18 18:17:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Diego Novillo X-Patchwork-Id: 237712 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id B43502C01F6 for ; Fri, 19 Apr 2013 04:17:25 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type :content-transfer-encoding; q=dns; s=default; b=az0+RYgXMWfl/MfU ZnkI7nFdeuBros77S2dIb373x70SpjDENp72kDBSweqaNJ27PSn4DNdpWhzLeVvs h+TSL8oNhfKSHImO5XYmIMucjBkC+kgqCqn7MPrxVk0wUYX894wZ/DBkbStdq1wt w3uGNuqgzBNfwhrwRLW4tybMx4c= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type :content-transfer-encoding; s=default; bh=B6VPn06B1aDLzx7wjBVrY1 MiWuE=; b=Yf2eWtORJ65dMRE1xTodaPhQlf3Yw0v5nSWOuxRu99OFmu+pR0Xn00 A92bDhgvYfIdvE6/1rX15fnVE4vBp1TYud+W8rPT57t3RmgrxS5Fg+CvcGJ1tcEE n4Zxl8EorQ8ASOprDxBju+3nB24dbkh1R8hjUCuCtDOjge5apDVJA= Received: (qmail 15818 invoked by alias); 18 Apr 2013 18:17:19 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 15806 invoked by uid 89); 18 Apr 2013 18:17:18 -0000 X-Spam-SWARE-Status: No, score=-5.0 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD, TW_SV autolearn=ham version=3.3.1 Received: from mail-ie0-f182.google.com (HELO mail-ie0-f182.google.com) (209.85.223.182) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 18 Apr 2013 18:17:15 +0000 Received: by mail-ie0-f182.google.com with SMTP id bn7so1585804ieb.27 for ; Thu, 18 Apr 2013 11:17:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:organization:user-agent :mime-version:to:subject:content-type:content-transfer-encoding :x-gm-message-state; bh=/Xso78IgGrjU4/uJAZHlPBZ8glFnnOJ+awcfigVOru0=; b=HwRE6lH5I8u0RerLElWp27KLyIJw6FKZls50cC5WLCetejIvYPv08lv358CizanS3T zq4kSnaKeAXYqG9iTY/jEpAEaF2Fg0v7H5kFiju4JHY2hgz6iwIGtLN6ix5X8VWYKean JR0TCBuYsdiUaugimBBnHmqQQnUQrTvjpSrL6ATHsTagUivd3Spoo9q4oDTCjih4QUFS mIeSUhx2M8bVF0FEo9RNBOyo0tpA63GyXC4RXKnCVXs/FxD7OuEuszP4UMcG2v9UCcy/ NDnVu9enfmYTatH+9WSn1jYoDlVhaRfXX5dh6r1lw34j9xkmSuatJZOmSWtT42J46jHy myzw== X-Received: by 10.43.53.132 with SMTP id vq4mr247266icb.9.1366309034179; Thu, 18 Apr 2013 11:17:14 -0700 (PDT) Received: from dnovillo-macbookpro.local (CPE0026f3355b70-CM0026f3355b6d.cpe.net.cable.rogers.com. [99.230.121.179]) by mx.google.com with ESMTPS id s8sm13747121igs.0.2013.04.18.11.17.12 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Apr 2013 11:17:13 -0700 (PDT) Message-ID: <517038A8.5010405@google.com> Date: Thu, 18 Apr 2013 14:17:12 -0400 From: Diego Novillo User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 To: gcc-patches , Paul Pluzhnikov , Simon Baldwin Subject: [contrib]: Loosen check of build directory in validate_failures.py X-Gm-Message-State: ALoCoQmptP18GAAR8XZ1xYraU4ZgxJ+lbR80pig0Ji453Px+SYT9mL0BejVdJq0/AfVbrSa11fB7W/LbVcZ+xLlAWbGdDRfg/I9ro849hvjd4ySKNPeiSw2cyWLbZ4RAAQhmM+gwLjO6t6U1BmUUghK7ktK85eLSfhLh6eHKzKoG2ZplF7DIoRX31lDyPLbKJvGGYCA/k4XxXNHVBPmHiWTtqvP78k/txvjmJEydrPki47Ju0npoAwY= Some cross targets have different build directory names that those expected by the script. I loosened the check by simply making it check for the actual values we care to get out of the Makefile. This should remove some false positives we've been getting. Committed to trunk. Will backport to google/gcc-4_8 shortly. Diego. commit 6f25227972527ea90b61de84b283d840dcc49004 Author: dnovillo Date: Thu Apr 18 18:11:05 2013 +0000 Loosen check for build directory. * validate_failures.py: Loosen check for build directory. State what failed if we couldn't find the source tree or the target triplet. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198064 138bc75d-0d04-0410-96 1f-82ee72b054a4 - if not ValidBuildDirectory(_OPTIONS.build_dir, target): + if not ValidBuildDirectory(_OPTIONS.build_dir): # If we have been given a set of results to use, we may # not be inside a valid GCC build directory. In that case, # the user must provide both a manifest file and a set @@ -380,6 +381,8 @@ def GetBuildData(): _OPTIONS.build_dir) else: return None, None + srcdir = GetMakefileValue('%s/Makefile' % _OPTIONS.build_dir, 'srcdir =') + target = GetMakefileValue('%s/Makefile' % _OPTIONS.build_dir, 'target_alias=') print 'Source directory: %s' % srcdir print 'Build target: %s' % target return srcdir, target diff --git a/contrib/testsuite-management/validate_failures.py b/contrib/testsuite-management/validate_failures.py index 74dbcfb..aa71c94 100755 --- a/contrib/testsuite-management/validate_failures.py +++ b/contrib/testsuite-management/validate_failures.py @@ -196,11 +196,9 @@ def GetMakefileValue(makefile_name, value_name): return None -def ValidBuildDirectory(builddir, target): +def ValidBuildDirectory(builddir): if (not os.path.exists(builddir) or - not os.path.exists('%s/Makefile' % builddir) or - (not os.path.exists('%s/build-%s' % (builddir, target)) and - not os.path.exists('%s/%s' % (builddir, target)))): + not os.path.exists('%s/Makefile' % builddir)): return False return True @@ -362,14 +360,17 @@ def GetManifestPath(srcdir, target, user_provided_must_exist): Error('Manifest does not exist: %s' % manifest_path) return manifest_path else: - assert srcdir and target + if not srcdir: + Error('Could not determine where the location of GCC\'s source tree. ' + 'The Makefile does not contain a definition for "srcdir".') + if not target: + Error('Could not determine the target triplet for this build. ' + 'The Makefile does not contain a definition for "target_alias".') return _MANIFEST_PATH_PATTERN % (srcdir, _MANIFEST_SUBDIR, target) def GetBuildData(): - srcdir = GetMakefileValue('%s/Makefile' % _OPTIONS.build_dir, 'srcdir =') - target = GetMakefileValue('%s/Makefile' % _OPTIONS.build_dir, 'target_alias=')