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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |