Commit ccdc07b7 authored by Ben Pastene's avatar Ben Pastene Committed by Commit Bot

Remove post-test filesystem cleanup from cros VM tests.

This is now done automatically after crrev.com/c/1252005

Change-Id: Iddcd43de19376bf2d6d522dd2ceed5060b880bf6
Reviewed-on: https://chromium-review.googlesource.com/1256102Reviewed-by: default avatarJohn Budorick <jbudorick@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595875}
parent b63a45d5
...@@ -260,26 +260,7 @@ class GTestTest(RemoteTest): ...@@ -260,26 +260,7 @@ class GTestTest(RemoteTest):
test_invocation += ' --test-launcher-summary-output=%s' % vm_result_file test_invocation += ' --test-launcher-summary-output=%s' % vm_result_file
if self._additional_args: if self._additional_args:
test_invocation += ' %s' % ' '.join(self._additional_args) test_invocation += ' %s' % ' '.join(self._additional_args)
vm_test_script_contents += [ vm_test_script_contents.append(test_invocation)
test_invocation,
'test_retcode=$?',
]
# Clear out directories that persist logs and crash dumps. These can
# accumulate over a VM's lifetime and consume disk space, so remove any
# that the test generated.
# TODO(crbug.com/878526): Remove this once cros_run_vm_test handles it.
vm_test_script_contents += [
# We run tests as chronos, but need to be root to rm the files. So pass
# in the public plaintext root password to sudo via stdin.
'echo "test0000" | '
'sudo -S find /var/spool/crash/ -type f -print -delete',
'echo "test0000" | '
'sudo -S find /var/log/chrome/ -type f -print -delete',
# Make sure the exit code is that of the test, and not the post-test
# cleanup.
'exit $test_retcode',
]
logging.info('Running the following command in the VM:') logging.info('Running the following command in the VM:')
logging.info('\n' + '\n'.join(vm_test_script_contents)) logging.info('\n' + '\n'.join(vm_test_script_contents))
......
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