too quick to speak...

It only runs the first benchmark of many.

Secondly, perl must be given the path to blib to load the module because at the benchmark stage module is not installed.

I have noticed in the Makefile that when they want to run multiple tests they do:

PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES)

I did try the above with my benchmark files and works though I have to add Test::More directives into the benchmark file in order to keep it happy about not running any tests and also to be able to report the results of the benchmark

sub MY::postamble { my (undef,%h) = @_; require Data::Dumper; #print STDERR Data::Dumper->Dump([\%h], [qw(mm_args{postamble})]); return "BENCHMARK_FILES=$h{BENCHMARK_FILES}\n" . <<'POSTAMBLE'; bench :: $(BENCHMARK_FILES) # PERL_DL_NONLAZY=1 $(FULLPERLRUN) $(BENCHMARK_FILES) PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-M +Test::Harness" "-e" "undef *Test::Harness::Switches; test_harness($(T +EST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(BENCHMARK_FILES) POSTAMBLE }

I wonder if there is a way to do something similar for the multiple benchmark files.


In reply to Re^2: Benchmarks target in Makefile by bliako
in thread Benchmarks target in Makefile by bliako

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.