summaryrefslogtreecommitdiff
path: root/hacking
diff options
context:
space:
mode:
authorKarolis Tamutis <karolis.t@gmail.com>2019-04-10 17:04:49 +0300
committerMatt Martz <matt@sivel.net>2019-04-10 09:04:49 -0500
commit54384e7a1278aed2f47363e72028ea190f22472d (patch)
tree18aa27f385dd72df671c425f6970d259c9c48824 /hacking
parentd3dae4a4448975102c48fd6af2260abd2e9fd0a6 (diff)
downloadansible-54384e7a1278aed2f47363e72028ea190f22472d.tar.gz
Make test-module use default value for interpreter (#54053)
* Make test-module use default value for interpreter * Changing from static interpreter path to sys.executable as per #54053 * A little ntegration test for #54053
Diffstat (limited to 'hacking')
-rwxr-xr-xhacking/test-module3
1 files changed, 2 insertions, 1 deletions
diff --git a/hacking/test-module b/hacking/test-module
index 5e20317037..1eb9c91252 100755
--- a/hacking/test-module
+++ b/hacking/test-module
@@ -64,7 +64,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="ansible_python_interpreter=%s" % (sys.executable if sys.executable else '/usr/bin/python'))
parser.add_option('-c', '--check', dest='check', action='store_true',
help="run the module in check mode")
parser.add_option('-n', '--noexecute', dest='execute', action='store_false',