Revert "[Fuchsia] Update test runner to use /tmp for output minfs image."
This reverts commit d6a88b16c1c35715a0dfba78e5878b8a77c48dd7. Reason for revert: net_unittests still fails. Original change's description: > [Fuchsia] Update test runner to use /tmp for output minfs image. > > /tmp is expected to perform better on GCE when used as a backing > storage for minfs disk image, which should make fsync() less > likely to timeout when writing output.json. > > Bug: 796318 > Change-Id: I6a410d9b7284623ad5ad490225e4f489395a881d > Reviewed-on: https://chromium-review.googlesource.com/838511 > Commit-Queue: Sergey Ulanov <sergeyu@chromium.org> > Reviewed-by: Wez <wez@chromium.org> > Cr-Commit-Position: refs/heads/master@{#525784} TBR=wez@chromium.org,sergeyu@chromium.org Change-Id: Ieb709b65af577712862b8538d3e33a2f8aed81ee No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 796318 Reviewed-on: https://chromium-review.googlesource.com/841242 Reviewed-by: Sergey Ulanov <sergeyu@chromium.org> Commit-Queue: Sergey Ulanov <sergeyu@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#525816} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 11400a4b68ae249b919ba918d9d302ff463c9c63
This commit is contained in:
Родитель
98dc553d52
Коммит
b4f935e4fc
|
@ -17,7 +17,6 @@ import signal
|
|||
import subprocess
|
||||
import sys
|
||||
import tarfile
|
||||
import tempfile
|
||||
import time
|
||||
import uuid
|
||||
|
||||
|
@ -533,13 +532,12 @@ def _SymbolizeBacktrace(backtrace, symbols_mapping):
|
|||
return map(lambda entry: symbolized[entry['frame_id']], backtrace)
|
||||
|
||||
|
||||
def _GetResultsFromImg(dry_run, disk_image_filename,
|
||||
test_launcher_summary_output):
|
||||
def _GetResultsFromImg(dry_run, test_launcher_summary_output):
|
||||
"""Extract the results .json out of the .minfs image."""
|
||||
if os.path.exists(test_launcher_summary_output):
|
||||
os.unlink(test_launcher_summary_output)
|
||||
_RunAndCheck(dry_run, [os.path.join(SDK_ROOT, 'tools', 'minfs'),
|
||||
disk_image_filename,
|
||||
img_filename = test_launcher_summary_output + '.minfs'
|
||||
_RunAndCheck(dry_run, [os.path.join(SDK_ROOT, 'tools', 'minfs'), img_filename,
|
||||
'cp', '::/output.json', test_launcher_summary_output])
|
||||
|
||||
|
||||
|
@ -688,15 +686,13 @@ def RunFuchsia(bootfs_data, use_device, kernel_path, dry_run,
|
|||
if test_launcher_summary_output:
|
||||
# Make and mount a 100M minfs formatted image that is used to copy the
|
||||
# results json to, for extraction from the target.
|
||||
summary_disk_image = tempfile.NamedTemporaryFile(
|
||||
prefix="output.json.minfs")
|
||||
_RunAndCheck(dry_run, ['truncate', '-s100M',
|
||||
summary_disk_image.name,])
|
||||
img_filename = test_launcher_summary_output + '.minfs'
|
||||
_RunAndCheck(dry_run, ['truncate', '-s100M', img_filename,])
|
||||
_RunAndCheck(dry_run, [os.path.join(SDK_ROOT, 'tools', 'minfs'),
|
||||
summary_disk_image.name, 'mkfs'])
|
||||
img_filename, 'mkfs'])
|
||||
# Specifically set an AHCI drive, otherwise the drive won't be mountable
|
||||
# on ARM64.
|
||||
qemu_command.extend(['-drive', 'file=' + summary_disk_image.name +
|
||||
qemu_command.extend(['-drive', 'file=' + img_filename +
|
||||
',if=none,format=raw,id=resultsdisk',
|
||||
'-device', 'ahci,id=ahci',
|
||||
'-device', 'ide-drive,drive=resultsdisk,bus=ahci.0'])
|
||||
|
@ -722,7 +718,6 @@ def RunFuchsia(bootfs_data, use_device, kernel_path, dry_run,
|
|||
sys.stdout.flush()
|
||||
|
||||
if test_launcher_summary_output:
|
||||
_GetResultsFromImg(dry_run, summary_disk_image.name,
|
||||
test_launcher_summary_output)
|
||||
_GetResultsFromImg(dry_run, test_launcher_summary_output)
|
||||
|
||||
return 0 if success else 1
|
||||
|
|
Загрузка…
Ссылка в новой задаче