Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion executors/node/executor.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,10 @@ rl.on('line', function(line) {
if (test_type == "segmenter") {
outputLine = segmenter.testSegmenter(parsedJson);
} else {
outputLine = {'error': 'unknown test type',
// UNSUPPORTED TEST TYPE!
outputLine = {'label': 'UNKNOWN',
'error': 'unknown test type',
'error_detail': 'Requested unsupported test type',
'test_type': test_type,
'unsupported_test': test_type};
}
Expand Down
6 changes: 5 additions & 1 deletion schema/collation/test_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,11 @@
"warning": {
"description": "Present when data has a problem",
"type": "string"
}
},
"hash_id": {
"description": "Has value of the JSON string omtting label value",
"type": "integer"
}
},
"required": [
"label",
Expand Down
4 changes: 4 additions & 0 deletions schema/lang_names/test_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
"locale_label": {
"description": "locale tag of the language being described ",
"type": "string"
},
"hash_id": {
"description": "Has value of the JSON string omtting label value",
"type": "integer"
}
},
"additionalProperties": false
Expand Down
4 changes: 4 additions & 0 deletions schema/likely_subtags/test_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@
"option": {
"description": "Type of processing requested",
"enum": ["maximize", "minimize", "minimizeFavorScript", "minimizeFavorRegion"]
},
"hash_id": {
"description": "Has value of the JSON string omtting label value",
"type": "integer"
}
}
},
Expand Down
4 changes: 4 additions & 0 deletions schema/number_format/test_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@
"default": "auto"
}
}
},
"hash_id": {
"description": "Has value of the JSON string omtting label value",
"type": "integer"
}
},
"required": [
Expand Down
31 changes: 19 additions & 12 deletions testdriver/testplan.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,9 +500,12 @@ def send_one_line(self, input_line):
capture_output=True,
env=self.exec_env,
shell=True)
if not result.returncode:
if result.returncode == 0:
# Command worked!
return result.stdout
else:
input = json.loads(input_line.replace('#EXIT', '').strip())
# non-zero return code indicates some kind of problem
logging.debug('$$$$$$$$$$$$$$$$ ---> return code: %s', result.returncode)
logging.debug(' ----> INPUT LINE= >%s<', input_line)
logging.debug(' ----> STDOUT= >%s<', result.stdout)
Expand All @@ -512,19 +515,23 @@ def send_one_line(self, input_line):
logging.error(' !!!!!! %s' % self.run_error_message)

# Handle problems with decoding errors and other unknowns.
error_result = {'label': 'UNKNOWN',
'input_data': input_line,
'error': self.run_error_message
error_result = {'label': input['label'],
'input_data': input,
'error': self.run_error_message,
'error_detail': 'severe error from subprocess ' +
str(result.returncode)
}
return json.dumps(error_result)
except BaseException as err:
logging.error('Err = %s', err)
input = json.loads(input_line.replace('#EXIT', '').strip())
error_result = {'label': input['label'],
'input_data': input,
'error': err
}
return json.dumps(error_result)

try:
input = json.loads(input_line.replace('#EXIT', '').strip())
logging.error('Err = %s', err)
error_result = {'label': input['label'],
'input_data': input,
'error': err
}
return json.dumps(error_result)
except BaseException as error:
logging.error('testplan.py: Error = %s. input_line = <%s>', err, input_line)

return None
Loading