commit | 7f854db22fd877ac891904cc8f7f743e25cd9ed2 | [log] [tgz] |
---|---|---|
author | Mike Frysinger <vapier@chromium.org> | Tue Oct 23 16:14:58 2018 -0400 |
committer | chrome-bot <chrome-bot@chromium.org> | Wed Oct 24 20:07:20 2018 -0700 |
tree | 71468011b24e1498a16a6d9bf2dc5720304354a6 | |
parent | af07dbed4e650fd24ef8e52d9f07ba2440498f7c [diff] |
crash: improve error message for unknown files The UserCrashTest._run_crasher_process_and_analyze helper goes through the crash spool directory and makes sure all files created with reports are known/expected. If it finds any it doesn't know about, it fails. Unfortunately, the "unknown file" code path is geared towards a failure mode that no longer really comes up: it assumes that if a file is new, it's because breakpad itself created a minidump and left it behind. So any time crash-reporter creates a new file, we get the confusing error: ERROR: crasher_nobreakpad did generate breakpad minidump It doesn't tell us what this new file is (could be a log file), and the grammar being slightly broken adds to the confusion. Further, if crash-reporter creates two new files, we get the error: ERROR: Breakpad wrote multiple minidumps Which doesn't make sense if crash-reporter is creating logs and not any breakpad related files. Lets nuke all this special case logic and just add a generic "unknown file" whenever we see files we don't expect. Now we'll get an explicit error about the file that we don't handle: ERROR: Crash reporter created an unknown file: crasher_nobreakpad.20181023.131230.12664.proclog BUG=chromium:889552 TEST=`test_that ... logging_UserCrash` still passes, and writes a better error message w/CL:1296089 Change-Id: Ieedd59b8b21264e669da4df18a96ac8773dace1e Reviewed-on: https://chromium-review.googlesource.com/1297191 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Commit-Ready: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: Ben Chan <benchan@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.
You need to run utils/build_externals.py
to set up the dependencies for pre-upload hook tests.