Commit 9ed48269 authored by Ben Pastene's avatar Ben Pastene Committed by Commit Bot

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/1252005Reviewed-by: default avatarJohn Budorick <jbudorick@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595138}
parent 5b4759ad
...@@ -60,6 +60,8 @@ class RemoteTest(object): ...@@ -60,6 +60,8 @@ class RemoteTest(object):
'--start', '--start',
'--board', args.board, '--board', args.board,
'--cache-dir', args.cros_cache, '--cache-dir', args.cros_cache,
# Don't persist any filesystem changes after the VM shutsdown.
'--copy-on-write',
] ]
if args.vm_logs_dir: if args.vm_logs_dir:
self._vm_test_cmd += [ self._vm_test_cmd += [
...@@ -80,6 +82,7 @@ class RemoteTest(object): ...@@ -80,6 +82,7 @@ class RemoteTest(object):
self._test_env['USE'] = 'highdpi' self._test_env['USE'] = 'highdpi'
self._test_env['PATH'] = ( self._test_env['PATH'] = (
self._test_env['PATH'] + ':' + os.path.join(CHROMITE_PATH, 'bin')) self._test_env['PATH'] + ':' + os.path.join(CHROMITE_PATH, 'bin'))
@property @property
def suite_name(self): def suite_name(self):
raise NotImplementedError('Child classes need to define suite name.') raise NotImplementedError('Child classes need to define suite name.')
...@@ -407,6 +410,8 @@ def host_cmd(args, unknown_args): ...@@ -407,6 +410,8 @@ def host_cmd(args, unknown_args):
'--start', '--start',
'--board', args.board, '--board', args.board,
'--cache-dir', args.cros_cache, '--cache-dir', args.cros_cache,
# Don't persist any filesystem changes after the VM shutsdown.
'--copy-on-write',
] ]
if args.verbose: if args.verbose:
cros_run_vm_test_cmd.append('--debug') cros_run_vm_test_cmd.append('--debug')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment