diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2012-03-05 03:27:40 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2012-03-05 03:27:40 +0100 |
commit | d6924f803904d25a7f9cac2ec69f421d7a5bdeab (patch) | |
tree | 777b9ce051936e3351b0de83f0b1bc149ffbd393 /selftest/selftest.py | |
parent | 1741e6486dbae821aaac8bc4bd52938e4034f870 (diff) | |
download | samba-d6924f803904d25a7f9cac2ec69f421d7a5bdeab.tar.gz samba-d6924f803904d25a7f9cac2ec69f421d7a5bdeab.tar.bz2 samba-d6924f803904d25a7f9cac2ec69f421d7a5bdeab.zip |
selftest.run: Factor out expand_command_list.
Diffstat (limited to 'selftest/selftest.py')
-rwxr-xr-x | selftest/selftest.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/selftest/selftest.py b/selftest/selftest.py index cbc24f13ce..5c9bd7d13c 100755 --- a/selftest/selftest.py +++ b/selftest/selftest.py @@ -39,7 +39,10 @@ from selftest import ( subunithelper, testlist, ) -from selftest.run import expand_environment_strings +from selftest.run import ( + expand_environment_strings, + expand_command_list, + ) from selftest.target import ( EnvironmentManager, NoneTarget, @@ -577,12 +580,11 @@ $envvarstr env_manager.teardown_env(testenv_name) elif opts.list: for (name, envname, cmd, supports_loadfile, supports_idlist, subtests) in todo: - if not "$LISTOPT" in cmd: + cmd = expand_command_list(cmd) + if cmd is None: warnings.warn("Unable to list tests in %s" % name) continue - cmd = cmd.replace("$LISTOPT", "--list") - exitcode = subprocess.call(cmd, shell=True) if exitcode != 0: |