fix `make check' for build in a separate directory
This commit is contained in:
parent
c349a97ea1
commit
f40f6c705a
17
ChangeLog
17
ChangeLog
|
|
@ -1,3 +1,20 @@
|
||||||
|
2011-01-25 Robert Larice
|
||||||
|
* Modified src/include/cmproto.h ,
|
||||||
|
* Modified src/xspice/icm/dlmain.c ,
|
||||||
|
* Modified src/xspice/icm/digital/d_source/cfunc.mod ,
|
||||||
|
* Modified src/xspice/icm/digital/d_state/cfunc.mod ,
|
||||||
|
* Modified tests/bin/check.sh ,
|
||||||
|
* Added tests/bin/spinit ,
|
||||||
|
* Modified tests/bsim3/dc_sim/Makefile.am ,
|
||||||
|
* Modified tests/bsim3soi/Makefile.am ,
|
||||||
|
* Modified tests/bsim3soidd/Makefile.am ,
|
||||||
|
* Modified tests/bsim3soifd/Makefile.am ,
|
||||||
|
* Modified tests/bsim3soipd/Makefile.am ,
|
||||||
|
* Modified tests/bsim4/Makefile.am ,
|
||||||
|
* Modified tests/xspice/digital/Makefile.am ,
|
||||||
|
* Modified tests/xspice/digital/spinit.in :
|
||||||
|
fix `make check' for build in a separate directory
|
||||||
|
|
||||||
2011-01-25 Robert Larice
|
2011-01-25 Robert Larice
|
||||||
* Modified configure.ac ,
|
* Modified configure.ac ,
|
||||||
* Modified src/xspice/Makefile.am ,
|
* Modified src/xspice/Makefile.am ,
|
||||||
|
|
|
||||||
|
|
@ -102,4 +102,6 @@ void *calloc_pj(size_t s1, size_t s2);
|
||||||
void *realloc_pj(void *ptr, size_t s);
|
void *realloc_pj(void *ptr, size_t s);
|
||||||
void free_pj(void *ptr);
|
void free_pj(void *ptr);
|
||||||
|
|
||||||
|
FILE *fopen_with_path(const char *path, const char *mode);
|
||||||
|
|
||||||
#endif /* CMPROTO_DEFINED */
|
#endif /* CMPROTO_DEFINED */
|
||||||
|
|
|
||||||
|
|
@ -1019,7 +1019,7 @@ void cm_d_source(ARGS)
|
||||||
|
|
||||||
|
|
||||||
/*** open file and count the number of vectors in it ***/
|
/*** open file and count the number of vectors in it ***/
|
||||||
source = fopen( PARAM(input_file), "r");
|
source = fopen_with_path( PARAM(input_file), "r");
|
||||||
|
|
||||||
/* increment counter if not a comment until EOF reached... */
|
/* increment counter if not a comment until EOF reached... */
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|
|
||||||
|
|
@ -1779,7 +1779,7 @@ void cm_d_state(ARGS)
|
||||||
|
|
||||||
|
|
||||||
/*** open file and count the number of vectors in it ***/
|
/*** open file and count the number of vectors in it ***/
|
||||||
state_file = fopen( PARAM(state_file), "r");
|
state_file = fopen_with_path( PARAM(state_file), "r");
|
||||||
|
|
||||||
/* increment counter if not a comment until EOF reached... */
|
/* increment counter if not a comment until EOF reached... */
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|
|
||||||
|
|
@ -388,3 +388,29 @@ void * trealloc(void *ptr, size_t s) {
|
||||||
void txfree(void *ptr) {
|
void txfree(void *ptr) {
|
||||||
(coreitf->dllitf_txfree)(ptr);
|
(coreitf->dllitf_txfree)(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#define MAX_PATH_LEN 1024
|
||||||
|
|
||||||
|
FILE *fopen_with_path(const char *path, const char *mode)
|
||||||
|
{
|
||||||
|
char buf[MAX_PATH_LEN+1];
|
||||||
|
|
||||||
|
if(path[0] != '/') {
|
||||||
|
const char *x = getenv("ngspice_vpath");
|
||||||
|
if(x) {
|
||||||
|
char *a;
|
||||||
|
strcpy(buf, x);
|
||||||
|
a = strrchr(buf, '/');
|
||||||
|
if(a && a[1] == '\0')
|
||||||
|
a[0] = '\0';
|
||||||
|
strcat(buf, "/");
|
||||||
|
strcat(buf, path);
|
||||||
|
path = buf;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return fopen(path, mode);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,19 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# set -x
|
||||||
|
|
||||||
|
if [ -z "$SPICE_SCRIPTS" ] ; then
|
||||||
|
SPICE_SCRIPTS=`dirname $0`
|
||||||
|
export SPICE_SCRIPTS
|
||||||
|
if [ -z "$ngspice_vpath" ] ; then
|
||||||
|
ngspice_vpath=.
|
||||||
|
export ngspice_vpath
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ls -ld $(realpath $SPICE_SCRIPTS) $SPICE_SCRIPTS/spinit
|
||||||
|
# echo "---ngspice_vpath = $ngspice_vpath"
|
||||||
|
|
||||||
SPICE=$1
|
SPICE=$1
|
||||||
TEST=$2
|
TEST=$2
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
* due to a broken implementation of the ngspice frontend
|
||||||
|
* this environment variable must be lower-case
|
||||||
|
|
||||||
|
set sourcepath = ( $ngspice_vpath . )
|
||||||
|
|
@ -17,7 +17,7 @@ TESTS = \
|
||||||
test14.cir
|
test14.cir
|
||||||
|
|
||||||
|
|
||||||
TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice
|
TESTS_ENVIRONMENT = ngspice_vpath=$(srcdir) $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
modelcard.nmos \
|
modelcard.nmos \
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ TESTS = \
|
||||||
inv_dc.cir \
|
inv_dc.cir \
|
||||||
inv_tr.cir
|
inv_tr.cir
|
||||||
|
|
||||||
TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice
|
TESTS_ENVIRONMENT = ngspice_vpath=$(srcdir) $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
nmos4p3.mod \
|
nmos4p3.mod \
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ TESTS = \
|
||||||
inv2.cir \
|
inv2.cir \
|
||||||
RampVg2.cir
|
RampVg2.cir
|
||||||
|
|
||||||
TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice
|
TESTS_ENVIRONMENT = ngspice_vpath=$(srcdir) $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
nmosdd.mod \
|
nmosdd.mod \
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ TESTS = \
|
||||||
inv2.cir \
|
inv2.cir \
|
||||||
RampVg2.cir
|
RampVg2.cir
|
||||||
|
|
||||||
TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice
|
TESTS_ENVIRONMENT = ngspice_vpath=$(srcdir) $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
nmosfd.mod \
|
nmosfd.mod \
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ TESTS = \
|
||||||
inv2.cir \
|
inv2.cir \
|
||||||
RampVg2.cir
|
RampVg2.cir
|
||||||
|
|
||||||
TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice
|
TESTS_ENVIRONMENT = ngspice_vpath=$(srcdir) $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
nmospd.mod \
|
nmospd.mod \
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ TESTS = \
|
||||||
opamp.cir \
|
opamp.cir \
|
||||||
ro_17.cir
|
ro_17.cir
|
||||||
|
|
||||||
TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice
|
TESTS_ENVIRONMENT = ngspice_vpath=$(srcdir) $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
modelcard.nmos \
|
modelcard.nmos \
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ TESTS = \
|
||||||
d_source.cir \
|
d_source.cir \
|
||||||
d_state.cir
|
d_state.cir
|
||||||
|
|
||||||
TESTS_ENVIRONMENT = SPICE_SCRIPTS=$(srcdir) $(SHELL) $(top_srcdir)/tests/bin/check.sh "$(top_builddir)/src/ngspice -r foobaz"
|
TESTS_ENVIRONMENT = ngspice_vpath=$(srcdir) SPICE_SCRIPTS=. $(SHELL) $(top_srcdir)/tests/bin/check.sh "$(top_builddir)/src/ngspice -r foobaz"
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
d_ram-stimulus.txt \
|
d_ram-stimulus.txt \
|
||||||
|
|
|
||||||
|
|
@ -1 +1,2 @@
|
||||||
codemodel @top_builddir@/src/xspice/icm/digital/digital.cm
|
codemodel @top_builddir@/src/xspice/icm/digital/digital.cm
|
||||||
|
set sourcepath = ( $ngspice_vpath . )
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue