From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id ED3806DE024A for ; Wed, 11 Jan 2017 11:18:45 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.223 X-Spam-Level: X-Spam-Status: No, score=0.223 tagged_above=-999 required=5 tests=[AWL=0.093, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CG2qWYBaWaGj for ; Wed, 11 Jan 2017 11:18:44 -0800 (PST) Received: from mail-lf0-f65.google.com (mail-lf0-f65.google.com [209.85.215.65]) by arlo.cworth.org (Postfix) with ESMTPS id EA5486DE01CE for ; Wed, 11 Jan 2017 11:18:43 -0800 (PST) Received: by mail-lf0-f65.google.com with SMTP id h65so1741504lfi.3 for ; Wed, 11 Jan 2017 11:18:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=TJH472gneIDO1brJrVwKOBeQs/TgPzrDcdFHed60kvk=; b=ux+cWg/W8fDhrlsspjIsVf1ttIQ5iIWgRpy7GWelFG7c7xYDUxfM3KhcNjJjo30GF8 DjBGKumWja3NO+oHeAaI+Y/iSBe3wE7VENhdazdVnWg8Z03fll5ePsEL+mrtr/7TeXg2 x1e0Rah0PJijhSc2Etarr8Qtytl2WGDEysrVVSEu3sDLXAZu3NuRj7lTVh92zF9a79uW I2m9sLIfGZG7+HK9KYva7GqNTYqwoD39Bk7A+UbzUE+L8LpOhY/tAGny+XvoThZwm0h1 Vj2Pl0Oe4LgEMVCWVpCis2fEj51KImwXfVYk9n3YudnWa7gyAVyQ4KRpL8fmDmckyLJF x3Qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=TJH472gneIDO1brJrVwKOBeQs/TgPzrDcdFHed60kvk=; b=sNzzY5s+DvqdsMR5jRRzWRuwUIpdTo2NXzTE6FjVSrR3ejpPFZDhWFAH6kIihN7aVD +28nUxNJ1E7lwz4SDiipdkn3/VoUUyLctPGAEu519XbmSmj7ue4Od/XsKJ7vvbnNh+je o1Sl1bGqXMhEn2aJwPsGthScj4eXZOqtQgTpmsJM7Lp0JRoCEf4cVMgnJh51KhteUQX8 pr3rQmNRT5GJMnmQla7cQ8kFOu0lEGqRKI5kF1gCqNlvAPxQvXxLDuVF5kwlvkQZGqZ5 +qxEZ5xl0SIuVPkKEFdAGQRs85LF0f9h0AlQ6b6wgMmBMLBTAQ7hvHEGSTCMfDQA38h3 5GfQ== X-Gm-Message-State: AIkVDXK+6VMdi+KfidaoeQxx8ngBcHl45B3dB18JxP03qQUzr1fQAfGOB5bjZXxwK47m7A== X-Received: by 10.46.75.17 with SMTP id y17mr3794347lja.1.1484162322081; Wed, 11 Jan 2017 11:18:42 -0800 (PST) Received: from edge.lab.local (ppp109-252-15-30.pppoe.spdop.ru. [109.252.15.30]) by smtp.gmail.com with ESMTPSA id 18sm365804ljj.3.2017.01.11.11.18.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Jan 2017 11:18:41 -0800 (PST) Date: Wed, 11 Jan 2017 22:18:36 +0300 From: Mikhail To: David Bremner Cc: Tomi Ollila , notmuch@notmuchmail.org Subject: Re: [PATCH] test: allow user to choose which gdb to run tests with Message-ID: <20170111191836.GA21567@edge.lab.local> References: <20170107094727.428-1-tomi.ollila@iki.fi> <87r34dbnxj.fsf@tethera.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="m6j8n7ENRI4P4L3G" Content-Disposition: inline In-Reply-To: <87r34dbnxj.fsf@tethera.net> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 19:18:46 -0000 --m6j8n7ENRI4P4L3G Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On 17:56 08-Jan 2017 David Bremner wrote: > Tomi Ollila writes: > > > The variable used for selecting gdb is TEST_GDB, consistent with > > TEST_CC and TEST_EMACS{,CLIENT}. > > pushed this patch to master. > Hello, updated FreeBSD tests patch in the attachment. --m6j8n7ENRI4P4L3G Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-tests-add-compatibility-layer.patch" >From 6fb51f79192f0d1ad443aff276b7c2b9295d9c55 Mon Sep 17 00:00:00 2001 From: Mikhail Date: Thu, 22 Dec 2016 12:19:39 +0300 Subject: [PATCH] tests: add compatibility layer Make test-lib-common.sh load test-lib-<$PLATFORM>.sh to create additional shim for platform specifics. Use test-lib-FREEBSD.sh to call GNU utilities instead of native ones. --- configure | 3 +++ test/README | 6 ++++++ test/test-lib-FREEBSD.sh | 7 +++++++ test/test-lib-common.sh | 5 +++++ 4 files changed, 21 insertions(+) create mode 100644 test/test-lib-FREEBSD.sh diff --git a/configure b/configure index fa77eb8f..eb452a12 100755 --- a/configure +++ b/configure @@ -1186,6 +1186,9 @@ NOTMUCH_PYTHON=${python} # Are the ruby development files (and ruby) available? If not skip # building/testing ruby bindings. NOTMUCH_HAVE_RUBY_DEV=${have_ruby_dev} + +# Platform we are run on +PLATFORM=${platform} EOF # Finally, after everything configured, inform the user how to continue. diff --git a/test/README b/test/README index 104a120e..354a32f9 100644 --- a/test/README +++ b/test/README @@ -33,6 +33,12 @@ chosen directory to your PATH before running the tests. e.g. env PATH=/opt/gnu/bin:$PATH make test +For FreeBSD you will need to install coreutils, which provides GNU +versions of basic utils like 'date' or 'wc'. Also you will need to +install latest gdb from ports or packages and provide path to it in +TEST_GDB variable before executing the tests, native FreeBSD gdb will +not work. + Running Tests ------------- The easiest way to run tests is to say "make test", (or simply run the diff --git a/test/test-lib-FREEBSD.sh b/test/test-lib-FREEBSD.sh new file mode 100644 index 00000000..09242362 --- /dev/null +++ b/test/test-lib-FREEBSD.sh @@ -0,0 +1,7 @@ +# Use GNU Coreutils instead of a native BSD utils + +date () { gdate "$@"; } +base64 () { gbase64 "$@"; } +wc () { gwc "$@"; } +sed () { gsed "$@"; } +sha256sum () { gsha256sum "$@"; } diff --git a/test/test-lib-common.sh b/test/test-lib-common.sh index 03ef1d2d..1c8d7f6e 100644 --- a/test/test-lib-common.sh +++ b/test/test-lib-common.sh @@ -66,6 +66,11 @@ export LD_LIBRARY_PATH # configure output . $notmuch_path/sh.config || exit 1 +# load OS specifics +if [ -e ./test-lib-$PLATFORM.sh ]; then + . ./test-lib-$PLATFORM.sh +fi + if test -n "$valgrind" then make_symlink () { -- 2.11.0 --m6j8n7ENRI4P4L3G--