8/5/08 Todd Coffey

To set up refactoring testing on a cvs branch, specify the following variables
and then execute the blocks of code below.

BRANCH_NAME=MPDE_ANALYSIS
BRANCH_TAG=MPDE_A
BRANCH_WORKDIR=/home/tscoffe/Project/MPDE_ANALYSIS_BRANCH
BASELINE_WORKDIR=/home/tscoffe/Project/MPDE_ANALYSIS_BRANCH/CLEAN


#
# CREATE THE BRANCH:
#

Xyce_Regression/TestScripts/branch_cvs.pl --branch_stub=$BRANCH_NAME --tag_stub=$BRANCH_TAG --branchdir=$BRANCH_WORKDIR --headdir=$BASELINE_WORKDIR --create_branch
Input Arguments: ./branch_cvs.pl --branch_stub=MPDE_ANALYSIS --tag_stub=MPDE_A --branchdir=/home/tscoffe/Project/Xyce__Work/MPDE_ANALYSIS_BRANCH --headdir=/home/tscoffe/Project/Xyce__Work/MPDE_ANALYSIS_BRANCH/CLEAN --create_branch
# Create branch for modules Xyce Xyce_Regression Xyce_FastrackRegression:
cvs -d :ext:joseki.sandia.gov:/Net/Proj/Xyce/CVS rtag TAG_CREATE_MPDE_ANALYSIS Xyce Xyce_Regression Xyce_FastrackRegression
cvs -d :ext:joseki.sandia.gov:/Net/Proj/Xyce/CVS rtag -b -r TAG_CREATE_MPDE_ANALYSIS BRANCH_MPDE_ANALYSIS Xyce Xyce_Regression Xyce_FastrackRegression
# Create merge tags on head and branch:
cvs -d :ext:joseki.sandia.gov:/Net/Proj/Xyce/CVS rtag TAG_HEAD_MERGE_TO_MPDE_A Xyce Xyce_Regression Xyce_FastrackRegression
cvs -d :ext:joseki.sandia.gov:/Net/Proj/Xyce/CVS rtag -r BRANCH_MPDE_ANALYSIS TAG_MPDE_A_MERGE_FROM_HEAD Xyce Xyce_Regression Xyce_FastrackRegression
# Create branch for modules Xyce_SandiaRegression SandiaModels SandiaModelsDocs:
cvs -d :ext:charleston.sandia.gov:/Net/Proj/Xyce/CVS rtag TAG_CREATE_MPDE_ANALYSIS Xyce_SandiaRegression SandiaModels SandiaModelsDocs
cvs -d :ext:charleston.sandia.gov:/Net/Proj/Xyce/CVS rtag -b -r TAG_CREATE_MPDE_ANALYSIS BRANCH_MPDE_ANALYSIS Xyce_SandiaRegression SandiaModels SandiaModelsDocs
# Create merge tags on head and branch:
cvs -d :ext:charleston.sandia.gov:/Net/Proj/Xyce/CVS rtag TAG_HEAD_MERGE_TO_MPDE_A Xyce_SandiaRegression SandiaModels SandiaModelsDocs
cvs -d :ext:charleston.sandia.gov:/Net/Proj/Xyce/CVS rtag -r BRANCH_MPDE_ANALYSIS TAG_MPDE_A_MERGE_FROM_HEAD Xyce_SandiaRegression SandiaModels SandiaModelsDocs

# 
# CHECKOUT THE BRANCH:
#

Xyce_Regression/TestScripts/branch_cvs.pl --branch_stub=MPDE_ANALYSIS --tag_stub=MPDE_A --branchdir=/home/tscoffe/Project/Xyce__Work/MPDE_ANALYSIS_BRANCH --headdir=/home/tscoffe/Project/Xyce__Work/MPDE_ANALYSIS_BRANCH/CLEAN --checkout_branch
Input Arguments: ./branch_cvs.pl --branch_stub=MPDE_ANALYSIS --tag_stub=MPDE_A --branchdir=/home/tscoffe/Project/Xyce__Work/MPDE_ANALYSIS_BRANCH --headdir=/home/tscoffe/Project/Xyce__Work/MPDE_ANALYSIS_BRANCH/CLEAN --checkout_branch
cd /home/tscoffe/Project/Xyce__Work/MPDE_ANALYSIS_BRANCH/
cvs -d :ext:joseki.sandia.gov:/Net/Proj/Xyce/CVS co -r BRANCH_MPDE_ANALYSIS Xyce
cd /home/tscoffe/Project/Xyce__Work/MPDE_ANALYSIS_BRANCH/
cvs -d :ext:joseki.sandia.gov:/Net/Proj/Xyce/CVS co -r BRANCH_MPDE_ANALYSIS Xyce_Regression
cd /home/tscoffe/Project/Xyce__Work/MPDE_ANALYSIS_BRANCH/Xyce_Regression
cvs -d :ext:joseki.sandia.gov:/Net/Proj/Xyce/CVS co -r BRANCH_MPDE_ANALYSIS Xyce_FastrackRegression
cd /home/tscoffe/Project/Xyce__Work/MPDE_ANALYSIS_BRANCH/Xyce_Regression
cvs -d :ext:charleston.sandia.gov:/Net/Proj/Xyce/CVS co -r BRANCH_MPDE_ANALYSIS Xyce_SandiaRegression
cd /home/tscoffe/Project/Xyce__Work/MPDE_ANALYSIS_BRANCH/Xyce/src/DeviceModelPKG
cvs -d :ext:charleston.sandia.gov:/Net/Proj/Xyce/CVS co -r BRANCH_MPDE_ANALYSIS SandiaModels
cd /home/tscoffe/Project/Xyce__Work/MPDE_ANALYSIS_BRANCH/Xyce/doc
cvs -d :ext:charleston.sandia.gov:/Net/Proj/Xyce/CVS co -r BRANCH_MPDE_ANALYSIS SandiaModelsDocs

