From dev-return-22109-apmail-couchdb-dev-archive=couchdb.apache.org@couchdb.apache.org Tue Apr 24 18:40:11 2012 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 5345697CD for ; Tue, 24 Apr 2012 18:40:11 +0000 (UTC) Received: (qmail 76114 invoked by uid 500); 24 Apr 2012 18:40:10 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 76064 invoked by uid 500); 24 Apr 2012 18:40:10 -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 76054 invoked by uid 99); 24 Apr 2012 18:40:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2012 18:40:10 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [80.244.253.218] (HELO mail.traeumt.net) (80.244.253.218) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2012 18:40:05 +0000 Received: from rose.local (pD4B88FF6.dip.t-dialin.net [212.184.143.246]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.traeumt.net (Postfix) with ESMTPSA id 73010141E0 for ; Tue, 24 Apr 2012 20:41:07 +0200 (CEST) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Apple Message framework v1257) Subject: Re: [2/7] git commit: COUCHDB-1338 - run js tests with port=0 From: Jan Lehnardt In-Reply-To: Date: Tue, 24 Apr 2012 20:39:42 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <8844F652-309F-4A4B-8AC2-2D3D0E7B28E0@apache.org> References: <20120127013712.8829B319D8A@tyr.zones.apache.org> To: dev@couchdb.apache.org X-Mailer: Apple Mail (2.1257) X-Virus-Checked: Checked by ClamAV on apache.org Thanks for the replies! ./test/javascript/run.tpl, line 15: SRC_DIR=3D%abs_top_srcdir% What now? :) Jan --=20 On Apr 24, 2012, at 20:25 , Paul Davis wrote: > Yeah. We'll need an $(abs_top_srcdir) or $(abs_top_builddir) here > depending on how they're used. It can be a bit of a PITA if one of > those needs to support write backs by one of the tests. Basic solution > is to name them foo.ini.tpl and then "build" foo.ini and use > $(abs_top_builddir) in that case. Where by "build" I mean `cp $< $@` > or so. >=20 > On Tue, Apr 24, 2012 at 12:04 PM, Randall Leeds = wrote: >> On Tue, Apr 24, 2012 at 08:08, Jan Lehnardt wrote: >>>=20 >>> On Apr 24, 2012, at 17:05 , Jan Lehnardt wrote: >>>=20 >>>>=20 >>>> On Jan 27, 2012, at 02:37 , randall@apache.org wrote: >>>>=20 >>>>> COUCHDB-1338 - run js tests with port=3D0 >>>>>=20 >>>>> 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. >>>>>=20 >>>>>=20 >>>>> 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 >>>>>=20 >>>>> 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 >>>>>=20 >>>>> = ---------------------------------------------------------------------- >>>>> src/couchdb/priv/couch_js/help.h | 2 + >>>>> src/couchdb/priv/couch_js/http.c | 60 = +++++++++++++++++++++++++++++++- >>>>> src/couchdb/priv/couch_js/http.h | 3 ++ >>>>> src/couchdb/priv/couch_js/sm170.c | 8 ++++ >>>>> src/couchdb/priv/couch_js/sm180.c | 8 ++++ >>>>> src/couchdb/priv/couch_js/sm185.c | 8 ++++ >>>>> src/couchdb/priv/couch_js/util.c | 3 +- >>>>> src/couchdb/priv/couch_js/util.h | 2 + >>>>> test/Makefile.am | 1 + >>>>> test/etap/Makefile.am | 1 - >>>>> test/etap/random_port.ini | 19 ---------- >>>>> test/etap/test_util.erl.in | 2 +- >>>>> test/javascript/Makefile.am | 1 + >>>>> test/javascript/couch_http.js | 9 ++--- >>>>> test/javascript/run.tpl | 9 ++++- >>>>> test/random_port.ini | 19 ++++++++++ >>>>> 16 files changed, 125 insertions(+), 30 deletions(-) >>>>> = ---------------------------------------------------------------------- >>>>>=20 >>>>>=20 >>>>> [...] >>>>> = http://git-wip-us.apache.org/repos/asf/couchdb/blob/d20e7926/test/javascri= pt/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 >>>>>=20 >>>>> COUCHJS=3D%abs_top_builddir%/src/couchdb/priv/couchjs >>>>> +COUCH_URI_FILE=3D%localstaterundir%/couch.uri >>>>>=20 >>>>> if [ "$#" -eq 0 ]; >>>>> then >>>>> @@ -48,11 +49,15 @@ abort() { >>>>> if [ -z $COUCHDB_NO_START ]; then >>>>> make dev >>>>> trap 'abort' 0 1 2 3 4 6 8 15 >>>>> - ./utils/run -b -r 1 >>>>> + ./utils/run -b -r 1 -n \ >>>>> + -a $SRC_DIR/etc/couchdb/default_dev.ini \ >>>>> + -a $SRC_DIR/test/random_port.ini \ >>>>> + -a $SRC_DIR/etc/couchdb/local_dev.ini >>>>=20 >>>>=20 >>>> Randall, this breaks vpath builds. removing the -n option and the = -n lines makes it work for me. >>>=20 >>> =85 and the -a lines =85 >>=20 >> 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). >>=20 >> -R