SCons can now run most of the tests in the test_problems directory
Does not yet handle tests with multiple outputs or tests requiring additional command line arguments.
This commit is contained in:
parent
ff878fc826
commit
70c71b5448
2 changed files with 84 additions and 158 deletions
|
|
@ -3,6 +3,8 @@ from buildutils import *
|
|||
Import('env','buildTargets','installTargets')
|
||||
localenv = env.Clone()
|
||||
|
||||
os.environ['PYTHONPATH'] = pjoin(os.getcwd(), '..','Cantera','python')
|
||||
|
||||
class Test(object):
|
||||
def __init__(self, subdir, programName,
|
||||
blessedName, arguments=(),
|
||||
|
|
@ -87,7 +89,88 @@ tests = [Test(pjoin('cathermo', 'DH_graph_1'),
|
|||
'HMW_graph_GvT',
|
||||
'output_blessed.txt',
|
||||
extensions=['^HMW_graph_GvT.cpp', '^sortAlgorithms.cpp'],
|
||||
arguments='HMW_NaCl_sp1977_alt.xml')
|
||||
arguments='HMW_NaCl_sp1977_alt.xml'),
|
||||
Test(pjoin('cathermo', 'HMW_graph_HvT'),
|
||||
'HMW_graph_HvT',
|
||||
'output_blessed.txt',
|
||||
extensions=['^HMW_graph_HvT.cpp', '^sortAlgorithms.cpp'],
|
||||
arguments='HMW_NaCl_sp1977_alt.xml'),
|
||||
Test(pjoin('cathermo', 'HMW_graph_VvT'),
|
||||
'HMW_graph_VvT',
|
||||
'output_blessed.txt',
|
||||
extensions=['^HMW_graph_VvT.cpp', '^sortAlgorithms.cpp'],
|
||||
arguments='HMW_NaCl_sp1977_alt.xml'),
|
||||
Test(pjoin('cathermo', 'HMW_test_1'),
|
||||
'HMW_test_1',
|
||||
'output_noD_blessed.txt'),
|
||||
Test(pjoin('cathermo', 'HMW_test_3'),
|
||||
'HMW_test_3',
|
||||
'output_noD_blessed.txt'),
|
||||
Test(pjoin('cathermo', 'ims'),
|
||||
'IMSTester',
|
||||
'output_blessed.txt'),
|
||||
Test(pjoin('cathermo', 'issp'),
|
||||
'ISSPTester',
|
||||
'output_blessed.txt'),
|
||||
Test(pjoin('cathermo', 'stoichSubSSTP'),
|
||||
'stoichSubSSTP',
|
||||
'output_blessed.txt'),
|
||||
Test(pjoin('cathermo', 'testIAPWS'),
|
||||
'testIAPWSphi',
|
||||
'output_blessed.txt'),
|
||||
Test(pjoin('cathermo', 'testIAPWSPres'),
|
||||
'testIAPWSPres',
|
||||
'output_blessed.txt'),
|
||||
Test(pjoin('cathermo', 'testIAPWSTripP'),
|
||||
'testIAPWSTripP',
|
||||
'output_blessed.txt'),
|
||||
Test(pjoin('cathermo', 'testWaterPDSS'),
|
||||
'testWaterPDSS',
|
||||
'output_blessed.txt'),
|
||||
Test(pjoin('cathermo', 'testWaterTP'),
|
||||
'testWaterSSTP',
|
||||
'output_blessed.txt'),
|
||||
Test(pjoin('cathermo', 'VPissp'),
|
||||
'ISSPTester2',
|
||||
'output_blessed.txt'),
|
||||
Test(pjoin('cathermo', 'wtWater'),
|
||||
'wtWater',
|
||||
'output_blessed.txt'),
|
||||
Test('ChemEquil_gri_matrix', 'gri_matrix', 'output_blessed.txt'),
|
||||
Test('ChemEquil_gri_pairs', 'gri_pairs', 'output_blessed.txt'),
|
||||
Test('ChemEquil_ionizedGas', 'ionizedGasEquil',
|
||||
'output_blessed.txt',
|
||||
artifacts=['table.csv']), # needs .csv comparison
|
||||
Test('ChemEquil_red1', 'basopt_red1', 'output_blessed.txt'),
|
||||
# Skipping ck2cti_test because of automatically generated file
|
||||
Test('CpJump', 'CpJump', 'output_blessed.txt'),
|
||||
# Skipping cxx_ex because of complicated behavior
|
||||
Test('diamondSurf', 'runDiamond', 'runDiamond_blessed.out'),
|
||||
Test('fracCoeff', 'fracCoeff', 'frac_blessed.out'),
|
||||
# skipping min_python
|
||||
Test('mixGasTransport', 'mixGasTransport', 'output_blessed.txt'),
|
||||
Test('multiGasTransport', 'multiGasTransport', 'output_blessed.txt'),
|
||||
Test('NASA9poly_test', 'NASA9poly_test', 'output_blessed.txt'),
|
||||
# skipping nasa9_reader because of automatically generated file
|
||||
Test('negATest', 'negATest', 'negATest_blessed.out'),
|
||||
Test('printUtilUnitTest', 'pUtest', 'output_blessed.txt'),
|
||||
Test('pureFluidTest', 'testPureWater', 'output_blessed.txt'),
|
||||
# skipping python
|
||||
Test('rankine_democxx', 'rankine', 'output_blessed.txt',
|
||||
artifacts=['liquidvapor.xml']),
|
||||
Test('silane_equil', 'silane_equi', 'output_blessed.txt'),
|
||||
# spectroscopy is incomplete
|
||||
Test('surfkin', 'surfdemo', 'output_blessed.txt'),
|
||||
Test('surfSolverTest', 'surfaceSolver',
|
||||
'surfaceSolver_blessed.out',
|
||||
arguments='haca2.xml',
|
||||
artifacts=['results.txt', 'diamond.xml'],
|
||||
extensions=['^surfaceSolver.cpp']), # needs .csv, extra tests
|
||||
# # Disabled because of need for command line arguments
|
||||
# Test(pjoin('VCSnonideal', 'NaCl_equil'),
|
||||
# 'nacl_equil',
|
||||
# 'good_out.txt'), # needs .csv diff
|
||||
Test('VPsilane_test', 'VPsilane_test', 'output_blessed.txt')
|
||||
]
|
||||
|
||||
env.Alias('test', [test.run(localenv) for test in tests])
|
||||
|
|
|
|||
|
|
@ -1,157 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<ctml>
|
||||
<validate reactions="yes" species="yes"/>
|
||||
|
||||
<!-- phase gas -->
|
||||
<phase dim="3" id="gas">
|
||||
<elementArray datasrc="elements.xml">O H </elementArray>
|
||||
<speciesArray datasrc="#species_data">H2 H O O2 OH H2O </speciesArray>
|
||||
<reactionArray datasrc="#reaction_data"/>
|
||||
<state>
|
||||
<temperature units="K">300.0</temperature>
|
||||
<pressure units="Pa">101325.0</pressure>
|
||||
</state>
|
||||
<thermo model="IdealGas"/>
|
||||
<kinetics model="GasKinetics"/>
|
||||
<transport model="None"/>
|
||||
</phase>
|
||||
|
||||
<!-- species definitions -->
|
||||
<speciesData id="species_data">
|
||||
|
||||
<!-- species H2 -->
|
||||
<species name="H2">
|
||||
<atomArray>H:2 </atomArray>
|
||||
<thermo>
|
||||
<NASA Tmax="1000.0" Tmin="200.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
2.344331120E+00, 7.980520750E-03, -1.947815100E-05, 2.015720940E-08,
|
||||
-7.376117610E-12, -9.179351730E+02, 6.830102380E-01</floatArray>
|
||||
</NASA>
|
||||
<NASA Tmax="3500.0" Tmin="1000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
3.337279200E+00, -4.940247310E-05, 4.994567780E-07, -1.795663940E-10,
|
||||
2.002553760E-14, -9.501589220E+02, -3.205023310E+00</floatArray>
|
||||
</NASA>
|
||||
</thermo>
|
||||
</species>
|
||||
|
||||
<!-- species H -->
|
||||
<species name="H">
|
||||
<atomArray>H:1 </atomArray>
|
||||
<thermo>
|
||||
<NASA Tmax="1000.0" Tmin="200.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
2.500000000E+00, 7.053328190E-13, -1.995919640E-15, 2.300816320E-18,
|
||||
-9.277323320E-22, 2.547365990E+04, -4.466828530E-01</floatArray>
|
||||
</NASA>
|
||||
<NASA Tmax="3500.0" Tmin="1000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
2.500000010E+00, -2.308429730E-11, 1.615619480E-14, -4.735152350E-18,
|
||||
4.981973570E-22, 2.547365990E+04, -4.466829140E-01</floatArray>
|
||||
</NASA>
|
||||
</thermo>
|
||||
</species>
|
||||
|
||||
<!-- species O -->
|
||||
<species name="O">
|
||||
<atomArray>O:1 </atomArray>
|
||||
<thermo>
|
||||
<NASA Tmax="1000.0" Tmin="200.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
3.168267100E+00, -3.279318840E-03, 6.643063960E-06, -6.128066240E-09,
|
||||
2.112659710E-12, 2.912225920E+04, 2.051933460E+00</floatArray>
|
||||
</NASA>
|
||||
<NASA Tmax="3500.0" Tmin="1000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
2.569420780E+00, -8.597411370E-05, 4.194845890E-08, -1.001777990E-11,
|
||||
1.228336910E-15, 2.921757910E+04, 4.784338640E+00</floatArray>
|
||||
</NASA>
|
||||
</thermo>
|
||||
</species>
|
||||
|
||||
<!-- species O2 -->
|
||||
<species name="O2">
|
||||
<atomArray>O:2 </atomArray>
|
||||
<thermo>
|
||||
<NASA Tmax="1000.0" Tmin="200.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
3.782456360E+00, -2.996734160E-03, 9.847302010E-06, -9.681295090E-09,
|
||||
3.243728370E-12, -1.063943560E+03, 3.657675730E+00</floatArray>
|
||||
</NASA>
|
||||
<NASA Tmax="3500.0" Tmin="1000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
3.282537840E+00, 1.483087540E-03, -7.579666690E-07, 2.094705550E-10,
|
||||
-2.167177940E-14, -1.088457720E+03, 5.453231290E+00</floatArray>
|
||||
</NASA>
|
||||
</thermo>
|
||||
</species>
|
||||
|
||||
<!-- species OH -->
|
||||
<species name="OH">
|
||||
<atomArray>H:1 O:1 </atomArray>
|
||||
<thermo>
|
||||
<NASA Tmax="1000.0" Tmin="200.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
3.992015430E+00, -2.401317520E-03, 4.617938410E-06, -3.881133330E-09,
|
||||
1.364114700E-12, 3.615080560E+03, -1.039254580E-01</floatArray>
|
||||
</NASA>
|
||||
<NASA Tmax="3500.0" Tmin="1000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
3.092887670E+00, 5.484297160E-04, 1.265052280E-07, -8.794615560E-11,
|
||||
1.174123760E-14, 3.858657000E+03, 4.476696100E+00</floatArray>
|
||||
</NASA>
|
||||
</thermo>
|
||||
</species>
|
||||
|
||||
<!-- species H2O -->
|
||||
<species name="H2O">
|
||||
<atomArray>H:2 O:1 </atomArray>
|
||||
<thermo>
|
||||
<NASA Tmax="1000.0" Tmin="200.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
4.198640560E+00, -2.036434100E-03, 6.520402110E-06, -5.487970620E-09,
|
||||
1.771978170E-12, -3.029372670E+04, -8.490322080E-01</floatArray>
|
||||
</NASA>
|
||||
<NASA Tmax="3500.0" Tmin="1000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
3.033992490E+00, 2.176918040E-03, -1.640725180E-07, -9.704198700E-11,
|
||||
1.682009920E-14, -3.000429710E+04, 4.966770100E+00</floatArray>
|
||||
</NASA>
|
||||
</thermo>
|
||||
</species>
|
||||
</speciesData>
|
||||
<reactionData id="reaction_data">
|
||||
|
||||
<!-- reaction 0001 -->
|
||||
<reaction reversible="no" id="0001">
|
||||
<equation>H2O =] 1.4 H + 0.6 OH + 0.2 O2</equation>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A>1.000000E+13</A>
|
||||
<b>0.0</b>
|
||||
<E units="cal/mol">0.000000</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
<reactants>H2O:1.0</reactants>
|
||||
<products>H:1.3999999999999999 O2:0.20000000000000001 OH:0.59999999999999998</products>
|
||||
</reaction>
|
||||
|
||||
<!-- reaction 0002 -->
|
||||
<reaction reversible="no" id="0002">
|
||||
<equation>0.7 H2 + 0.6 OH + 0.2 O2 =] H2O</equation>
|
||||
<order species="H2">0.80000000000000004</order>
|
||||
<order species="O2">1.0</order>
|
||||
<order species="OH">2.0</order>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A>3.981072E+04</A>
|
||||
<b>0.0</b>
|
||||
<E units="cal/mol">0.000000</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
<reactants>H2:0.69999999999999996 O2:0.20000000000000001 OH:0.59999999999999998</reactants>
|
||||
<products>H2O:1.0</products>
|
||||
</reaction>
|
||||
</reactionData>
|
||||
</ctml>
|
||||
Loading…
Add table
Reference in a new issue