Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7D8BE9D1E for ; Tue, 24 Apr 2012 17:05:04 +0000 (UTC) Received: (qmail 29459 invoked by uid 500); 24 Apr 2012 17:05:04 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 29416 invoked by uid 500); 24 Apr 2012 17:05:03 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 29407 invoked by uid 99); 24 Apr 2012 17:05:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2012 17:05:03 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of randall.leeds@gmail.com designates 209.85.210.44 as permitted sender) Received: from [209.85.210.44] (HELO mail-pz0-f44.google.com) (209.85.210.44) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2012 17:04:56 +0000 Received: by dadz14 with SMTP id z14so1368042dad.31 for ; Tue, 24 Apr 2012 10:04:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=ENXOENwdw4cDyLKzmZqRrGGnui3iaVKlORB+aapMkAY=; b=LQr8qAJOD9rqKh8STInruH/l5stH7leugd6qr/6zRHc9vob/fJGFttbetbIaWDwIdK U+ct6D20eUEz/J7MxidjTWvGMvuua8CgCUrr6+75SsFtnW0ete9BI/vRFpn7IBGHOWK7 6nC7pON97iJYJYZWTUOG2dNaMyaFPkvqkMbbuBQYdqO3sbTXi/1nYMzon5Tly91Avwqn ebFrikSW30Kiecr10hzW4JvMsRcGtbAZzBe7Og0/L8q3J29f1WhmqQ2Qqm3lIruZctAa gxGh+LqAolEfY3U5oe2pcrzQwCKnkz6t8lKXTNSdUinzAUVftkNnQranYI7FgKN12fO7 sM8g== MIME-Version: 1.0 Received: by 10.68.227.193 with SMTP id sc1mr101886pbc.158.1335287075481; Tue, 24 Apr 2012 10:04:35 -0700 (PDT) Sender: randall.leeds@gmail.com Received: by 10.68.72.72 with HTTP; Tue, 24 Apr 2012 10:04:34 -0700 (PDT) In-Reply-To: References: <20120127013712.8829B319D8A@tyr.zones.apache.org> Date: Tue, 24 Apr 2012 10:04:34 -0700 X-Google-Sender-Auth: ENnODiU0XkizDsFMh8n5TS7QV4w Message-ID: Subject: Re: [2/7] git commit: COUCHDB-1338 - run js tests with port=0 From: Randall Leeds To: dev@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, Apr 24, 2012 at 08:08, Jan Lehnardt wrote: > > On Apr 24, 2012, at 17:05 , Jan Lehnardt wrote: > >> >> On Jan 27, 2012, at 02:37 , randall@apache.org wrote: >> >>> COUCHDB-1338 - run js tests with port=3D0 >>> >>> When the JS tests POST to /_restart, the server comes back up on a >>> different port. To work around this, add a getter property for the >>> CouchHTTP.prototype.base_url property, using a reserved slot on the >>> object to store the value. >>> >>> >>> Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo >>> Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/d20e7926 >>> Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/d20e7926 >>> Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/d20e7926 >>> >>> Branch: refs/heads/master >>> Commit: d20e792617db738dd5ad0e046ae847cd740f586f >>> Parents: 257eb52 >>> Author: Randall Leeds >>> Authored: Sat Jan 7 14:21:29 2012 -0800 >>> Committer: Randall Leeds >>> Committed: Thu Jan 26 17:03:10 2012 -0800 >>> >>> ---------------------------------------------------------------------- >>> src/couchdb/priv/couch_js/help.h =C2=A0| =C2=A0 =C2=A02 + >>> src/couchdb/priv/couch_js/http.c =C2=A0| =C2=A0 60 ++++++++++++++++++++= +++++++++++- >>> src/couchdb/priv/couch_js/http.h =C2=A0| =C2=A0 =C2=A03 ++ >>> src/couchdb/priv/couch_js/sm170.c | =C2=A0 =C2=A08 ++++ >>> src/couchdb/priv/couch_js/sm180.c | =C2=A0 =C2=A08 ++++ >>> src/couchdb/priv/couch_js/sm185.c | =C2=A0 =C2=A08 ++++ >>> src/couchdb/priv/couch_js/util.c =C2=A0| =C2=A0 =C2=A03 +- >>> src/couchdb/priv/couch_js/util.h =C2=A0| =C2=A0 =C2=A02 + >>> test/Makefile.am =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0| =C2=A0 =C2=A01 + >>> test/etap/Makefile.am =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | =C2= =A0 =C2=A01 - >>> test/etap/random_port.ini =C2=A0 =C2=A0 =C2=A0 =C2=A0 | =C2=A0 19 -----= ----- >>> test/etap/test_util.erl.in =C2=A0 =C2=A0 =C2=A0 =C2=A0| =C2=A0 =C2=A02 = +- >>> test/javascript/Makefile.am =C2=A0 =C2=A0 =C2=A0 | =C2=A0 =C2=A01 + >>> test/javascript/couch_http.js =C2=A0 =C2=A0 | =C2=A0 =C2=A09 ++--- >>> test/javascript/run.tpl =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | =C2=A0 =C2= =A09 ++++- >>> test/random_port.ini =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| = =C2=A0 19 ++++++++++ >>> 16 files changed, 125 insertions(+), 30 deletions(-) >>> ---------------------------------------------------------------------- >>> >>> >>> [...] >>> http://git-wip-us.apache.org/repos/asf/couchdb/blob/d20e7926/test/javas= cript/run.tpl >>> ---------------------------------------------------------------------- >>> diff --git a/test/javascript/run.tpl b/test/javascript/run.tpl >>> index 47d2f6e..ac78b50 100644 >>> --- a/test/javascript/run.tpl >>> +++ b/test/javascript/run.tpl >>> @@ -17,6 +17,7 @@ SCRIPT_DIR=3D$SRC_DIR/share/www/script >>> JS_TEST_DIR=3D$SRC_DIR/test/javascript >>> >>> COUCHJS=3D%abs_top_builddir%/src/couchdb/priv/couchjs >>> +COUCH_URI_FILE=3D%localstaterundir%/couch.uri >>> >>> if [ "$#" -eq 0 ]; >>> then >>> @@ -48,11 +49,15 @@ abort() { >>> if [ -z $COUCHDB_NO_START ]; then >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0make dev >>> =C2=A0 =C2=A0 =C2=A0trap 'abort' 0 1 2 3 4 6 8 15 >>> - =C2=A0 =C2=A0./utils/run -b -r 1 >>> + =C2=A0 =C2=A0./utils/run -b -r 1 -n \ >>> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-a $SRC_DIR/etc/couchdb/defa= ult_dev.ini \ >>> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-a $SRC_DIR/test/random_port= .ini \ >>> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-a $SRC_DIR/etc/couchdb/loca= l_dev.ini >> >> >> Randall, this breaks vpath builds. removing the -n option and the -n lin= es makes it work for me. > > =E2=80=A6 and the -a lines =E2=80=A6 Hmm. Maybe it should be "$(abs_top_builddir)" instead of SRC_DIR? The -a ...random_port.ini is the crucial one, because that's the point of the patch. I can't remember at this moment why I needed to specify exactly all the configs and use the -n to reset the config chain, but I'm sure there was a reason (like random_port.ini not getting preference over default_dev.ini or something). -R