LXC fails if flags not passed |
|
Issue description
Running unit tests on a drone at ToT, several fail with the error
Traceback (most recent call last):
File "/usr/local/autotest/site_utils/lxc/container_unittest.py", line 48, in tearDownClass
if not unittest_setup.config.skip_cleanup:
AttributeError: 'Config' object has no attribute 'skip_cleanup'
Checking for this config param, it's set in unittest_setup.py but does not have a default value.
,
Mar 31 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/224bb794cbc58ea022300914887fe762f7623741 commit 224bb794cbc58ea022300914887fe762f7623741 Author: Jacob Kopczynski <jkop@google.com> Date: Sat Mar 31 04:53:31 2018 autotest: lxc: unittest_setup everywhere Make the setup method idempotent (checks whether it has been called) and add it in class setup for all test classes. Additionally, set defaults for verbose and skip_cleanup which caused errors unless the appropriate flags were passed. BUG= chromium:822888 TEST=run unittests locally and on drone Change-Id: I6afc9c40320c9ef1d359800ad1cbc6da8ada44f7 Reviewed-on: https://chromium-review.googlesource.com/967221 Commit-Ready: Jacob Kopczynski <jkop@chromium.org> Tested-by: Jacob Kopczynski <jkop@chromium.org> Reviewed-by: Jacob Kopczynski <jkop@chromium.org> [modify] https://crrev.com/224bb794cbc58ea022300914887fe762f7623741/site_utils/lxc/utils.py [modify] https://crrev.com/224bb794cbc58ea022300914887fe762f7623741/site_utils/lxc/container_factory_unittest.py [modify] https://crrev.com/224bb794cbc58ea022300914887fe762f7623741/site_utils/lxc/unittest_setup.py [modify] https://crrev.com/224bb794cbc58ea022300914887fe762f7623741/site_utils/lxc/container_unittest.py [modify] https://crrev.com/224bb794cbc58ea022300914887fe762f7623741/site_utils/lxc/zygote_unittest.py [modify] https://crrev.com/224bb794cbc58ea022300914887fe762f7623741/site_utils/lxc/container_bucket_unittest.py [modify] https://crrev.com/224bb794cbc58ea022300914887fe762f7623741/site_utils/lxc/shared_host_dir_unittest.py [modify] https://crrev.com/224bb794cbc58ea022300914887fe762f7623741/site_utils/lxc/base_image_unittest.py [modify] https://crrev.com/224bb794cbc58ea022300914887fe762f7623741/site_utils/lxc/container_pool/async_listener_unittest.py |
|
►
Sign in to add a comment |
|
Comment 1 by jkop@chromium.org
, Mar 28 2018