mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-26 23:23:33 +00:00
Bug 1198944 - remove vmware recording support from mochitest; r=khuey
VMWare's record/replay bits are unsupported, and they only work with programs compiled with VS2010, which we no longer support.
This commit is contained in:
parent
b96ddcd081
commit
2e6b84568b
@ -4,9 +4,6 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
if CONFIG['_MSC_VER'] and CONFIG['OS_TEST'] != 'x86_64':
|
||||
TEST_DIRS += ['vmwarerecordinghelper']
|
||||
|
||||
TEST_DIRS += ['crashinjectdll']
|
||||
|
||||
if CONFIG['ENABLE_TESTS']:
|
||||
|
@ -1,15 +0,0 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
SOURCES += [
|
||||
'vmwarerecordinghelper.cpp',
|
||||
]
|
||||
|
||||
SharedLibrary('vmwarerecordinghelper')
|
||||
|
||||
DEFFILE = '%s/%s.def' % (SRCDIR, LIBRARY_NAME)
|
||||
|
||||
USE_STATIC_LIBS = True
|
@ -1,34 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/**
|
||||
* The following code comes from "Starting and Stopping Recording of Virtual
|
||||
* Machine Activity from Within the Guest":
|
||||
*
|
||||
* http://kb.vmware.com/selfservice/documentLink.do?externalID=1001401
|
||||
*/
|
||||
|
||||
void __cdecl
|
||||
StartRecording()
|
||||
{
|
||||
__asm {
|
||||
mov eax, 564d5868h
|
||||
mov ebx, 1
|
||||
mov cx, 47
|
||||
mov dx, 5658h
|
||||
in eax, dx
|
||||
}
|
||||
}
|
||||
|
||||
void __cdecl
|
||||
StopRecording()
|
||||
{
|
||||
__asm {
|
||||
mov eax, 564d5868h
|
||||
mov ebx, 2
|
||||
mov cx, 47
|
||||
mov dx, 5658h
|
||||
in eax, dx
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
;+# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
;+# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
LIBRARY vmwarerecordinghelper
|
||||
EXPORTS
|
||||
StartRecording
|
||||
StopRecording
|
@ -32,7 +32,6 @@ ifeq ($(OS_ARCH),WINNT)
|
||||
TEST_HARNESS_BINS += \
|
||||
crashinject$(BIN_SUFFIX) \
|
||||
crashinjectdll$(DLL_SUFFIX) \
|
||||
vmwarerecordinghelper$(DLL_SUFFIX) \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
|
@ -30,9 +30,6 @@ except ImportError:
|
||||
conditions = None
|
||||
|
||||
|
||||
VMWARE_RECORDING_HELPER_BASENAME = "vmwarerecordinghelper"
|
||||
|
||||
|
||||
class ArgumentContainer():
|
||||
__metaclass__ = ABCMeta
|
||||
|
||||
@ -290,14 +287,6 @@ class MochitestArguments(ArgumentContainer):
|
||||
"help": "Directory where testing-only JS modules are located.",
|
||||
"suppress": True,
|
||||
}],
|
||||
[["--use-vmware-recording"],
|
||||
{"action": "store_true",
|
||||
"dest": "vmwareRecording",
|
||||
"default": False,
|
||||
"help": "Enables recording while the application is running inside a VMware "
|
||||
"Workstation 7.0 or later VM.",
|
||||
"suppress": True,
|
||||
}],
|
||||
[["--repeat"],
|
||||
{"type": int,
|
||||
"default": 0,
|
||||
@ -627,16 +616,6 @@ class MochitestArguments(ArgumentContainer):
|
||||
elif not options.symbolsPath and build_obj:
|
||||
options.symbolsPath = os.path.join(build_obj.distdir, 'crashreporter-symbols')
|
||||
|
||||
if options.vmwareRecording:
|
||||
if not mozinfo.isWin:
|
||||
parser.error(
|
||||
"use-vmware-recording is only supported on Windows.")
|
||||
options.vmwareHelperPath = os.path.join(
|
||||
options.utilityPath, VMWARE_RECORDING_HELPER_BASENAME + ".dll")
|
||||
if not os.path.exists(options.vmwareHelperPath):
|
||||
parser.error("%s not found, cannot automate VMware recording." %
|
||||
options.vmwareHelperPath)
|
||||
|
||||
if options.webapprtContent and options.webapprtChrome:
|
||||
parser.error(
|
||||
"Only one of --webapprt-content and --webapprt-chrome may be given.")
|
||||
|
@ -1217,7 +1217,6 @@ class Mochitest(MochitestUtilsMixin):
|
||||
_active_tests = None
|
||||
certdbNew = False
|
||||
sslTunnel = None
|
||||
vmwareHelper = None
|
||||
DEFAULT_TIMEOUT = 60.0
|
||||
mediaDevices = None
|
||||
|
||||
@ -1624,37 +1623,6 @@ class Mochitest(MochitestUtilsMixin):
|
||||
|
||||
return foundZombie
|
||||
|
||||
def startVMwareRecording(self, options):
|
||||
""" starts recording inside VMware VM using the recording helper dll """
|
||||
assert mozinfo.isWin
|
||||
from ctypes import cdll
|
||||
self.vmwareHelper = cdll.LoadLibrary(self.vmwareHelperPath)
|
||||
if self.vmwareHelper is None:
|
||||
self.log.warning("runtests.py | Failed to load "
|
||||
"VMware recording helper")
|
||||
return
|
||||
self.log.info("runtests.py | Starting VMware recording.")
|
||||
try:
|
||||
self.vmwareHelper.StartRecording()
|
||||
except Exception as e:
|
||||
self.log.warning("runtests.py | Failed to start "
|
||||
"VMware recording: (%s)" % str(e))
|
||||
self.vmwareHelper = None
|
||||
|
||||
def stopVMwareRecording(self):
|
||||
""" stops recording inside VMware VM using the recording helper dll """
|
||||
try:
|
||||
assert mozinfo.isWin
|
||||
if self.vmwareHelper is not None:
|
||||
self.log.info("runtests.py | Stopping VMware recording.")
|
||||
self.vmwareHelper.StopRecording()
|
||||
except Exception as e:
|
||||
self.log.warning("runtests.py | Failed to stop "
|
||||
"VMware recording: (%s)" % str(e))
|
||||
self.log.exception('Error stopping VMWare recording')
|
||||
|
||||
self.vmwareHelper = None
|
||||
|
||||
def runApp(self,
|
||||
testUrl,
|
||||
env,
|
||||
@ -2242,9 +2210,6 @@ class Mochitest(MochitestUtilsMixin):
|
||||
else:
|
||||
timeout = 330.0 # default JS harness timeout is 300 seconds
|
||||
|
||||
if options.vmwareRecording:
|
||||
self.startVMwareRecording(options)
|
||||
|
||||
# detect shutdown leaks for m-bc runs
|
||||
detectShutdownLeaks = mozinfo.info[
|
||||
"debug"] and options.browserChrome and not options.webapprtChrome
|
||||
@ -2276,8 +2241,6 @@ class Mochitest(MochitestUtilsMixin):
|
||||
status = 1
|
||||
|
||||
finally:
|
||||
if options.vmwareRecording:
|
||||
self.stopVMwareRecording()
|
||||
self.stopServers()
|
||||
|
||||
mozleak.process_leak_log(
|
||||
|
Loading…
x
Reference in New Issue
Block a user