From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 617BB1F463; Tue, 24 Sep 2019 04:01:23 +0000 (UTC) Date: Tue, 24 Sep 2019 04:01:23 +0000 From: Eric Wong To: Alyssa Ross Cc: meta@public-inbox.org Subject: Re: [PATCH] t/spawn: fix with unusual env locations Message-ID: <20190924040123.6jbtvpadnk6negox@whir> References: <20190915134819.1406-1-hi@alyssa.is> <20190915185519.GA4891@dcvr> <87zhiu4hxl.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87zhiu4hxl.fsf@alyssa.is> List-Id: Alyssa Ross wrote: > >> The call to spawn clears the environment, including PATH. This means > >> that an env in a non-default location wouldn't be found, while all the > >> other tests work because they use PATH. We can fix this by looking up > >> which PATH to use beforehand. > > > > Thanks for reporting this issue, but... is that it? > > We also use spawn() for 'git', among other things... > > Yes, I can confirm that this was the only failing test case in my build. Thanks for confirming, pushed my patch as 4b3e278d9c4e5d1f55c1781aa0a7c9f0453f3852 to master. In my original reply, I missed the test was using the "-env" option to clear %ENV. It's probably safe to drop the "-env" option for spawn() to clear %ENV since we don't use it in real code... > (It may be of note however that I did not have Xapian enabled. Trying > to build with that caused a host of other failures that were beyond my > ability to troubleshoot, so I decided to just give up on running the > tests for now, since they seem very dependent on the environment and the > environment inside our build sandboxes is so different from what > public-inbox will have on a running system anyway.) I don't know much about Nix, but I hope/expect public-inbox tests to work on every reasonably modern Unix-like OS which Perl5, git, and SQLite run on. If you post logs of the failures you encountered, it would improve the chances that somebody here (maybe not me) can help fix them. Thanks.