Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndi McClure <andi.mcclure@xamarin.com>2015-12-22 23:04:57 +0300
committerAndi McClure <andi.mcclure@xamarin.com>2015-12-22 23:04:57 +0300
commit18da391e21acef8e6dedca94412a1b5cc92dbf60 (patch)
treed190158997cc3f115717320e00bab0f95daf79d6 /scripts
parent0a63e216ff0ee7348e24cd5f50aec6c2d1586613 (diff)
Have scripts/babysitter use MONO_BABYSITTER_LOG_FILE configuration
Instead of configuring logs with WORKSPACE dir
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/babysitter11
1 files changed, 5 insertions, 6 deletions
diff --git a/scripts/babysitter b/scripts/babysitter
index 9940e8ab89c..3786fa0f98b 100755
--- a/scripts/babysitter
+++ b/scripts/babysitter
@@ -40,7 +40,7 @@ RUN_KEY = 'MONO_BABYSITTER_NUNIT_RUN_TEST' # Semicolon-separated list
RUN_MODE_KEY = 'MONO_BABYSITTER_NUNIT_RUN_MODE' # Equal to either RUN or AFTER
# Keys used for script configuration (see --help text)
-LOGGING_DIR_KEY = 'WORKSPACE' # Path
+LOG_FILE_KEY = 'MONO_BABYSITTER_LOG_FILE' # Path
RETRY_KEY = 'MONO_BABYSITTER_RETRY' # Equal to an integer
VERBOSE_KEY = 'MONO_BABYSITTER_VERBOSE' # "Undocumented"-- used for debugging babysitter
@@ -84,9 +84,9 @@ Durations are floating point numbers followed by an optional unit:\n
'h' for hours
'd' for days\n
supported environment variables:
- %s: Directory path to save logs into
+ %s: File to write logs to (as line-delimited JSON)
%s: If set to a number, failed test cases will be rerun this many times (NUnit test suites only)""" %
- (LOGGING_DIR_KEY, RETRY_KEY),
+ (LOG_FILE_KEY, RETRY_KEY),
formatter_class=argparse.RawTextHelpFormatter)
argparser.add_argument('-s', '--signal', dest='signal', metavar='signal', default='TERM',
help="Send this signal to the command on timeout, instead of TERM.")
@@ -146,9 +146,8 @@ command = args.command + extra_args
global_env = copy.deepcopy( os.environ )
verbose = VERBOSE_KEY in global_env
-logging = LOGGING_DIR_KEY in global_env
-logging_dir = global_env[LOGGING_DIR_KEY] if logging else None
-logfile = os.path.join(logging_dir, LOGGING_FILE) if logging else None
+logging = LOG_FILE_KEY in global_env
+logfile = global_env[LOG_FILE_KEY] if logging else None
crash_resuming = True # TODO: Consider exposing this option, or adding a retry_on_crash option.
failmax = int(global_env[RETRY_KEY]) if RETRY_KEY in global_env else 0
babysitting = logging or failmax