Browse Source

allow debug switch on commandline

dwarning 15 years ago
parent
commit
cd19d8c31d
  1. 78
      tests/bin/run_cmc_check

78
tests/bin/run_cmc_check

@ -1,38 +1,40 @@
#!/bin/sh #!/bin/sh
# #
# Example Script to run tests and check results.
# Example Script to run tests and check results.
# #
# This is an example script for running QA tests on a
# model and then checking the simulated results against
# reference results. A separate target is defined for each
# variant of the model. The program runQaTests.pl runs the
# tests, and that program expects a perl module SIMULATOR.pm
# to be provided for each simulator that is tested.
# Examples of these are provided.
# This is an example script for running QA tests on a
# model and then checking the simulated results against
# reference results. A separate target is defined for each
# variant of the model. The program runQaTests.pl runs the
# tests, and that program expects a perl module SIMULATOR.pm
# to be provided for each simulator that is tested.
# Examples of these are provided.
# #
qaSpecFile="qaSpec" qaSpecFile="qaSpec"
qaResultsDirectory="results" qaResultsDirectory="results"
testProgramName="$(dirname $0)/runQaTests.pl" testProgramName="$(dirname $0)/runQaTests.pl"
testProgramFlags="-nwV"
if [ -z "$testProgramFlags" ] ; then
testProgramFlags="-nwV"
fi
#testProgramFlags="-d" #testProgramFlags="-d"
help() { help() {
cat <<-EOF cat <<-EOF
Valid targets are:
Valid targets are:
all run tests and compare results for all simulators
all run tests and compare results for all simulators
spice run tests and compare results spice
ngspice run tests and compare results ngspice
spice run tests and compare results spice
ngspice run tests and compare results ngspice
clean remove all previously generated simulation results
clean remove all previously generated simulation results
NOTE: if test results exist they are not resimulated
NOTE: to force resimulation run "make clean" first
NOTE: if test results exist they are not resimulated
NOTE: to force resimulation run "make clean" first
EOF EOF
} }
@ -52,50 +54,50 @@ run_test() {
for test in `${testProgramName} -lt -s ${simname} ${qaSpecFile}` ; do for test in `${testProgramName} -lt -s ${simname} ${qaSpecFile}` ; do
echo ""
echo "****** Checking test (${simname}): ${test}"
echo ""
echo "****** Checking test (${simname}): ${test}"
for variant in `${testProgramName} -lv -s ${simname} ${qaSpecFile}` ; do
${testProgramName} \
for variant in `${testProgramName} -lv -s ${simname} ${qaSpecFile}` ; do
${testProgramName} \
${testProgramFlags} \ ${testProgramFlags} \
-s ${simname} \ -s ${simname} \
-r -t ${test} \ -r -t ${test} \
-var ${variant} \ -var ${variant} \
--results=${qaResultsDirectory} \ --results=${qaResultsDirectory} \
${qaSpecFile} ${qaSpecFile}
done
done
done done
for version in `ls -C1 ${qaResultsDirectory}/${simname}` ; do for version in `ls -C1 ${qaResultsDirectory}/${simname}` ; do
for platform in `ls -C1 ${qaResultsDirectory}/${simname}/${version}` ; do
for platform in `ls -C1 ${qaResultsDirectory}/${simname}/${version}` ; do
if [ ${version} = ${localVersion} -a ${platform} = ${localPlatform} ]
if [ ${version} = ${localVersion} -a ${platform} = ${localPlatform} ]
then then
break
fi
break
fi
echo ""
echo "******"
echo "****** Comparing previously run ${qaSpecFile} tests for ${simname}"
echo "****** (for version ${version} on platform ${platform})"
echo "******"
echo ""
echo "******"
echo "****** Comparing previously run ${qaSpecFile} tests for ${simname}"
echo "****** (for version ${version} on platform ${platform})"
echo "******"
for test in `${testProgramName} -lt -s ${simname} ${qaSpecFile}` ; do
for test in `${testProgramName} -lt -s ${simname} ${qaSpecFile}` ; do
echo ""
echo "****** Checking test (${simname}): ${test}"
echo ""
echo "****** Checking test (${simname}): ${test}"
for variant in `${testProgramName} -lv -s ${simname} ${qaSpecFile}` ; do
${testProgramName} \
for variant in `${testProgramName} -lv -s ${simname} ${qaSpecFile}` ; do
${testProgramName} \
-c ${version} ${platform} \ -c ${version} ${platform} \
-s ${simname} \ -s ${simname} \
-t ${test} \ -t ${test} \
-var ${variant} \ -var ${variant} \
--results=${qaResultsDirectory} \ --results=${qaResultsDirectory} \
${qaSpecFile} ${qaSpecFile}
done
done
done
done
done
done
done done
} }

Loading…
Cancel
Save