blob: 8938ca05fd796b0297f29420f5ff6c85d13536c7 [file] [log] [blame]
Aviv Keshet2fd63d62019-06-11 15:18:07 -07001# Copyright 2019 The Chromium OS Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
Aviv Keshet2fd63d62019-06-11 15:18:07 -07005AUTHOR = "Chrome OS Test Platform Team"
6NAME = "cros_test_platform"
7PURPOSE = "Entry point for cros_test_platform execution of autotest tests."
8
9DOC = """
10This suite is used as an entry point for cros_test_platform, to allow it to
11inject arbitrary arguments into dynamic_suite.reimage_and_run, by
12supplying these arguments as a json-encoded args dictionary (with name
13args_dict_json).
14
15This suite should not be used for any other purpose.
16"""
17
Aviv Keshet7e544fe2019-07-02 17:05:02 -070018import json
19
20import common
21from autotest_lib.server.cros.dynamic_suite import dynamic_suite
22
23
Aviv Keshet2fd63d62019-06-11 15:18:07 -070024TIME = "SHORT"
25TEST_CATEGORY = "General"
26TEST_CLASS = "suite"
27TEST_TYPE = "Server"
28
29# Load and overwrite args_dict.
30args_dict_json = args_dict['args_dict_json']
Aviv Keshetfae6de72019-07-03 11:01:08 -070031args_dict.update(dynamic_suite.byteify(json.loads(args_dict_json)))
Aviv Keshet2fd63d62019-06-11 15:18:07 -070032
33# Inject handle to current job instance.
34args_dict['job'] = job
35
36dynamic_suite.reimage_and_run(**args_dict)