diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-09-10 14:09:07 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-09-10 14:09:07 +1000 |
commit | 9bc4d3ecba6395be2dff195fdc1ae74d07155a42 (patch) | |
tree | 354e6216080b6e21cdc2ff2e5368ee4a99aa535b /source4/scripting | |
parent | ba22de3d4fcba466d2829df47fb05c85eda2f98f (diff) | |
parent | ce288824bb4a095c5020449a79eb83fad81e8480 (diff) | |
download | samba-9bc4d3ecba6395be2dff195fdc1ae74d07155a42.tar.gz samba-9bc4d3ecba6395be2dff195fdc1ae74d07155a42.tar.bz2 samba-9bc4d3ecba6395be2dff195fdc1ae74d07155a42.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-abartlet
(This used to be commit ed26195d0eda6dd1ca14508cfd31a48dde79d44f)
Diffstat (limited to 'source4/scripting')
-rwxr-xr-x | source4/scripting/bin/subunitrun | 8 | ||||
-rw-r--r-- | source4/scripting/python/config.m4 | 6 |
2 files changed, 14 insertions, 0 deletions
diff --git a/source4/scripting/bin/subunitrun b/source4/scripting/bin/subunitrun index 6f1086ad37..ee2d1e11da 100755 --- a/source4/scripting/bin/subunitrun +++ b/source4/scripting/bin/subunitrun @@ -36,6 +36,8 @@ parser.add_option_group(credopts) sambaopts = options.SambaOptions(parser) parser.add_option_group(sambaopts) parser.add_option_group(options.VersionOptions(parser)) +parser.add_option("--coverage", metavar="CACHE", type=str, + help="Store coverage data in CACHE") args = parser.parse_args()[1] @@ -45,4 +47,10 @@ samba.tests.cmdline_credentials = credopts.get_credentials(samba.tests.cmdline_l param.cvar.default_config = samba.tests.cmdline_loadparm runner = SubunitTestRunner() +if opts.coverage is not None: + import coverage + coverage.use_cache(True, opts.coverage) + coverage.start() program = TestProgram(module=None, argv=[sys.argv[0]] + args, testRunner=runner) +if opts.coverage: + coverage.stop() diff --git a/source4/scripting/python/config.m4 b/source4/scripting/python/config.m4 index b599aaefb0..af13b6ae69 100644 --- a/source4/scripting/python/config.m4 +++ b/source4/scripting/python/config.m4 @@ -50,6 +50,12 @@ if test -z "$PYTHON_CONFIG"; then else TRY_LINK_PYTHON([`$PYTHON_CONFIG --ldflags`], [`$PYTHON_CONFIG --includes`]) TRY_LINK_PYTHON([`$PYTHON_CONFIG --ldflags`], [`$PYTHON_CONFIG --cflags`]) + if x$working_python = xno; then + # It seems the library path isn't included on some systems + base=`$PYTHON_CONFIG --prefix` + TRY_LINK_PYTHON([`echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`], [`$PYTHON_CONFIG --includes`]) + TRY_LINK_PYTHON([`echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`], [`$PYTHON_CONFIG --cflags`]) + fi fi if test x$PYTHON != x |