Remove environment variable settings.
Now that we are not abusing $HOME to get to the terminfo db, make it visible.
This commit is contained in:
parent
046bfa491c
commit
355eb06ba8
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.1 2011/04/10 09:55:08 blymn Exp $
|
||||
# $NetBSD: Makefile,v 1.2 2011/06/17 16:59:51 christos Exp $
|
||||
|
||||
NOMAN= # defined
|
||||
|
||||
|
@ -9,7 +9,7 @@ SUBDIR= director slave tests check_files
|
|||
TESTSDIR= ${TESTSBASE}/lib/libcurses
|
||||
|
||||
TEST_TERMINFO= atf.terminfo
|
||||
TERMINFO_DB= .terminfo
|
||||
TERMINFO_DB= terminfo
|
||||
TERMINFODIR= ${TESTSDIR}
|
||||
|
||||
FILESDIR= ${TESTSDIR}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: director.c,v 1.6 2011/06/17 02:15:28 christos Exp $ */
|
||||
/* $NetBSD: director.c,v 1.7 2011/06/17 16:59:51 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright 2009 Brett Lymn <blymn@NetBSD.org>
|
||||
|
@ -199,16 +199,14 @@ main(int argc, char *argv[])
|
|||
|
||||
if (S_ISDIR(st.st_mode)) {
|
||||
char tinfo[MAXPATHLEN];
|
||||
snprintf(tinfo, sizeof(tinfo), "%s/%s", termpath,
|
||||
".terminfo.db");
|
||||
if (stat(tinfo, &st) == -1) {
|
||||
snprintf(tinfo, sizeof(tinfo), "%s/%s", termpath,
|
||||
"terminfo.db");
|
||||
if (stat(tinfo, &st) == -1)
|
||||
err(1, "Cannot stat `%s/%s' or `%s/%s'",
|
||||
termpath, "terminfo.db", termpath,
|
||||
".terminfo.db");
|
||||
}
|
||||
int l = snprintf(tinfo, sizeof(tinfo), "%s/%s", termpath,
|
||||
"terminfo.db");
|
||||
if (stat(tinfo, &st) == -1)
|
||||
err(1, "Cannot stat `%s'", tinfo);
|
||||
if (l >= 3)
|
||||
tinfo[l - 3] = '\0';
|
||||
if (setenv("TERMINFO", tinfo, 1) != 0)
|
||||
err(1, "Failed to set TERMINFO variable");
|
||||
} else {
|
||||
int fd;
|
||||
char *tinfo;
|
||||
|
@ -218,7 +216,7 @@ main(int argc, char *argv[])
|
|||
fd, 0)) == MAP_FAILED)
|
||||
err(1, "Cannot map `%s'", termpath);
|
||||
if (setenv("TERMINFO", tinfo, 1) != 0)
|
||||
err(2, "Failed to set TERMINFO variable");
|
||||
err(1, "Failed to set TERMINFO variable");
|
||||
close(fd);
|
||||
munmap(tinfo, (size_t)st.st_size);
|
||||
}
|
||||
|
|
|
@ -3,11 +3,6 @@ h_run()
|
|||
{
|
||||
file="$(atf_get_srcdir)/tests/${1}"
|
||||
|
||||
HOME=$(atf_get_srcdir)
|
||||
CHECK_PATH=
|
||||
INCLUDE_PATH=$(atf_get_srcdir)/tests
|
||||
export CHECK_PATH INCLUDE_PATH HOME
|
||||
|
||||
$(atf_get_srcdir)/director \
|
||||
-T $(atf_get_srcdir) \
|
||||
-t atf \
|
||||
|
|
Loading…
Reference in New Issue