diff options
author | Petr Viktorin <pviktori@redhat.com> | 2013-05-24 19:55:21 +0200 |
---|---|---|
committer | Petr Viktorin <pviktori@redhat.com> | 2013-07-15 15:49:05 +0200 |
commit | c577420e40a353f3038263bf8ef763f7c01f6f22 (patch) | |
tree | 219dc0dadf42d001e65c0d5beacf04a6bcfdcb7e /ipatests/beakerlib_plugin.py | |
parent | 226f9d681df92ea2757c3f97386859983474f727 (diff) | |
download | freeipa-c577420e40a353f3038263bf8ef763f7c01f6f22.tar.gz freeipa-c577420e40a353f3038263bf8ef763f7c01f6f22.tar.xz freeipa-c577420e40a353f3038263bf8ef763f7c01f6f22.zip |
Add a framework for integration test configuration
Integration tests are configured via environment variables.
Add a framework for parsing these variables and storing them
in easy-to-use objects.
Add an `ipa-test-config` executable that loads the configuration
and prints out variables needed in shell scripts.
Part of the work for https://fedorahosted.org/freeipa/ticket/3621
Diffstat (limited to 'ipatests/beakerlib_plugin.py')
-rw-r--r-- | ipatests/beakerlib_plugin.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/ipatests/beakerlib_plugin.py b/ipatests/beakerlib_plugin.py index 2ad2674eb..7478a82e5 100644 --- a/ipatests/beakerlib_plugin.py +++ b/ipatests/beakerlib_plugin.py @@ -32,14 +32,6 @@ from ipapython import ipautil from ipapython.ipa_log_manager import log_mgr -def shell_quote(string): - """Quote a string for the shell - - Adapted from Python3's shlex.quote - """ - return "'" + str(string).replace("'", "'\"'\"'") + "'" - - class BeakerLibLogHandler(logging.Handler): def __init__(self, beakerlib_command): super(BeakerLibLogHandler, self).__init__() @@ -103,7 +95,7 @@ class BeakerLibPlugin(Plugin): def run_beakerlib_command(self, cmd): """Given a command as a Popen-style list, run it in the Bash process""" for word in cmd: - self.bash.stdin.write(shell_quote(word)) + self.bash.stdin.write(ipautil.shell_quote(word)) self.bash.stdin.write(' ') self.bash.stdin.write('\n') self.bash.stdin.flush() |