For Module::Build only.
Returns a Module::Build subclass that overrides find_test_files. If you want to have your own Module::Build subclass and still use Test::Manifest, you can get just the code string with get_module_build_code_string.
For Module::Build only.
Returns the overridden find_test_files as Perl code in a string suitable for the code key in Module::Build-subclass()>. You can add this to other bits you are overriding or extending.
run_t_manifest( TEST_VERBOSE, INST_LIB, INST_ARCHLIB, TEST_LEVEL ) For Makemaker only. You dont have to mess with this at the user level.
Run all of the files in t/test_manifest through Test::Harness:runtests in the order they appear in the file. This is inserted automatically
eval "use Test::Manifest";
get_t_files( [LEVEL] ) In scalar context it returns a single string that you can use directly in WriteMakefile(). In list context it returns a list of the files it found in t/test_manifest.
If a t/test_manifest file does not exist, get_t_files() returns nothing.
Each line in t/test_manifest can have three parts: the test name, the test level (a floating point number), and a comment. By default, the test level is 1.
test_name.t 2 #Run this only for level 2 testing
Without an argument, get_t_files() returns all the test files it finds. With an argument that is true (so you cant use 0 as a level) and is a number, it skips tests with a level greater than that argument. You can then define sets of tests and choose a set to run. For instance, you might create a set for end users, but also add on a set for deeper testing for developers.
Experimentally, you can include a command to grab test names from another file. The command starts with a ; to distinguish it from a true filename. The filename (currently) is relative to the current working directory, unlike the filenames, which are relative to t/. The filenames in the included are still relative to t/.
run_this1 ;skip skip_this ;unskip run_this2
To select sets of tests, specify the level in the environment variable TEST_LEVEL:
make test # run all tests no matter the level make test TEST_LEVEL=2 # run all tests level 2 and below
Eventually this will end up as an option to Build.PL:
./Build test --testlevel=2 # Not yet supported
make_test_manifest() Creates the test_manifest file in the t directory by reading the contents of the t/ directory.
TO DO: specify tests in argument lists.
TO DO: specify files to skip.
manifest_name() Returns the name of the test manifest file, relative to t/.
This source is in Github:
Matt Vanderpol suggested and supplied a patch for the ;include feature.
brian d foy, <firstname.lastname@example.org>
Copyright (c) 2002-2014 brian d foy. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
|perl v5.20.3||TEST::MANIFEST (3)||2014-08-26|