From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pjotr Prins Subject: Re: Treating tests as special case Date: Thu, 5 Apr 2018 20:35:23 +0200 Message-ID: <20180405183523.GA1445@thebird.nl> References: <20180405052439.GA30291@thebird.nl> <87efjuj6f2.fsf@elephly.net> <87efjtzqo4.fsf@gnu.org> <20180405145929.GA345@thebird.nl> <87vad5y8v7.fsf@gnu.org> <20180405164158.GA965@thebird.nl> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="cWoXeonUoKmBZSoM" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49492) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f49nl-0006dx-H1 for guix-devel@gnu.org; Thu, 05 Apr 2018 14:40:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f49nh-0004hZ-Aj for guix-devel@gnu.org; Thu, 05 Apr 2018 14:40:01 -0400 Content-Disposition: inline In-Reply-To: <20180405164158.GA965@thebird.nl> 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" To: Pjotr Prins Cc: guix-devel@gnu.org --cWoXeonUoKmBZSoM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Apr 05, 2018 at 06:41:58PM +0200, Pjotr Prins wrote: > Providing test-substitutes is much lighter and can be retained > forever. See it as a light-weight substitute. It can also mean we can retire large binary substitutes quicker. Saving disk space. I think it is a brilliant idea ;) A result of the Hickey insight is that I am going to cut down on my own tests (the ones I write). Only integration tests are of interest for deployment. For those interested, attached patch disables tests in the build system. You may need to adapt it a little for a recent checkout, but you get the idea. Use at your own risk, but in a pinch it can be handy. Pj. -- --cWoXeonUoKmBZSoM Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="disable-tests.patch" diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm index 1786e2e3c..2aff344df 100644 --- a/guix/build/gnu-build-system.scm +++ b/guix/build/gnu-build-system.scm @@ -286,7 +286,7 @@ makefiles." (define* (check #:key target (make-flags '()) (tests? (not target)) (test-target "check") (parallel-tests? #t) #:allow-other-keys) - (if tests? + (if #f (zero? (apply system* "make" test-target `(,@(if parallel-tests? `("-j" ,(number->string (parallel-job-count))) diff --git a/guix/build/perl-build-system.scm b/guix/build/perl-build-system.scm index b2024e440..8008a7173 100644 --- a/guix/build/perl-build-system.scm +++ b/guix/build/perl-build-system.scm @@ -63,7 +63,7 @@ (define-w/gnu-fallback* (check #:key target (tests? (not target)) (test-flags '()) #:allow-other-keys) - (if tests? + (if #f (zero? (apply system* "./Build" "test" test-flags)) (begin (format #t "test suite not run~%") diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm index dd07986b9..dacf58110 100644 --- a/guix/build/python-build-system.scm +++ b/guix/build/python-build-system.scm @@ -131,7 +131,7 @@ (define* (check #:key tests? test-target use-setuptools? #:allow-other-keys) "Run the test suite of a given Python package." - (if tests? + (if #f ;; Running `setup.py test` creates an additional .egg-info directory in ;; build/lib in some cases, e.g. if the source is in a sub-directory ;; (given with `package_dir`). This will by copied to the output, too, diff --git a/guix/build/ruby-build-system.scm b/guix/build/ruby-build-system.scm index c2d276627..2f12a4362 100644 --- a/guix/build/ruby-build-system.scm +++ b/guix/build/ruby-build-system.scm @@ -116,7 +116,7 @@ generate the files list." (define* (check #:key tests? test-target #:allow-other-keys) "Run the gem's test suite rake task TEST-TARGET. Skip the tests if TESTS? is #f." - (if tests? + (if #f (zero? (system* "rake" test-target)) #t)) --cWoXeonUoKmBZSoM--