The test suite doesn't seem to have names for each suite such that you can use the option run_test and run just the one you want...
am I mistaken? if not, I will put it as feature request. if I am, then please give me an example as I have not seen a way to make it work no matter what I type. Is there an option to list the suites/tests? I guess this is not obvious with the boost test itself. Any help appreciated. |
Hi Marcello,
I did some experiments, and it seems that you can select a particular suite by writing, for instance, ./quantlib-test-suite --run_test='*/European*' which runs the suite defined in europeanoption.cpp as test_suite* suite = BOOST_TEST_SUITE("European option tests"); However, that's by accident, not by design. If you want to try and submit a patch for this, I'll be glad to add it to the repository. Later, Luigi On Mon, Nov 19, 2012 at 9:42 PM, marcelloptr <[hidden email]> wrote: > > The test suite doesn't seem to have names for each suite such that you can > use the option run_test and run just the one you want... > > am I mistaken? if not, I will put it as feature request. > > if I am, then please give me an example as I have not seen a way to make it > work no matter what I type. > > Is there an option to list the suites/tests? I guess this is not obvious > with the boost test itself. > > Any help appreciated. > -- > View this message in context: http://old.nabble.com/test-suite-listing-tp34696844p34696844.html > Sent from the quantlib-users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Monitor your physical, virtual and cloud infrastructure from a single > web console. Get in-depth insight into apps, servers, databases, vmware, > SAP, cloud infrastructure, etc. Download 30-day Free Trial. > Pricing starts from $795 for 25 servers or applications! > http://p.sf.net/sfu/zoho_dev2dev_nov > _______________________________________________ > QuantLib-users mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/quantlib-users ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
I'll keep that in mind to do, if I'll get some free time.
|
Hi Luigi, Marcello, I believe that this is an issue with the way in which boost processes the parameter that you provide to --run_test when that parameter includes spaces. I am using Boost version 1.50. As a test, I made the change shown below to the two test suite files i.e. simply replaced the spaces in the test suite names with underscores. I was then able to run my chosen test using the following:
QuantLib-test-suite-vc100-mt --log_level=all --build_info=yes --run_test="QuantLib_test_suite/Overnight-indexed_swap_tests/QuantLib::detail::quantlib_test_case(&OvernightIndexedSwapTest::testBootstrap)"
Maybe the easiest option is to make it a convention that there are no spaces in the test suite names. Regards, Francis. Index: QuantLib/test-suite/overnightindexedswap.cpp
=================================================================== --- QuantLib/test-suite/overnightindexedswap.cpp (revision 18356) +++ QuantLib/test-suite/overnightindexedswap.cpp (working copy) @@ -426,7 +426,7 @@ test_suite* OvernightIndexedSwapTest::suite() { test->add(QUANTLIB_TEST_CASE(startTimer)); On Thu, Nov 29, 2012 at 10:30 PM, marcelloptr <[hidden email]> wrote: I'll keep that in mind to do, if I'll get some free time. ------------------------------------------------------------------------------ Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Yes, removing spaces would be the easiest thing.
Luigi On Fri, Nov 30, 2012 at 8:11 AM, Francis Duffy <[hidden email]> wrote: > Hi Luigi, Marcello, > > I believe that this is an issue with the way in which boost processes the > parameter that you provide to --run_test when that parameter includes > spaces. I am using Boost version 1.50. As a test, I made the change shown > below to the two test suite files i.e. simply replaced the spaces in the > test suite names with underscores. I was then able to run my chosen test > using the following: > > QuantLib-test-suite-vc100-mt --log_level=all --build_info=yes > --run_test="QuantLib_test_suite/Overnight-indexed_swap_tests/QuantLib::detail::quantlib_test_case(&OvernightIndexedSwapTest::testBootstrap)" > > Maybe the easiest option is to make it a convention that there are no spaces > in the test suite names. > > Regards, > Francis. > > Index: QuantLib/test-suite/overnightindexedswap.cpp > =================================================================== > --- QuantLib/test-suite/overnightindexedswap.cpp (revision 18356) > +++ QuantLib/test-suite/overnightindexedswap.cpp (working copy) > @@ -426,7 +426,7 @@ > > test_suite* OvernightIndexedSwapTest::suite() { > - test_suite* suite = BOOST_TEST_SUITE("Overnight-indexed swap tests"); > + test_suite* suite = BOOST_TEST_SUITE("Overnight-indexed_swap_tests"); > > suite->add(QUANTLIB_TEST_CASE(&OvernightIndexedSwapTest::testFairRate)); > > suite->add(QUANTLIB_TEST_CASE(&OvernightIndexedSwapTest::testFairSpread)); > > suite->add(QUANTLIB_TEST_CASE(&OvernightIndexedSwapTest::testCachedValue)); > Index: QuantLib/test-suite/quantlibtestsuite.cpp > =================================================================== > --- QuantLib/test-suite/quantlibtestsuite.cpp (revision 18356) > +++ QuantLib/test-suite/quantlibtestsuite.cpp (working copy) > @@ -245,7 +245,7 @@ > BOOST_MESSAGE(rule); > BOOST_MESSAGE(header); > BOOST_MESSAGE(rule); > - test_suite* test = BOOST_TEST_SUITE("QuantLib test suite"); > + test_suite* test = BOOST_TEST_SUITE("QuantLib_test_suite"); > > test->add(QUANTLIB_TEST_CASE(startTimer)); > test->add(QUANTLIB_TEST_CASE(configure)); > > > On Thu, Nov 29, 2012 at 10:30 PM, marcelloptr <[hidden email]> > wrote: >> >> I'll keep that in mind to do, if I'll get some free time. >> >> >> >> -- >> View this message in context: >> http://quantlib.10058.n7.nabble.com/test-suite-listing-tp8803p13753.html >> Sent from the quantlib-users mailing list archive at Nabble.com. >> >> >> ------------------------------------------------------------------------------ >> Keep yourself connected to Go Parallel: >> VERIFY Test and improve your parallel project with help from experts >> and peers. http://goparallel.sourceforge.net >> _______________________________________________ >> QuantLib-users mailing list >> [hidden email] >> https://lists.sourceforge.net/lists/listinfo/quantlib-users > > ------------------------------------------------------------------------------ Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Free forum by Nabble | Edit this page |