Boot from copy-on-write images for cros VM tests.

With this, any changes to the filesystem a test makes will only last
for as long as the VM is alive. Since we launch+shutdown for every
test, this perfectly isolates consecutive tests from one another. No
more out-of-disk errors!

Bug: 887753
Change-Id: Ifdf4af22e288583135cfe99d363eb3e79045e08d
Reviewed-on: https://chromium-review.googlesource.com/1252005
Reviewed-by: John Budorick <jbudorick@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#595138}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9ed482697ef1ba1baaeee47263c9c2a613c299b6
This commit is contained in:
Ben Pastene 2018-09-28 17:33:44 +00:00 коммит произвёл Commit Bot
Родитель 8801942af6
Коммит 3e80aacb27
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -60,6 +60,8 @@ class RemoteTest(object):
'--start',
'--board', args.board,
'--cache-dir', args.cros_cache,
# Don't persist any filesystem changes after the VM shutsdown.
'--copy-on-write',
]
if args.vm_logs_dir:
self._vm_test_cmd += [
@ -80,6 +82,7 @@ class RemoteTest(object):
self._test_env['USE'] = 'highdpi'
self._test_env['PATH'] = (
self._test_env['PATH'] + ':' + os.path.join(CHROMITE_PATH, 'bin'))
@property
def suite_name(self):
raise NotImplementedError('Child classes need to define suite name.')
@ -407,6 +410,8 @@ def host_cmd(args, unknown_args):
'--start',
'--board', args.board,
'--cache-dir', args.cros_cache,
# Don't persist any filesystem changes after the VM shutsdown.
'--copy-on-write',
]
if args.verbose:
cros_run_vm_test_cmd.append('--debug')