summaryrefslogtreecommitdiff
path: root/hacking/test-module
diff options
context:
space:
mode:
authorgimoh <gimoh@bitmessage.ch>2015-05-06 11:57:25 +0100
committergimoh <gimoh@bitmessage.ch>2015-05-06 11:57:25 +0100
commit5489d172de95a94bb92e63090202e519b2204c39 (patch)
tree085113a15c83bb8ce0fa4bd1754d34505c333685 /hacking/test-module
parent9b95c22dc0b82bf7888e8fe42702b156f6f01674 (diff)
downloadansible-5489d172de95a94bb92e63090202e519b2204c39.tar.gz
Use same interpreter for test-module and module it runs
Default python interpreter to the same interpreter the test-module script is executed with. This is so that the interpreter doesn't have to be specified twice in the command when using non-default python (e.g. ``/path/to/python ./hacking/test-module -I python=/path/to/python ...``)
Diffstat (limited to 'hacking/test-module')
-rwxr-xr-xhacking/test-module3
1 files changed, 2 insertions, 1 deletions
diff --git a/hacking/test-module b/hacking/test-module
index c226f32e88..44b49b06b9 100755
--- a/hacking/test-module
+++ b/hacking/test-module
@@ -59,7 +59,8 @@ def parse():
help="path to python debugger (e.g. /usr/bin/pdb)")
parser.add_option('-I', '--interpreter', dest='interpreter',
help="path to interpreter to use for this module (e.g. ansible_python_interpreter=/usr/bin/python)",
- metavar='INTERPRETER_TYPE=INTERPRETER_PATH')
+ metavar='INTERPRETER_TYPE=INTERPRETER_PATH',
+ default='python={}'.format(sys.executable))
parser.add_option('-c', '--check', dest='check', action='store_true',
help="run the module in check mode")
options, args = parser.parse_args()