incorporate CMC test suite into make target 'check'
This commit is contained in:
parent
b506441241
commit
19cff2c4be
11
ChangeLog
11
ChangeLog
|
|
@ -1,3 +1,14 @@
|
|||
2011-05-30 Robert Larice
|
||||
* configure.ac ,
|
||||
* tests/bin/modelQaTestRoutines.pm ,
|
||||
* tests/bin/ngspice.pm ,
|
||||
* tests/bin/runQaTests.pl ,
|
||||
* tests/bin/run_cmc_check ,
|
||||
* tests/hisim/Makefile.am ,
|
||||
* tests/hisimhv/.cvsignore ,
|
||||
* tests/hisimhv/Makefile.am :
|
||||
incorporate CMC test suite into make target 'check'
|
||||
|
||||
2011-05-29 Holger Vogt
|
||||
* winmain.c, winmain.h: prototypes and forwards
|
||||
|
||||
|
|
|
|||
|
|
@ -1106,6 +1106,8 @@ AC_CONFIG_FILES([Makefile
|
|||
tests/filters/Makefile
|
||||
tests/general/Makefile
|
||||
tests/hfet/Makefile
|
||||
tests/hisim/Makefile
|
||||
tests/hisimhv/Makefile
|
||||
tests/jfet/Makefile
|
||||
tests/mes/Makefile
|
||||
tests/mesa/Makefile
|
||||
|
|
|
|||
|
|
@ -334,12 +334,13 @@ sub processTestSpec {
|
|||
}
|
||||
if (s/^modelParameters\s+//i) {
|
||||
foreach $arg (split(/\s+/,$_)) {
|
||||
if ($arg !~ /.=./ && ! -r $arg) {
|
||||
$arg_file = $main::srcdir . $arg;
|
||||
if ($arg !~ /.=./ && ! -r $arg_file) {
|
||||
die("ERROR: model parameters must be name=value pairs or a file name, stopped");
|
||||
}
|
||||
if (-r $arg) {
|
||||
if (!open(IF,"$arg")) {
|
||||
die("ERROR: cannot open file $arg, stopped");
|
||||
if (-r $arg_file) {
|
||||
if (!open(IF,"$arg_file")) {
|
||||
die("ERROR: cannot open file $arg_file, stopped");
|
||||
}
|
||||
while (<IF>) {
|
||||
chomp;s/\s*=\s*/=/g;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
#
|
||||
|
||||
package simulate;
|
||||
$simulatorCommand="ngspice";
|
||||
$netlistFile="ngspiceCkt";
|
||||
use strict;
|
||||
|
||||
|
|
@ -75,8 +74,8 @@ sub runNoiseTest {
|
|||
# Run simulations and get the results
|
||||
#
|
||||
|
||||
if (!open(SIMULATE,"$simulate::simulatorCommand < $simulate::netlistFile 2>/dev/null|")) {
|
||||
die("ERROR: cannot run $main::simulatorName, stopped");
|
||||
if (!open(SIMULATE,"$main::simulatorCommand < $simulate::netlistFile 2>/dev/null|")) {
|
||||
die("ERROR: cannot run $main::simulatorCommand, stopped");
|
||||
}
|
||||
$inData=0;
|
||||
while (<SIMULATE>) {
|
||||
|
|
@ -202,8 +201,8 @@ sub runAcTest {
|
|||
# Run simulations and get the results
|
||||
#
|
||||
|
||||
if (!open(SIMULATE,"$simulate::simulatorCommand < $simulate::netlistFile 2>/dev/null|")) {
|
||||
die("ERROR: cannot run $main::simulatorName, stopped");
|
||||
if (!open(SIMULATE,"$main::simulatorCommand < $simulate::netlistFile 2>/dev/null|")) {
|
||||
die("ERROR: cannot run $main::simulatorCommand, stopped");
|
||||
}
|
||||
$inData=0;
|
||||
while (<SIMULATE>) {
|
||||
|
|
@ -340,8 +339,8 @@ sub runDcTest {
|
|||
# Run simulations and get the results
|
||||
#
|
||||
|
||||
if (!open(SIMULATE,"$simulate::simulatorCommand < $simulate::netlistFile 2>/dev/null|")) {
|
||||
die("ERROR: cannot run $main::simulatorName, stopped");
|
||||
if (!open(SIMULATE,"$main::simulatorCommand < $simulate::netlistFile 2>/dev/null|")) {
|
||||
die("ERROR: cannot run $main::simulatorCommand, stopped");
|
||||
}
|
||||
$inResults=0;
|
||||
while (<SIMULATE>) {
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ $printWarnings=1;
|
|||
@prog=split("/",$0);
|
||||
$programDirectory=join("/",@prog[0..$#prog-1]);
|
||||
$prog=$prog[$#prog];
|
||||
$srcdir="";
|
||||
|
||||
#
|
||||
# These variables are only defined once in this file,
|
||||
|
|
@ -160,10 +161,14 @@ for (;;) {
|
|||
$forceSimulation=0;
|
||||
} elsif ($ARGV[0] =~ /^-sv/i) {
|
||||
$onlyDoSimulatorVersion=1;
|
||||
} elsif ($ARGV[0] =~ /^--executable=(.*)/i) {
|
||||
$simulatorCommand=$1;
|
||||
} elsif ($ARGV[0] =~ /^-s/) {
|
||||
shift(@ARGV);
|
||||
if ($#ARGV<0) {die("ERROR: no simulator specified for -s option, stopped")}
|
||||
$simulatorName=$ARGV[0];
|
||||
} elsif ($ARGV[0] =~ /^--srcdir=(.*)/i) {
|
||||
$srcdir=$1;
|
||||
} elsif ($ARGV[0] =~ /^-t/) {
|
||||
shift(@ARGV);
|
||||
if ($#ARGV<0) {die("ERROR: no test(s) specified for -t option, stopped")}
|
||||
|
|
@ -193,6 +198,9 @@ if ($#ARGV<0 && !$onlyDoPlatformVersion && !($onlyDoSimulatorVersion && defined(
|
|||
if (!$onlyDoPlatformVersion && !defined($simulatorName)) {
|
||||
&usage();exit(0);
|
||||
}
|
||||
if(!defined($simulatorCommand)) {
|
||||
$simulatorCommand=$simulatorName;
|
||||
}
|
||||
|
||||
#
|
||||
# Source perl modules with subroutines that are called to do all the work
|
||||
|
|
@ -226,7 +234,7 @@ if (!$onlyDoComparison) {
|
|||
}
|
||||
$qaSpecFile=$ARGV[0];
|
||||
$resultsDirectory="results";
|
||||
$refrnceDirectory="reference";
|
||||
$refrnceDirectory=$main::srcdir . "reference";
|
||||
|
||||
undef(%Defined);
|
||||
$Defined{$simulatorName}=1; # any `ifdef's in the QA spec file for $simulatorName are automatically inlcuded
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
qaSpecFile="qaSpec"
|
||||
qaResultsDirectory="results"
|
||||
testProgramName="../../bin/runQaTests.pl"
|
||||
testProgramName="$(dirname $0)/runQaTests.pl"
|
||||
testProgramFlags="-nwV"
|
||||
|
||||
#testProgramFlags="-d"
|
||||
|
|
@ -129,6 +129,22 @@ all() {
|
|||
}
|
||||
|
||||
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
--srcdir=* | --executable=*)
|
||||
testProgramFlags="$testProgramFlags $1"
|
||||
shift
|
||||
;;
|
||||
-qa)
|
||||
qaSpecFile="$2"
|
||||
shift ; shift
|
||||
;;
|
||||
*)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
for arg in $@ ; do
|
||||
case "$arg" in
|
||||
all | clean | spice | ngspice)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
|
||||
TESTS = nmos/qaSpec pmos/qaSpec
|
||||
|
||||
TESTS_ENVIRONMENT = \
|
||||
$(SHELL) $(top_srcdir)/tests/bin/check_cmc.sh \
|
||||
$(top_builddir)/src/ngspice
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(TESTS) \
|
||||
$(TESTS:.cir=.out)
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
clean-local:
|
||||
rm -rf results ngspiceCkt
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
Makefile.in
|
||||
Makefile
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
|
||||
TESTS = nmos/qaSpec.basic pmos/qaSpec.basic
|
||||
|
||||
TESTS_ENVIRONMENT = \
|
||||
$(SHELL) $(top_srcdir)/tests/bin/check_cmc.sh \
|
||||
$(top_builddir)/src/ngspice
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(TESTS) \
|
||||
$(TESTS:.cir=.out)
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
clean-local:
|
||||
rm -rf results ngspiceCkt
|
||||
Loading…
Reference in New Issue