-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
t/python: fix tests for systems with multiple python installations
- use a LOG_DRIVER rather than direct execution - rename python tests to have .py extension rather than .t - tests now run under the same python interpreter that flux was configured with This commit adds a thin wrapper around the tap-driver.sh to retain test output granularity while still ensuring the python tests are executed with the python interpreter that flux was configured with.
- Loading branch information
1 parent
9496acd
commit 8310bd9
Showing
11 changed files
with
47 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env python | ||
from __future__ import print_function | ||
|
||
import sys | ||
import os | ||
from os import path | ||
|
||
def main(): | ||
arguments = sys.argv[1:] # 0 is me | ||
try: | ||
args_split_point = arguments.index('--') | ||
driver_args = arguments[:args_split_point] | ||
test_command = arguments[args_split_point+1:] | ||
except ValueError: | ||
for idx, value in enumerate(arguments): | ||
if not value.startswith('--'): | ||
driver_args = arguments[:idx] | ||
test_command = arguments[idx:] | ||
break | ||
|
||
driver = path.join(path.dirname(path.realpath(__file__)), "tap-driver.sh") | ||
full_command = [driver] + driver_args + ["--", sys.executable] + test_command | ||
os.execv(driver, full_command) | ||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.