# compile the code
eg_factory.addStep(shell.Compile(command=["make"]))
+perldir = 'build/Open-ILS/src/perlmods'
class PerlModuleTestMFHDMadness(shell.PerlModuleTest):
'Override PerlModuleTest with nonstandard library location for testlib.pm'
command = ['prove', '--lib', 'lib', '-I', 'lib/OpenILS/Utils/MFHD/test', '-r', 't']
total = 0
def has_perl_unit_tests(step):
- if (os.path.exists(os.path.join('build/Open-ILS/src/perlmods', 'lib/OpenILS/Utils/MFHD/test'))):
- return False
- return True
+ 'If there is a /lib/ sudir in the Perl dir, there are tests'
+ if (os.path.exists(os.path.join(perldir, 'lib'))):
+ return True
+ return False
# run the Perl unit tests
eg_factory.addStep(PerlModuleTestMFHDMadness(
doStepIf=has_perl_unit_tests,
- workdir="build/Open-ILS/src/perlmods")
+ workdir=perldir)
)
# report on the Python code