Aviv Keshet | 2fd63d6 | 2019-06-11 15:18:07 -0700 | [diff] [blame] | 1 | # 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 Keshet | 2fd63d6 | 2019-06-11 15:18:07 -0700 | [diff] [blame] | 5 | AUTHOR = "Chrome OS Test Platform Team" |
| 6 | NAME = "cros_test_platform" |
| 7 | PURPOSE = "Entry point for cros_test_platform execution of autotest tests." |
| 8 | |
| 9 | DOC = """ |
| 10 | This suite is used as an entry point for cros_test_platform, to allow it to |
| 11 | inject arbitrary arguments into dynamic_suite.reimage_and_run, by |
| 12 | supplying these arguments as a json-encoded args dictionary (with name |
| 13 | args_dict_json). |
| 14 | |
| 15 | This suite should not be used for any other purpose. |
| 16 | """ |
| 17 | |
Aviv Keshet | 7e544fe | 2019-07-02 17:05:02 -0700 | [diff] [blame^] | 18 | import json |
| 19 | |
| 20 | import common |
| 21 | from autotest_lib.server.cros.dynamic_suite import dynamic_suite |
| 22 | |
| 23 | |
Aviv Keshet | 2fd63d6 | 2019-06-11 15:18:07 -0700 | [diff] [blame] | 24 | TIME = "SHORT" |
| 25 | TEST_CATEGORY = "General" |
| 26 | TEST_CLASS = "suite" |
| 27 | TEST_TYPE = "Server" |
| 28 | |
| 29 | # Load and overwrite args_dict. |
| 30 | args_dict_json = args_dict['args_dict_json'] |
| 31 | args_dict.update(json.loads(args_dict_json)) |
| 32 | |
| 33 | # Inject handle to current job instance. |
| 34 | args_dict['job'] = job |
| 35 | |
| 36 | dynamic_suite.reimage_and_run(**args_dict) |