Commit 0a3ccb1a authored by Jérome Perrin's avatar Jérome Perrin

understand log_directory and shared_part_list

These are options passed by test node, so that tests:
- can expose their logs while they are running ( see
  nexedi/erp5@34601253 )
- can use existing shared parts if they need to install
  software in a recursive slapos ( see
  nexedi/erp5@35768fa2 )
parent 2c29b2c9
...@@ -109,6 +109,8 @@ def main(): ...@@ -109,6 +109,8 @@ def main():
parser.add_argument('--test_suite_title', help='The test suite title') parser.add_argument('--test_suite_title', help='The test suite title')
parser.add_argument('--test_node_title', help='The test node title') parser.add_argument('--test_node_title', help='The test node title')
parser.add_argument('--project_title', help='The project title') parser.add_argument('--project_title', help='The project title')
parser.add_argument('--log_directory', help='Directory to store logs')
parser.add_argument('--shared_part_list', help='%s separated list of directories containing read only shared parts' % os.pathsep)
parser.add_argument('--verbose', action='store_true', help='increase output verbosity') parser.add_argument('--verbose', action='store_true', help='increase output verbosity')
...@@ -156,6 +158,12 @@ def main(): ...@@ -156,6 +158,12 @@ def main():
else: else:
test_result = LocalTestResult(tenv, run=args.run) test_result = LocalTestResult(tenv, run=args.run)
# set conventional enironment variables
if args.log_directory:
os.environ['SLAPOS_TEST_LOG_DIRECTORY'] = args.log_directory
if args.shared_part_list:
os.environ['SLAPOS_TEST_SHARED_PART_LIST'] = args.shared_part_list
# make sure we get output from subprocesses without delay. # make sure we get output from subprocesses without delay.
# go does not buffer stdout/stderr by default, but python does for stdout. # go does not buffer stdout/stderr by default, but python does for stdout.
# tell python not to buffer anything. # tell python not to buffer anything.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment