From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: [PATCH] gnu: flexbar: Enable tests. Date: Mon, 27 Apr 2015 14:37:34 +0200 Message-ID: References: <87a8xt96to.fsf@fsf.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51220) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmiID-0007iP-Vi for guix-devel@gnu.org; Mon, 27 Apr 2015 08:37:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YmiIA-00029X-Py for guix-devel@gnu.org; Mon, 27 Apr 2015 08:37:45 -0400 Received: from venus.bbbm.mdc-berlin.de ([141.80.25.30]:52742) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmiIA-00028u-G9 for guix-devel@gnu.org; Mon, 27 Apr 2015 08:37:42 -0400 In-Reply-To: <87a8xt96to.fsf@fsf.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: David Thompson Cc: guix-devel David Thompson writes: > Ricardo Wurmus writes: > >> this patch enables the tests of flexbar. There is no check target but a >> validation script and some test data, so I'm just running the script >> instead of "make check". > > Looks fine to me! Minor critique below: Thanks. >> #:phases >> - (alist-delete 'install %standard-phases))) >> + (alist-replace >> + 'check >> + (lambda* (#:key outputs #:allow-other-keys) >> + (setenv "PATH" (string-append >> + (assoc-ref outputs "out") "/bin:" >> + (getenv "PATH"))) >> + (chdir "../flexbar_v2.5_src/test") >> + (zero? (system* "bash" "flexbar_validate.sh"))) >> + (alist-delete 'install %standard-phases)))) > > Consider rewriting using 'modify-phases' syntax. I think in this particular case, using "modify-phases" wouldn't be much clearer. Here we're just deleting one and replacing another phase and I think it's as clear as things can be. Or is the use of "alist-*" in package definitions deprecated? (I should rewrite my icedtea7 patch, however, to use "modify-phases" syntax. With so many custom phases it really makes sense.) ~~ Ricardo