[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #52627] Failing BIST tests on Mac OS X
From: |
Sebastian |
Subject: |
[Octave-bug-tracker] [bug #52627] Failing BIST tests on Mac OS X |
Date: |
Wed, 31 Jan 2018 12:02:11 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/604.5.6 (KHTML, like Gecko) Version/11.0.3 Safari/604.5.6 |
Follow-up Comment #26, bug #52627 (project octave):
@Rik: It's quite complicated to understand what is going on because this
problem occurs mainly when using homebrew as a package manager. Homebrew calls
configure and make from its own environment (using ruby). The code
if (ispc ())
envname = "TMP";
else
envname = "TMPDIR";
endif
envdir = getenv (envname);
unsetenv (envname);
## Strip trailing file separators from P_tmpdir
def_tmpdir = P_tmpdir;
while (length (def_tmpdir) > 2 && strfind (filesep ("all"), def_tmpdir(end)))
def_tmpdir(end) = [];
endwhile
## Test 0-argument form
fname = tempname ();
[tmpdir, tmpfname] = fileparts (fname);
assert (tmpdir, def_tmpdir);
fails with
error: ASSERT errors for: assert (tmpdir,def_tmpdir)
Location | Observed | Expected | Reason
[] /tmp /var/tmp Strings don't match
and experiments in that environment show
octave:1> fname = tempname ()
fname = /var/tmp/oct-ynlTG9
octave:2> setenv("TMPDIR","/tmp")
octave:3> fname = tempname ()
fname = /var/tmp/oct-LmECe5
octave:4> setenv("TMP","/tmp")
octave:5> fname = tempname ()
fname = /tmp/oct-zFVL0A
and in my user environment
octave:1> fname = tempname ()
fname = /var/folders/yr/0kxqs6ns5_ncvr7v_sg568ww0000gp/T/oct-vpF8Ub
octave:2> setenv("TMPDIR","/tmp")
octave:3> fname = tempname ()
fname = /var/tmp/oct-e4Moqt
octave:4> setenv("TMP","/tmp")
octave:5> fname = tempname ()
fname = /tmp/oct-yIW2Zw
However, in either case "TMP" seems to have preference over "TMPDIR".
Bye
Sebastian
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?52627>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/