zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: Leo Famulari <leo@famulari.name>, <zsh-workers@zsh.org>
Subject: Re: Zsh 5.6 test failures in A05execution.ztst
Date: Wed, 5 Sep 2018 08:49:58 +0100	[thread overview]
Message-ID: <20180905075000eucas1p1a912c6e3ec5324dbcf5bd8895ce00be2~RcY1ws1RK1303913039eucas1p1k@eucas1p1.samsung.com> (raw)
In-Reply-To: <20180904224014.GA14458@jasmine.lan>

On Tue, 4 Sep 2018 18:40:14 -0400
Leo Famulari <leo@famulari.name> wrote:
> While testing the update of Zsh 5.6 for GNU Guix [0] I encountered some
> new test failures in the Zsh test suite.
> 
> Specifically, like this:
> 
> ------
> Test ./A05execution.ztst failed: bad status 127, expected 0 from:
>   PATH=/bin:${ZTST_testdir}/command.tmp/ tstcmd-slashless
> Error output:
> (eval):1: /tmp/guix-build-zsh-5.6.drv-0/zsh-5.6/Test/command.tmp//tstcmd-slashless: bad interpreter: sh: no such file or directory
> Was testing: path (3)
> ./A05execution.ztst: test failed.
> ------
> 
> Indeed, in the build environment of Guix packages, there is no /bin/sh
> or any other executables at locations that might be familiar and
> possible to guess in advance. There is a `sh` (from Bash) on PATH, but
> these tests reset PATH.

OK, thanks for the report
 
> Our workaround can be seen here:
> 
> https://git.savannah.gnu.org/cgit/guix.git/commit/?id=fcf4841c0ee16631e8330d797cf3788dac0eca05

Heh.  Rather than decode a lisp solution I've made my own...

Can you confirm this works OK?

We'll probably make a 5.6.1 with niggles fixed.

Thanks
pws


diff --git a/Test/A05execution.ztst b/Test/A05execution.ztst
index fb39d05..d34e37f 100644
--- a/Test/A05execution.ztst
+++ b/Test/A05execution.ztst
@@ -6,11 +6,12 @@
 
   cd command.tmp
 
-  print '#!/bin/sh\necho This is top' >tstcmd
+  sh="$(which sh)"
+  print "#!${sh}\necho This is top" >tstcmd
 
-  print '#!/bin/sh\necho This is dir1' >dir1/tstcmd
+  print "#!${sh}\necho This is dir1" >dir1/tstcmd
 
-  print '#!/bin/sh\necho This is dir2' >dir2/tstcmd
+  print "#!${sh}\necho This is dir2" >dir2/tstcmd
 
   print -n '#!sh\necho This is slashless' >tstcmd-slashless
   print -n '#!echo foo\necho This is arg' >tstcmd-arg


  reply	other threads:[~2018-09-05  7:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20180904224101epcas1p22c7c1a0fc8465715429c07c0b49177a5@epcas1p2.samsung.com>
2018-09-04 22:40 ` Leo Famulari
2018-09-05  7:49   ` Peter Stephenson [this message]
2018-09-05 10:25     ` 5.6.1? (was: Re: Zsh 5.6 test failures in A05execution.ztst) Daniel Shahaf
     [not found]   ` <20180905084958.5b1b4552@camnpupstephen.cam.scsc.local>
2018-09-05  8:49     ` Zsh 5.6 test failures in A05execution.ztst Peter Stephenson
2018-09-05 16:45       ` Leo Famulari
2018-09-05 16:59         ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='20180905075000eucas1p1a912c6e3ec5324dbcf5bd8895ce00be2~RcY1ws1RK1303913039eucas1p1k@eucas1p1.samsung.com' \
    --to=p.stephenson@samsung.com \
    --cc=leo@famulari.name \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).