From owner-svn-src-head@FreeBSD.ORG Thu Dec 16 20:23:21 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2DD5106564A; Thu, 16 Dec 2010 20:23:21 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 5E13C8FC13; Thu, 16 Dec 2010 20:23:21 +0000 (UTC) Received: from localhost (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id oBGKNJuT001916 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 16 Dec 2010 21:23:20 +0100 (CET) (envelope-from uqs@FreeBSD.org) Date: Thu, 16 Dec 2010 21:23:19 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: John Baldwin Message-ID: <20101216202319.GS23098@acme.spoerlein.net> Mail-Followup-To: Ulrich =?utf-8?B?U3DDtnJsZWlu?= , John Baldwin , Robert Watson , David O'Brien , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201012160036.oBG0aAEh003539@svn.freebsd.org> <20101216175536.GA52462@dragon.NUXI.org> <201012161422.48209.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="1UWUbFP1cBYEclgG" Content-Disposition: inline In-Reply-To: <201012161422.48209.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Robert Watson , David O'Brien Subject: Re: svn commit: r216473 - head/sbin/geom/class/eli X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Dec 2010 20:23:22 -0000 --1UWUbFP1cBYEclgG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, 16.12.2010 at 14:22:47 -0500, John Baldwin wrote: > On Thursday, December 16, 2010 2:04:08 pm Robert Watson wrote: > > On Thu, 16 Dec 2010, David O'Brien wrote: > > > > >>> Log: > > >>> Bump WARNS to 6. > > >>> > > >>> Modified: > > >>> head/sbin/geom/class/eli/Makefile > > >> > > >> FYI, this broke the tinderbox on arm, ia64, mips, and sparc64. > > > > > > Errr. Reverted. I built it on the architectures I had access to... > > > > For WARNS-related changes, I generally use "make universe" to test across > > architectures. This builds all of our architectures world + all available > > kernels, and seems the most effective way to avoid the above situations. (I've > > fallen into exactly the same trap...) > > > > The one thing to be cautious about is that make universe won't fail if an > > individual build fails, so you need to check the logs to make sure everything > > actually succeeded. > > Which is why I prefer 'make tinderbox' since it tells you what fails. :) Shamless plug: the attached, crude expect(1) script allows you to do $ cd /usr/src && universe-build sbin/geom WARNS=6 with the minimal amount of compilation (you have to build the toolchain once, though). I found it invaluable. Regards, Uli --1UWUbFP1cBYEclgG Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=universe-build #!/usr/local/bin/expect # Does the following for variable subdirs and a given set of target archs, # exits upon first failure. # % cd /usr/src # % make toolchain TARGET=powerpc # % make buildenv TARGET=powerpc # %% cd usr.sbin/rwhod # %% make set timeout -1 set toolchain 0 proc usage {argv0} { send_user "usage: $argv0 -t \[target1 target2 ...\]\n" send_user " $argv0 subdir \[make-args\] \[target1 target2 ...\]\n" send_user "available targets: amd64 arm i386 ia64 mips pc98 powerpc sparc64 sun4v\n" exit } while {[llength $argv]>0} { set flag [lindex $argv 0] switch -- $flag \ "-t" { set toolchain 1 set argv [lrange $argv 1 end] set argc [expr ($argc - 1)] } default { break } } if {$toolchain!=1} { if {$argc<1} { usage $argv0 exit 1 } set subdir [lindex $argv 0] set argv [lrange $argv 1 end] set argc [expr ($argc - 1)] # if something is present, use it as make args if {$argc>=1} { set margs [lindex $argv 0] set argv [lrange $argv 1 end] set argc [expr ($argc - 1)] } else { set margs {} } } # if there is still something, use it as target list, # else default to everything if {$argc>=1} { set targets [lrange $argv 0 end] } else { set input [open "|make universe -V TARGETS" r] set targets [split [string trimright [read $input]] " "] close $input } if {$toolchain==1} { foreach target $targets { spawn /bin/sh expect "$ " send "env MAKEOBJDIRPREFIX=/usr/obj/$target make toolchain __MAKE_CONF=/dev/null TARGET=$target\n" expect "$ " send "exit \$?\n" expect eof } puts "\n" exit } foreach target $targets { spawn /bin/sh set sid($target) $spawn_id expect "$ " send "env MAKEOBJDIRPREFIX=/usr/obj/$target make buildenv __MAKE_CONF=/dev/null TARGET=$target\n" expect "$ " send "make -C $subdir obj clean; make -C $subdir $margs\n" expect "$ " # 'make buildenv' is doing sh || true, so we cannot propagate by doing exit $rc # grab echo output instead send "echo rc=\$?; exit \$?\n" # this sucks, but we cant do (.*) and also not ([0-9]*) as these are special expect -re "rc=(0|1|2|3|4|5|6|7|8|9)\r" # TODO: save rc per target, don't exit below but print rcs for all archs on exit set rc $expect_out(1,string) expect "$ " send "exit \$?\n" expect eof if {$rc!=0} { puts "Build failed in ``$subdir'' for arch ``$target'' and flags: ``$margs''" exit $rc } ## if we expect eof, the wait below will not return, wtf? ## XXX sid($target) wont work here?? #catch {close -i $spawn_id} ## wait returns PID, TYPE, CODE, grab code #set rc [lindex [wait sid($target)] 3] } puts "\n" --1UWUbFP1cBYEclgG--