commit | b41527d6f865688299dc5250f8d58baca9432777 | [log] [tgz] |
---|---|---|
author | Allen Li <ayatane@chromium.org> | Thu Jun 22 17:28:00 2017 -0700 |
committer | chrome-bot <chrome-bot@chromium.org> | Fri Jun 23 00:51:30 2017 -0700 |
tree | 6a0e7841e60484c93f3c35d6013deef24ca38d66 | |
parent | bef37ede9ee1b784e65ec011d34100e8e45365b3 [diff] |
[autotest] gs_offloader refactor BUG=None TEST=None This commit is the combination of multiple commits. Their commit messages are as follows: commit 4f934510a2f28c5c838c514f8b7dcab6fa81fa66 Author: Allen Li <ayatane@chromium.org> Date: Fri May 5 12:13:58 2017 -0700 [autotest] Move get_sanitized_name() Doing some housekeeping BUG=chromium:715435 TEST=None Change-Id: I14a1a9886018cfe0eb6c3a1a77b45836d8476a21 commit c6f7fb299886b67c5eaeb133a59db3b80ef86d1c Author: Allen Li <ayatane@chromium.org> Date: Fri May 5 12:22:53 2017 -0700 [autotest] Add escape() tests BUG=chromium:715435 TEST=None Change-Id: Ibeee38113043e7d16605b1fe5efa8b31350b8629 commit ce42ca80d166330d15113169f6542b839ac417e8 Author: Allen Li <ayatane@chromium.org> Date: Fri May 5 12:28:47 2017 -0700 [autotest] Clean up escape() BUG=chromium:715435 TEST=None Change-Id: I99edb6bf2bd6a9ffebf92893d1b834d815f797b8 commit 87353b0b7efb4ffc55946d40c34ae83410cf0314 Author: Allen Li <ayatane@chromium.org> Date: Fri May 5 12:33:38 2017 -0700 [autotest] Extract _setup_logging() BUG=chromium:715435 TEST=None Change-Id: Iab967852f043238730d2c502dc030bdced156b60 commit 0ac380ec9e267efe317d43f1e303f426f6f1a3f4 Author: Allen Li <ayatane@chromium.org> Date: Fri May 5 12:35:15 2017 -0700 [autotest] Extract _get_log_filename() BUG=chromium:715435 TEST=None Change-Id: I7cbdd4523a76a3d0d06b810b9b8d07208c951861 commit 387b946ca761076bd67934554b4f67af8dc02f3a Author: Allen Li <ayatane@chromium.org> Date: Fri May 5 12:50:14 2017 -0700 [autotest] Move enqueue_offload() This is only used by gs_offloader, yet its a public method on a general purpose class. (Hypothesis: this is why the generic function paradigm is better than methods. The set of functions that want to dispatch on the class is a superset of the functions that want to be methods on the class.) BUG=chromium:715435 TEST=None Change-Id: I8bad5c2f8fea7b922769bc7a9e9121003b1aab60 commit f920fae06b621f6bc6ae429abbf508d191c62ac2 Author: Allen Li <ayatane@chromium.org> Date: Fri May 5 12:58:32 2017 -0700 [autotest] Move logging constants next to logging setup BUG=chromium:715435 TEST=None Change-Id: I9904322ee39cfc07edabe0a1294ecab94201f40c commit 5cf63fcf06e939d7f00dc4ecf6a0f3ecd71e0c32 Author: Allen Li <ayatane@chromium.org> Date: Fri May 5 13:07:25 2017 -0700 [autotest] Extract _sanitize_symlinks() BUG=chromium:715435 TEST=None Change-Id: Ie5f523b0f4472d2a55f1472b6c68199c97fbb3a8 commit d108e7ba6aca44a13b8b0732f2bd7680a50c74f1 Author: Allen Li <ayatane@chromium.org> Date: Fri May 5 13:13:13 2017 -0700 [autotest] Extract _sanitize_fifos() BUG=chromium:715435 TEST=None Change-Id: I7d3392fcb27cb629ede2547f865c8f26b432acc3 commit 1e73efdf7ada7c450f78882523b42f56c3c0b942 Author: Allen Li <ayatane@chromium.org> Date: Fri May 5 14:18:00 2017 -0700 [autotest] Extract _escape_rename() BUG=chromium:715435 TEST=None Change-Id: I2f665ffd00552e2bfb62050f0242727cea34a286 commit 96d47cff7634c203b809a98483999dfbe38de5cc Author: Allen Li <ayatane@chromium.org> Date: Fri May 5 14:41:02 2017 -0700 [autotest] Inline get_directory_size_kibibytes_cmd_list() This isnt actually mocked out or referenced anywhere. There are better ways to mock this out anyway. BUG=chromium:715435 TEST=None Change-Id: If1fc3f72fbb32371b087143efaca6bb2406678c0 commit 104ef14998ef31a9eafe214463a96f66b75bdd6d Author: Allen Li <ayatane@chromium.org> Date: Fri May 5 14:42:23 2017 -0700 [autotest] Clean up sanitize_dir() BUG=chromium:715435 TEST=None Change-Id: Ib0cc1a5842616e1d333328e7f9e95cf973afee88 commit c34f213c482233807bf06929fce3534a93977804 Author: Allen Li <ayatane@chromium.org> Date: Fri May 5 14:44:36 2017 -0700 [autotest] Move MAX_FILE_COUNT to where its used BUG=chromium:715435 TEST=None Change-Id: I728ffafeead8d4e4cfa97e023a6a817420edc2a2 commit 4b85648f8978e75c42e0c7ff007bc0e802dc6979 Author: Allen Li <ayatane@chromium.org> Date: Fri May 5 14:52:43 2017 -0700 [autotest] Extract _make_into_tarball() BUG=chromium:715435 TEST=None Change-Id: I2869bbc2ee15ab97c0850b7421e3a946609901a6 commit d6be13aa211abae6c320fc5525097c62afc7258b Author: Allen Li <ayatane@chromium.org> Date: Fri May 5 15:00:03 2017 -0700 [autotest] Use tarfile for _make_into_tarball() BUG=chromium:715435 TEST=None Change-Id: Id0937d15957ce1227b2a29fbd4f388f11eb0179c commit b746a4eb7e06405b4bbd4c35f4c68fbdc8ee44ae Author: Allen Li <ayatane@chromium.org> Date: Fri May 5 15:05:43 2017 -0700 [autotest] Extract _count_files() BUG=chromium:715435 TEST=None Change-Id: I454573879911e70bae0d0b50ad57bad5899daeac commit fb0a007caaab379d2544f292b73f0a3efcc969bf Author: Allen Li <ayatane@chromium.org> Date: Fri May 5 15:08:00 2017 -0700 [autotest] Simplify _count_files() BUG=chromium:715435 TEST=None Change-Id: Ibdead3268a5051416bf6fff095e542a87d2d525a commit e58932671a693dacc6b74e5bebc5b106aa95ddaa Author: Allen Li <ayatane@chromium.org> Date: Fri May 5 15:19:19 2017 -0700 [autotest] Move notification constants BUG=chromium:715435 TEST=None Change-Id: Iad2a2f7f869d66d230a0de62b4f75802f16709c4 commit 6fcf74934821a141977f025fe322722c4e43c689 Author: Allen Li <ayatane@chromium.org> Date: Fri May 5 15:25:25 2017 -0700 [autotest] Make offload_dir a callable instead of a closure I swear, the first thing that a programmer does after learning about closures is to rewrite every object as a closure. BUG=chromium:715435 TEST=None Change-Id: Ifd3cf9b8821b4926dc496859620f16fa34e4960d commit 7f58dfc1dff99b2679515598352da837236615e0 Author: Allen Li <ayatane@chromium.org> Date: Fri May 5 15:34:30 2017 -0700 [autotest] Make delete_files() inherit from GSOffloader BUG=chromium:715435 TEST=None Change-Id: Idbe4b1bd1d73edb25857ad22f0017df0ecb74402 commit 3b2b10ff73900ad11ca3a5fc57703ffc52a66c4d Author: Allen Li <ayatane@chromium.org> Date: Fri May 5 18:40:06 2017 -0700 [autotest] Fix GSOffloader semantics BUG=chromium:715435 TEST=None Change-Id: I82adfdcc9349b3afb3b6ccd487c53e90afb91c59 commit 4884e2f3c38bd590cee5eee843a20650bf24b59b Author: Allen Li <ayatane@chromium.org> Date: Fri May 5 15:42:31 2017 -0700 [autotest] Use context manager for tempfiles BUG=chromium:715435 TEST=None Change-Id: I526708355247e54620723ae1eb6a1bd5ca7ef653 commit 2fd102484811a8980d6c9893969f3bf3188bc2e3 Author: Allen Li <ayatane@chromium.org> Date: Fri May 5 15:53:40 2017 -0700 [autotest] Use chromite timeout library BUG=chromium:715435 TEST=None Change-Id: I85e6457d17d27580a4443f96021a8d280dec9d5d commit 63229138951ee4e76c43dc2578b50aec21b87501 Author: Allen Li <ayatane@chromium.org> Date: Fri May 5 16:25:42 2017 -0700 [autotest] Split GSOffload call body This will make subsequent CL diffs clearer. BUG=chromium:715435 TEST=None Change-Id: I6eca38fc060639882d9d2869a0df774a597f171d commit 89e5e4eb5cddd0b8565ceb568e87083304b40520 Author: Allen Li <ayatane@chromium.org> Date: Fri May 5 16:27:32 2017 -0700 [autotest] Move TemporaryFile context out Remove indentation levels. BUG=chromium:715435 TEST=None Change-Id: I602c16c241ada2bc452630523764168dd1dda8cb commit 819c8b1f6c9ce236fb7a7e12992a8ca555b544d2 Author: Allen Li <ayatane@chromium.org> Date: Fri May 5 16:29:37 2017 -0700 [autotest] Move error handling out BUG=chromium:715435 TEST=None Change-Id: I7e712a0c6d0087f7fa5b44ccc45dec72503f365b commit 13e9132457b0e40f25fcc62df939dcb37c23fe23 Author: Allen Li <ayatane@chromium.org> Date: Fri May 19 16:57:08 2017 -0700 [autotest] Extract _emit_offload_metrics() BUG=chromium:715435 TEST=None Change-Id: I2299344c2d63a3d9585c8f83daf341b7ba1c5d9d commit 1b0b0708db7d8f370942be9b10f9456983d63ce4 Author: Allen Li <ayatane@chromium.org> Date: Fri May 19 16:57:40 2017 -0700 [autotest] Remove useless variable BUG=chromium:715435 TEST=None Change-Id: I690f3fa6ae7a8c5a224586057292713ae763bb60 commit 92806326b6fe8173c98e0560247f2c64041705dd Author: Allen Li <ayatane@chromium.org> Date: Fri May 5 17:38:18 2017 -0700 [autotest] Move pruning logic out This OSError is supposed to only apply to the pruning; do that. Also disentangle this pile of spaghetti. BUG=chromium:715435 TEST=None Change-Id: If46a5962f4530044058a4cd5ba840a9195c142a7 commit c604443fb5299d26fad0bb00c2b4b0f3bc99b24d Author: Allen Li <ayatane@chromium.org> Date: Fri May 5 17:42:44 2017 -0700 [autotest] Decrease scope of error flag BUG=chromium:715435 TEST=None Change-Id: If6a86f04c54de0c44774bd842902d54433925273 commit a519607dc6bf93356d7b336e90e9d649c6da441b Author: Allen Li <ayatane@chromium.org> Date: Fri May 5 17:46:05 2017 -0700 [autotest] Extract pruning logic BUG=chromium:715435 TEST=None Change-Id: Ia454d9d441e3a4e404350219041eadcaf8bdb0ef commit e0e79552fe4fb7982e7cdabcc3ae28c0c34e40f4 Author: Allen Li <ayatane@chromium.org> Date: Fri May 5 17:47:39 2017 -0700 [autotest] Clean up pruning test logic BUG=chromium:715435 TEST=None Change-Id: Idcb936ab659223eed0476858a05ce0b7a6b4e61e commit 53e076a46ea1a4c01f0d41d2616a84b8a1d02f60 Author: Allen Li <ayatane@chromium.org> Date: Fri May 19 17:11:55 2017 -0700 [autotest] Remove error flag Even C++ has exceptions. BUG=chromium:715435 TEST=None Change-Id: I0c2e61cb753f8130356388c307410bb8d37489a9 commit 546180941013147ff493139c33f983e67a03a789 Author: Allen Li <ayatane@chromium.org> Date: Fri May 19 17:12:53 2017 -0700 [autotest] Remove redudant check BUG=chromium:715435 TEST=None Change-Id: Iecc17ec88a78af691a4b3f6a444d2c033bbc3ae5 commit ab2fbbb578eeeb73f5db71c0266c8a551bfef748 Author: Allen Li <ayatane@chromium.org> Date: Mon May 15 14:48:09 2017 -0700 [autotest] Move uploaded test out BUG=chromium:715435 TEST=None Change-Id: Ic265aba95aec337132251c50b6d86a51b415b86b commit 341f36d00d5b0b5973da3fc78f92db218d17b5ff Author: Allen Li <ayatane@chromium.org> Date: Mon May 15 14:49:23 2017 -0700 [autotest] Fix indentation BUG=chromium:715435 TEST=None Change-Id: I851a790d9470f99bfc53ca3f71efee8fbc5ab9d1 commit d63eb51d5e5d9553bf6b33dee9b6d7b49135e115 Author: Allen Li <ayatane@chromium.org> Date: Mon May 15 14:58:11 2017 -0700 [autotest] Remove is_offloaded() There are two concepts of is_offloaded being used in gs_offloader. One of them is an existence check that isnt actually quite right. Remove it. BUG=chromium:715435 TEST=None Change-Id: Ib9002b848e74b55e29d17131a3c4962ba32f6207 commit 40ff0da7e960e6861557f3064a3d4618369d8f9e Author: Allen Li <ayatane@chromium.org> Date: Mon May 15 15:00:43 2017 -0700 [autotest] Clarify _update_offload_results() BUG=chromium:715435 TEST=None Change-Id: I23986726ac1d02a60baf64ba4d137f132c1b9d4f commit a004fd4c4ff7c9df390b80941bba3a8d38355132 Author: Allen Li <ayatane@chromium.org> Date: Mon May 15 15:05:56 2017 -0700 [autotest] Dont re-add uploaded jobs BUG=chromium:715435 TEST=None Change-Id: I054552667d62110f1e3a16099aeacb99e7d31661 commit 85e22760e53e23be728bec9bb983f710e1c0cdcc Author: Allen Li <ayatane@chromium.org> Date: Mon May 15 15:15:33 2017 -0700 [autotest] Fix upload_testresult_files() name BUG=chromium:715435 TEST=None Change-Id: I2da7b5c0a25c6cd8f295aed795e614449d93f9ba commit 20add289f72659648fa5904524eb6d2c9bbe06f8 Author: Allen Li <ayatane@chromium.org> Date: Mon May 15 15:32:18 2017 -0700 [autotest] Extract _remove_log_directory_contents() BUG=chromium:715435 TEST=None Change-Id: I06f2b1f312a0836854bfd43aaa6145473b558c2f commit a53a80a78c7d72999645d7cb20e9d3e1541bbabe Author: Allen Li <ayatane@chromium.org> Date: Mon May 15 15:33:40 2017 -0700 [autotest] Replace get_job_directory() This isnt Java, we dont need a getter. BUG=chromium:715435 TEST=None Change-Id: If97efd0ff8c6698ee8ce386dd113e60c53d02627 commit 8cceb41b48ec68b68ee050c41cc8255ab7090086 Author: Allen Li <ayatane@chromium.org> Date: Mon May 15 15:40:14 2017 -0700 [autotest] Extract _is_expired() BUG=chromium:715435 TEST=None Change-Id: I81924e5ca47489692d836866f83fd9506884f36f commit f3bfca34e41b3a6643785184e7e6d3f236f90831 Author: Allen Li <ayatane@chromium.org> Date: Mon May 15 15:42:50 2017 -0700 [autotest] Make get_cmd_list private BUG=chromium:715435 TEST=None Change-Id: Id39af7863844b5ed7d5ec3c212e0683b133921e8 commit db314fad7d61ee25af4ac3c3bf8a6ba88e0538d4 Author: Allen Li <ayatane@chromium.org> Date: Mon May 15 15:48:23 2017 -0700 [autotest] Replace get_failure_time(), get_failure_count() This isnt Java, we dont need a getter. BUG=chromium:715435 TEST=None Change-Id: I857de5947d230c0c7d9f01a11214831189268369 commit c6bd98ca98d92d669c9695d62edd40a67c17be4f Author: Allen Li <ayatane@chromium.org> Date: Fri Jun 16 15:26:26 2017 -0700 [autotest] Fix damned mox thing I swear it works locally, but it fails on trybot. I think mock will be more reliable. BUG=None TEST=None Change-Id: I7bf11033aee567a5a081b4a2be64769eef3b7f15 commit bb3f60bb6470fd37ba645f562615c2142f4b1d64 Author: Allen Li <ayatane@chromium.org> Date: Mon Jun 19 12:27:34 2017 -0700 [autotest] Extract tempdir logic into a separate class This class will be reused for a non-mox test class, because mox is giving much such a ridiculous time. Moving a few function around costs hours fiddling with mox tests. BUG=None TEST=None Change-Id: I58fd573a8dbb046b4ab2449dfa22044102088b2c commit e3b27f31393b6488547103b4f605b49b897cf2be Author: Allen Li <ayatane@chromium.org> Date: Mon Jun 19 12:32:04 2017 -0700 [autotest] Add non-mox version of timeout tests This is confirmed passing when run locally. BUG=None TEST=None Change-Id: I2196d51928b0ca35d783727f2db109148f80fe77 Change-Id: I21d905707ff67a8c124a84458f7e0e313f5fa433 Reviewed-on: https://chromium-review.googlesource.com/538996 Commit-Ready: Allen Li <ayatane@chromium.org> Tested-by: Allen Li <ayatane@chromium.org> Reviewed-by: Allen Li <ayatane@chromium.org>
Autotest is a framework for fully automated testing. It was originally designed to test the Linux kernel, and expanded by the Chrome OS team to validate complete system images of Chrome OS and Android.
Autotest is composed of a number of modules that will help you to do stand alone tests or setup a fully automated test grid, depending on what you are up to. A non extensive list of functionality is:
A body of code to run tests on the device under test. In this setup, test logic executes on the machine being tested, and results are written to files for later collection from a development machine or lab infrastructure.
A body of code to run tests against a remote device under test. In this setup, test logic executes on a development machine or piece of lab infrastructure, and the device under test is controlled remotely via SSH/adb/some combination of the above.
Developer tools to execute one or more tests. test_that
for Chrome OS and test_droid
for Android allow developers to run tests against a device connected to their development machine on their desk. These tools are written so that the same test logic that runs in the lab will run at their desk, reducing the number of configurations under which tests are run.
Lab infrastructure to automate the running of tests. This infrastructure is capable of managing and running tests against thousands of devices in various lab environments. This includes code for both synchronous and asynchronous scheduling of tests. Tests are run against this hardware daily to validate every build of Chrome OS.
Infrastructure to set up miniature replicas of a full lab. A full lab does entail a certain amount of administrative work which isn't appropriate for a work group interested in automated tests against a small set of devices. Since this scale is common during device bringup, a special setup, called Moblab, allows a natural progressing from desk -> mini lab -> full lab.
See the guides to test_that
and test_droid
:
See the best practices guide, existing tests, and comments in the code.
git clone https://chromium.googlesource.com/chromiumos/third_party/autotest
See the coding style guide for guidance on submitting patches.