You can check out just the SON modules with:
Xyce_Regression/TestScripts/branch_cvs.pl --branch_stub=MPDE_ANALYSIS --tag_stub=MPDE_A --branchdir=/home/tscoffe/Project/Xyce__Work/MPDE_ANALYSIS_BRANCH --headdir=/home/tscoffe/Project/Xyce__Work/MPDE_ANALYSIS_BRANCH/CLEAN --checkout_branch --srn_modules=" "

#
# CHECKOUT THE BASELINE:
#

./branch_cvs.pl --branch_stub=MPDE_ANALYSIS --tag_stub=MPDE_A --branchdir=/home/tscoffe/Project/Xyce__Work/MPDE_ANALYSIS_BRANCH --headdir=/home/tscoffe/Project/Xyce__Work/MPDE_ANALYSIS_BRANCH/CLEAN --checkout_head
Input Arguments: ./branch_cvs.pl --branch_stub=MPDE_ANALYSIS --tag_stub=MPDE_A --branchdir=/home/tscoffe/Project/Xyce__Work/MPDE_ANALYSIS_BRANCH --headdir=/home/tscoffe/Project/Xyce__Work/MPDE_ANALYSIS_BRANCH/CLEAN --checkout_head
cd /home/tscoffe/Project/Xyce__Work/MPDE_ANALYSIS_BRANCH/CLEAN/
cvs -d :ext:joseki.sandia.gov:/Net/Proj/Xyce/CVS co -r TAG_HEAD_MERGE_TO_MPDE_A Xyce
cd /home/tscoffe/Project/Xyce__Work/MPDE_ANALYSIS_BRANCH/CLEAN/
cvs -d :ext:joseki.sandia.gov:/Net/Proj/Xyce/CVS co -r TAG_HEAD_MERGE_TO_MPDE_A Xyce_Regression
cd /home/tscoffe/Project/Xyce__Work/MPDE_ANALYSIS_BRANCH/CLEAN/Xyce_Regression
cvs -d :ext:joseki.sandia.gov:/Net/Proj/Xyce/CVS co -r TAG_HEAD_MERGE_TO_MPDE_A Xyce_FastrackRegression
cd /home/tscoffe/Project/Xyce__Work/MPDE_ANALYSIS_BRANCH/CLEAN/Xyce_Regression
cvs -d :ext:charleston.sandia.gov:/Net/Proj/Xyce/CVS co -r TAG_HEAD_MERGE_TO_MPDE_A Xyce_SandiaRegression
cd /home/tscoffe/Project/Xyce__Work/MPDE_ANALYSIS_BRANCH/CLEAN/Xyce/src/DeviceModelPKG
cvs -d :ext:charleston.sandia.gov:/Net/Proj/Xyce/CVS co -r TAG_HEAD_MERGE_TO_MPDE_A SandiaModels
cd /home/tscoffe/Project/Xyce__Work/MPDE_ANALYSIS_BRANCH/CLEAN/Xyce/doc
cvs -d :ext:charleston.sandia.gov:/Net/Proj/Xyce/CVS co -r TAG_HEAD_MERGE_TO_MPDE_A SandiaModelsDocs

You can check out just the SON modules with:
./branch_cvs.pl --branch_stub=MPDE_ANALYSIS --tag_stub=MPDE_A --branchdir=/home/tscoffe/Project/Xyce__Work/MPDE_ANALYSIS_BRANCH --headdir=/home/tscoffe/Project/Xyce__Work/MPDE_ANALYSIS_BRANCH/CLEAN --checkout_head --srn_modules=" "

#
# Create the baseline testing output
#

BASELINEDIR=$BASELINE_WORKDIR/baseline_tests_SERIAL

XYCE=$BASELINE_WORKDIR/Xyce/BUILD/rancilio_icc101_SERIAL/src/Xyce
cd $BASELINE_WORKDIR/Xyce_Regression/TestScripts/
./run_xyce_regression --output=$BASELINEDIR --saveoutput $XYCE $*

# 
# Run the comparison testing
#

XYCE=$BRANCH_WORKDIR/Xyce/BUILD/rancilio_icc101_SERIAL/src/Xyce
BASELINEDIR=$BASELINE_WORKDIR/baseline_tests_SERIAL/
STATUSDIR=$BRANCH_WORKDIR/status_tests_SERIAL/
XYCE_REGRESSION=$BRANCH_WORKDIR/Xyce_Regression

rm -rf $STATUSDIR

cd $BRANCH_WORKDIR/Xyce_Regression/TestScripts
./run_xyce_regression --saveoutput --fulldiff=$BASELINEDIR --output=$STATUSDIR $XYCE --fulldiffregex=$XYCE_REGRESSION/TestScripts/fulldiffregex.txt --faillist=failing_tests  $*

echo "find $STATUSDIR -name '*.diff' -and -not -empty"
find $STATUSDIR -name '*.diff' -and -not -empty

#
# Fix all the errors and add entries to fulldiffregex.txt for the exceptions.
#





