From 483bcab744531362016554ded85872546643385e Mon Sep 17 00:00:00 2001 From: Nicholas Malaya Date: Tue, 7 Feb 2012 17:29:32 +0000 Subject: [PATCH] [cantera]: adding silane_equil test --- configure.ac | 2 ++ test_problems/Makefile.am | 6 ++++-- test_problems/rankine_democxx/Makefile.am | 23 +++++++++++++++++++++++ test_problems/rankine_democxx/rankine.cpp | 4 ++-- test_problems/rankine_democxx/runtest | 3 +++ test_problems/silane_equil/Makefile.am | 23 +++++++++++++++++++++++ test_problems/silane_equil/runtest | 2 ++ 7 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 test_problems/rankine_democxx/Makefile.am create mode 100644 test_problems/silane_equil/Makefile.am diff --git a/configure.ac b/configure.ac index 6c57c7541..86a196d57 100644 --- a/configure.ac +++ b/configure.ac @@ -105,6 +105,7 @@ AC_OUTPUT(Makefile \ test_problems/NASA9poly_test/Makefile \ test_problems/printUtilUnitTest/Makefile \ test_problems/pureFluidTest/Makefile \ + test_problems/silane_equil/Makefile \ test_problems/cathermo/Makefile \ test_problems/cathermo/DH_graph_1/Makefile \ test_problems/cathermo/DH_graph_acommon/Makefile \ @@ -158,6 +159,7 @@ AC_OUTPUT(Makefile \ # skipped tests # test_problems/ck2cti/Makefile # test_problems/nasa9_reader/Makefile +# test_problems/rankine_democxx/Makefile \ # FINAL SUMMARY diff --git a/test_problems/Makefile.am b/test_problems/Makefile.am index 11e3f1f05..408d9ad5d 100644 --- a/test_problems/Makefile.am +++ b/test_problems/Makefile.am @@ -1,16 +1,18 @@ -#SUBDIRS = surfkin silane_equil VPsilance_test \ +#SUBDIRS = surfkin VPsilance_test \ diamondSurf_dupl surfSolverTest SUBDIRS = cathermo mixGasTransport ChemEquil_gri_matrix ChemEquil_gri_pairs SUBDIRS += ChemEquil_ionizedGas ChemEquil_red1 CpJump cxx_ex diamondSurf SUBDIRS += diamondSurf_dupl fracCoeff multiGasTransport NASA9poly_test -SUBDIRS += negATest printUtilUnitTest pureFluidTest +SUBDIRS += negATest printUtilUnitTest pureFluidTest silane_equil + # skipped: # ck2cti_test # nasa9_reader (uses ck2cti) # python +# rankine_democxx EXTRA_DIST = diff --git a/test_problems/rankine_democxx/Makefile.am b/test_problems/rankine_democxx/Makefile.am new file mode 100644 index 000000000..2c6362af4 --- /dev/null +++ b/test_problems/rankine_democxx/Makefile.am @@ -0,0 +1,23 @@ +cc_sources = rankine.cpp + +INC = -I. -I$(top_builddir)/build/include/ +AM_CPPFLAGS = $(INC) +AM_CXXFLAGS = $(AM_CPPFLAGS) + +LINK = -luser -loneD -lzeroD -lequil -lkinetics -ltransport -lthermo +LINK += -lctnumerics -lctmath -ltpx -lctspectra -lconverters -lctbase -lcvode +LINK += -lctlapack -lctblas -lctf2c -lctcxx -lm -lctf2c -lstdc++ +AM_LDFLAGS = -L$(top_builddir)/build/lib/ +LIBS = $(LINK) + +bin_PROGRAMS = rankine +library_includedir = $(INC) + +#----------------------- +# Cantera DH graph test +#----------------------- + +rankine_SOURCES = $(cc_sources) + +TESTS_ENVIRONMENT = +TESTS = runtest diff --git a/test_problems/rankine_democxx/rankine.cpp b/test_problems/rankine_democxx/rankine.cpp index be637aaa6..ea4ed1b5f 100644 --- a/test_problems/rankine_democxx/rankine.cpp +++ b/test_problems/rankine_democxx/rankine.cpp @@ -3,8 +3,8 @@ #include #include -#include -#include // defines class Water +#include +#include // defines class Water using namespace Cantera; using namespace std; diff --git a/test_problems/rankine_democxx/runtest b/test_problems/rankine_democxx/runtest index ecebf0c49..f25678108 100755 --- a/test_problems/rankine_democxx/runtest +++ b/test_problems/rankine_democxx/runtest @@ -18,6 +18,7 @@ if test $retnStat != "0" then temp_success="0" echo "$testName returned with bad status, $retnStat, check output" + exit 1 fi diff -w output.txt output_blessed.txt > diff_test.out @@ -25,9 +26,11 @@ retnStat=$? if test $retnStat = "0" then echo "successful diff comparison on $testName test" + return 0 else echo "unsuccessful diff comparison on $testName test" echo "FAILED" > csvCode.txt temp_success="0" + return 1 fi diff --git a/test_problems/silane_equil/Makefile.am b/test_problems/silane_equil/Makefile.am new file mode 100644 index 000000000..4b8e65eef --- /dev/null +++ b/test_problems/silane_equil/Makefile.am @@ -0,0 +1,23 @@ +cc_sources = silane_equil.cpp + +INC = -I. -I$(top_builddir)/build/include/ +AM_CPPFLAGS = $(INC) +AM_CXXFLAGS = $(AM_CPPFLAGS) + +LINK = -luser -loneD -lzeroD -lequil -lkinetics -ltransport -lthermo +LINK += -lctnumerics -lctmath -ltpx -lctspectra -lconverters -lctbase -lcvode +LINK += -lctlapack -lctblas -lctf2c -lctcxx -lm -lctf2c -lstdc++ +AM_LDFLAGS = -L$(top_builddir)/build/lib/ +LIBS = $(LINK) + +bin_PROGRAMS = silane_equil +library_includedir = $(INC) + +#----------------------- +# Cantera DH graph test +#----------------------- + +silane_equil_SOURCES = $(cc_sources) + +TESTS_ENVIRONMENT = +TESTS = runtest diff --git a/test_problems/silane_equil/runtest b/test_problems/silane_equil/runtest index adb5f75ff..b6fcd134f 100755 --- a/test_problems/silane_equil/runtest +++ b/test_problems/silane_equil/runtest @@ -24,9 +24,11 @@ retnStat=$? if [ $retnStat = "0" ] then echo "successful diff comparison on silane_equil test" + return 0 else echo "unsuccessful diff comparison on silane_equil test" echo "FAILED" > csvCode.txt temp_success="0" + return 1 fi