Package conary :: Package build :: Module destdirpolicy :: Class TestSuiteFiles
[hide private]
[frames] | no frames]

Class TestSuiteFiles

source code

  action.Action --+            
                  |            
action.RecipeAction --+        
                      |        
      policy.BasePolicy --+    
                          |    
              policy.Policy --+
                              |
                             TestSuiteFiles

NAME

r.TestSuiteFiles - Indicate extra files to copy into the test directory

SYNOPSIS

r.TestSuiteFiles([filterexp])

DESCRIPTION

The r.TestSuiteFiles() class is called from within a Conary recipe to indicate extra files which should be copied into the test suite directory. The filter expression is relative to the build directory, not the install directory as is the case with the rest of the destdir policies.

Files included in the filterexp will be copied into the test directory, with their path relative to the build dir retained. E.g. a file found at %(builddir)s/bin/foo will be copied to %(testdir)s/bin/foo.

In order for r.TestSuiteFiles() to be useful, you must indicate to Conary that you wish to create a test suite. To create a test suite, you should use the r.TestSuite() class as documented in conary.build.build.

EXAMPLES

r.TestSuiteFiles('MANIFEST')

The file MAINFEST is marked to be copied into the package's test suite directory.

Instance Methods [hide private]
 
do(self) source code
 
updateArgs(self, *args, **keywords)
call as TestSuiteFiles(<inclusions>).
source code
 
doFile(self, path) source code
 
replaceBuildPath(self, path) source code

Inherited from policy.Policy: __init__, compileFilters, doProcess, filterExpArgs, filterExpression, mtimeChanged, policyException, policyInclusion, walkDir

Inherited from policy.BasePolicy: dbg, error, info, postInit, postPolicy, warn

Inherited from policy.BasePolicy (private): _addClassName, _pathAllowed

Inherited from action.RecipeAction: doAction, doPrep, doSuggestAutoBuildReqs, init_error

Inherited from action.Action: addArgs

Inherited from action.Action (private): _applyDefaults

Class Variables [hide private]
  bucket = 1
  requires = (('TestSuiteLinks', 7))
  filetree = 2
where to look for files to which to apply the policy: policy.DESTDIR, the default, walks the files in the destdir, policy.BUILDDIR walks the files in the build directory, and policy.PACKAGE iterates over the packaged files rather than walking the destdir, which besides being possibly faster also applies to files that are not on the filesystem (like device nodes).
  buildTestSuite = None
  invariantexceptions = [('.*', 16384)]
subclasses may set to a list of exception filters that are always applied regardless of what other exceptions may be provided by the recipe; these exceptions being applied is an invariant condition of the doFile method.
  invariantinclusions = ['.*[tT][eE][sS][tT].*', 'Makefile.*', '...
if invariantinclusions is not empty, then only files matching a filter in it are considered to be passed to to the doFile method.
  keywords = {'build': None, 'builddirlinks': None}

Inherited from policy.Policy: invariantsubtrees, processUnmodified, recursive, rootdir

Inherited from policy.BasePolicy: allowUnusedFilters

Method Details [hide private]

do(self)

source code 
Overrides: policy.Policy.do

updateArgs(self, *args, **keywords)

source code 
call as TestSuiteFiles(<inclusions>).
Parameters:
  • build - If set to true, will create TestSuiteFiles even if a TestSuite command is not given. If set to false, will not create TestSuiteFiles even if a TestSuite command is given. Also turns on/off TestSuiteLinkx
Overrides: policy.BasePolicy.updateArgs

Class Variable Details [hide private]

invariantinclusions

if invariantinclusions is not empty, then only files matching a filter in it are considered to be passed to to the doFile method. Any exceptions, including invariants, are applied after invariantinclusions are applied; this means that all exceptions OVERRULE every type of inclusion.
Value:
['.*[tT][eE][sS][tT].*',
 'Makefile.*',
 '.*\\.exp',
 '.*/config.*',
 '.*/shconfig',
 '.*/acconfig.*',
 '.*/aclocal.*',
 '.*\\.la']