From beba7bd5c995e2e713a22f93b5dc7cbbe8f762a8 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Wed, 7 Nov 2001 15:23:24 +0000 Subject: [PATCH] Updated makefile.am such that "make check" will run all test programs. Fixed a number of erronuous return values that made the script fail. What's left is let Marc clean up the mess he made with t-eoReal and t-eoRealAllESAllAgain --- eo/test/Makefile.am | 8 ++++++- eo/test/run_tests | 38 +--------------------------------- eo/test/t-MGE-control.cpp | 6 +++--- eo/test/t-MGE.cpp | 6 +++--- eo/test/t-MGE1bit.cpp | 6 +++--- eo/test/t-eoCheckpointing.cpp | 1 - eo/test/t-eoExternalEO.cpp | 1 - eo/test/t-eoGenOp.cpp | 1 - eo/test/t-eoReplacement.cpp | 1 - eo/test/t-eoSelect.cpp | 7 +++---- eo/test/t-eoStateAndParser.cpp | 1 - eo/test/t-eoSymreg.cpp | 1 - eo/test/t-eobin.cpp | 1 - eo/test/t-eofitness.cpp | 1 - 14 files changed, 20 insertions(+), 59 deletions(-) diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index db51f6f08..8cc72c5e9 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -16,7 +16,13 @@ CXXFLAGS = -g -Wall check_PROGRAMS = t-eoParetoFitness t-eoPareto t-eofitness t-eoRandom t-eobin t-eoVirus\ t-MGE t-MGE1bit t-MGE-control t-eoStateAndParser t-eoCheckpointing t-eoSSGA \ t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoReal t-eoVector t-eoESAll -TESTS=run_tests t-eoVector t-eoRandom t-eoSSGA t-eoPareto t-eoParetoFitness + + +TESTS=$(check_PROGRAMS) run_tests + +#TESTS=run_tests t-eoVector t-eoRandom t-eoSSGA t-eoPareto t-eoParetoFitness t-eoReal t-eo \ +# t-eoReplacement t-eoExternalEO t-eoGenOp t-eoSelect t-eoStateAndParser t-eoSymreg \ +# t-eobin t-eofitness # removing temporarily t-eoESFull # noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoESFull t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoReal diff --git a/eo/test/run_tests b/eo/test/run_tests index 7d269d1f3..ebaec0af7 100755 --- a/eo/test/run_tests +++ b/eo/test/run_tests @@ -1,43 +1,7 @@ #!/bin/sh -echo "Starting t-eo" -./t-eo > eo.log - -echo "Starting t-eoReplacement" -./t-eoReplacement > replacement.log - -echo "Starting t-eoCheckpointing" -./t-eoCheckpointing > checkpointing.log echo "Testing -h" -./t-eoCheckpointing -h > ch2.log - -echo "Testing t-eoExternalEO" -./t-eoExternalEO > externalEO.log - -echo "Testing t-eoGenOp" -./t-eoGenOp > genOp.log - -echo "Testing t-eoSelect" -./t-eoSelect > select.log - -echo "Testing t-eoStateAndParser" -# TODO, many different parameter settings and checks -./t-eoStateAndParser > stateAndParser.log - -echo "Testing t-eoSymreg" -./t-eoSymreg > symreg.log - -echo "Testing t-eobin" -./t-eobin > bin.log - -echo "Testing t-eofitness" -./t-eofitness > fitness.log - -echo "Testing t-eoGA" -./t-eoGA > t-eoGA.log - -echo "Testing t-eoGenOp" -./t-eoGenOp > t-eoGenOp.log +./t-eoCheckpointing -h echo "Finished" diff --git a/eo/test/t-MGE-control.cpp b/eo/test/t-MGE-control.cpp index 4f74adb90..f34d0699d 100644 --- a/eo/test/t-MGE-control.cpp +++ b/eo/test/t-MGE-control.cpp @@ -25,7 +25,7 @@ typedef eoVirus Chrom; int main() { - const unsigned POP_SIZE = 1000, CHROM_SIZE = 128; + const unsigned POP_SIZE = 10, CHROM_SIZE = 12; unsigned i; eoBooleanGenerator gen; @@ -63,8 +63,8 @@ int main() eoCommaReplacement replace; // Terminators - eoGenContinue continuator1(500); - eoFitContinue continuator2(128); + eoGenContinue continuator1(10); + eoFitContinue continuator2(CHROM_SIZE); eoCombinedContinue continuator(continuator1, continuator2); eoCheckPoint checkpoint(continuator); eoStdoutMonitor monitor; diff --git a/eo/test/t-MGE.cpp b/eo/test/t-MGE.cpp index 0af943564..387220ac7 100644 --- a/eo/test/t-MGE.cpp +++ b/eo/test/t-MGE.cpp @@ -25,7 +25,7 @@ typedef eoVirus Chrom; int main() { - const unsigned POP_SIZE = 1000, CHROM_SIZE = 128; + const unsigned POP_SIZE = 10, CHROM_SIZE = 12; unsigned i; eoBooleanGenerator gen; @@ -67,8 +67,8 @@ int main() eoCommaReplacement replace; // Terminators - eoGenContinue continuator1(500); - eoFitContinue continuator2(128); + eoGenContinue continuator1(10); + eoFitContinue continuator2(CHROM_SIZE); eoCombinedContinue continuator(continuator1, continuator2); eoCheckPoint checkpoint(continuator); eoStdoutMonitor monitor; diff --git a/eo/test/t-MGE1bit.cpp b/eo/test/t-MGE1bit.cpp index 8376831ac..356f7fd20 100644 --- a/eo/test/t-MGE1bit.cpp +++ b/eo/test/t-MGE1bit.cpp @@ -25,7 +25,7 @@ typedef eoVirus Chrom; int main() { - const unsigned POP_SIZE = 1000, CHROM_SIZE = 128; + const unsigned POP_SIZE = 10, CHROM_SIZE = 12; unsigned i; eoBooleanGenerator gen; @@ -67,8 +67,8 @@ int main() eoCommaReplacement replace; // Terminators - eoGenContinue continuator1(500); - eoFitContinue continuator2(128); + eoGenContinue continuator1(10); + eoFitContinue continuator2(CHROM_SIZE); eoCombinedContinue continuator(continuator1, continuator2); eoCheckPoint checkpoint(continuator); eoStdoutMonitor monitor; diff --git a/eo/test/t-eoCheckpointing.cpp b/eo/test/t-eoCheckpointing.cpp index 6d12fcf26..32491b619 100644 --- a/eo/test/t-eoCheckpointing.cpp +++ b/eo/test/t-eoCheckpointing.cpp @@ -180,5 +180,4 @@ int main(int argc, char **argv) cout << "Exception: " << e.what() << endl; } - return 1; } diff --git a/eo/test/t-eoExternalEO.cpp b/eo/test/t-eoExternalEO.cpp index f9bb69b42..889b85744 100644 --- a/eo/test/t-eoExternalEO.cpp +++ b/eo/test/t-eoExternalEO.cpp @@ -129,5 +129,4 @@ int main() cross2(eo1,eo2); - return 1; }; diff --git a/eo/test/t-eoGenOp.cpp b/eo/test/t-eoGenOp.cpp index 6591ada96..d44251c01 100644 --- a/eo/test/t-eoGenOp.cpp +++ b/eo/test/t-eoGenOp.cpp @@ -385,7 +385,6 @@ int main(int argc, char **argv) cout << "Exception: " << e.what() << endl; } - return 1; } /* diff --git a/eo/test/t-eoReplacement.cpp b/eo/test/t-eoReplacement.cpp index fef8b2474..34d635554 100644 --- a/eo/test/t-eoReplacement.cpp +++ b/eo/test/t-eoReplacement.cpp @@ -220,5 +220,4 @@ int main(int argc, char **argv) cout << "Exception: " << e.what() << endl; } - return 1; } diff --git a/eo/test/t-eoSelect.cpp b/eo/test/t-eoSelect.cpp index b5409e58a..672b16ec6 100644 --- a/eo/test/t-eoSelect.cpp +++ b/eo/test/t-eoSelect.cpp @@ -125,7 +125,7 @@ eoValueParam tournamentSizeParam = parser.createParam fitScaleSelect(rankingPressure); @@ -186,7 +186,6 @@ int main(int argc, char **argv) catch(exception& e) { cout << "Exception: " << e.what() << endl; + return 1; } - - return 1; } diff --git a/eo/test/t-eoStateAndParser.cpp b/eo/test/t-eoStateAndParser.cpp index 1f2ac1c2d..62d16891f 100644 --- a/eo/test/t-eoStateAndParser.cpp +++ b/eo/test/t-eoStateAndParser.cpp @@ -136,5 +136,4 @@ int main(int argc, char **argv) cout << "Exception: " << e.what() << endl; } - return 1; } diff --git a/eo/test/t-eoSymreg.cpp b/eo/test/t-eoSymreg.cpp index 56d5077f9..9ff3f3ec7 100644 --- a/eo/test/t-eoSymreg.cpp +++ b/eo/test/t-eoSymreg.cpp @@ -277,7 +277,6 @@ int main() print_best(pop); - return 1; } diff --git a/eo/test/t-eobin.cpp b/eo/test/t-eobin.cpp index 75c7d3258..c2e9b058d 100644 --- a/eo/test/t-eobin.cpp +++ b/eo/test/t-eobin.cpp @@ -212,5 +212,4 @@ int main() cout << "Exception: " << e.what() << '\n'; } - return 1; } diff --git a/eo/test/t-eofitness.cpp b/eo/test/t-eofitness.cpp index 041a69077..33068781e 100644 --- a/eo/test/t-eofitness.cpp +++ b/eo/test/t-eofitness.cpp @@ -84,7 +84,6 @@ int main() test_fitness(b1,a1); - return 1; } //-----------------------------------------------------------------------------