Commit f551ae6a authored by Salko Jr, Robert's avatar Salko Jr, Robert
Browse files

Add test for custom-named input files

Description:
This modifies the nodal_p7_pow3d test so it uses a custom name for
the input file rather than generic 'deck.inp'.  This is a supported
feature of SubKit.  The test driver is modified to check for the custom
named test instead of the default one.

Gitlab Ticket # - 4347
parent d3c1b6d5
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -4,6 +4,8 @@
# Description:
# Makes a model of CASL problem 7 using 4 subchannels per assembly
#
# A custom name is used for the input file, ensuring that SubKit script mode can make a model with non
# default name
import sys
sys.path.insert(0, '../../')
import SubKit.build as cdb
@@ -267,7 +269,7 @@ def main():
    # Pass to the core builder
    builder.setCorePowerShape(radialPower=radPow, axialPower=axPow)

    model.generateModel()
    model.generateModel('nodal_p7.inp')


if __name__ == '__main__':
+5 −3
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ runScriptTest(){
   # 1. path to test name
   # 2. driver script name
   # 3. Option to rebaseline (true or false)
   # 4. [optional] name of input file to check for (defaults to deck.inp)
   echo ""
   echo "=========================================="
   echo "...Run script test: $1 $2"
@@ -28,11 +29,12 @@ runScriptTest(){
      echo "The deck building script has failed"
      exit 1
   fi
   FILENAME=${4:-deck}
   if [ "$3" = true ]; then
      echo "Rebaselining the test case based on user input!!!!"
      cp deck.inp deck.inp.gold
      cp ${FILENAME}.inp ${FILENAME}.inp.gold
   fi
   python $BASEDIR/deckCompare.py deck.inp deck.inp.gold
   python $BASEDIR/deckCompare.py ${FILENAME}.inp ${FILENAME}.inp.gold
   if [ "$?" != "0" ]; then
      echo "...TEST FAILED"
      exit 1
@@ -45,7 +47,7 @@ runScriptTest "msre/parFullCoreLoop" "msreFull.py" "$rebaseline"
runScriptTest "msre/single_block" "singleBlock.py" "$rebaseline"
runScriptTest "msre/single_block_loop" "make_deck.py" "$rebaseline"
runScriptTest "multiSection" "genModel.py" "$rebaseline"
runScriptTest "nodal_p7" "buildDeck.py" "$rebaseline"
runScriptTest "nodal_p7" "buildDeck.py" "$rebaseline" "nodal_p7"
runScriptTest "nodal_p7_pow3d" "buildDeck.py" "$rebaseline"
runScriptTest "msrTraining/simpleLoop/base" "genModel.py" "$rebaseline"
runScriptTest "msrTraining/simpleLoop/addPower" "genModel.py" "$rebaseline"