Index: /trunk/src/VBox/ValidationKit/testdriver/vbox.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testdriver/vbox.py	(revision 61352)
+++ /trunk/src/VBox/ValidationKit/testdriver/vbox.py	(revision 61353)
@@ -933,17 +933,9 @@
         return fRc;
 
-    def importVBoxApi(self):
-        """
-        Import the 'vboxapi' module from the VirtualBox build we're using and
-        instantiate the two basic objects.
-
-        This will try detect an development or installed build if no build has
-        been associated with the driver yet.
-        """
-        if self.fImportedVBoxApi:
-            return True;
-
-        ## @todo split up this messy function.
-
+    def _makeEnvironmentChanges(self):
+        """
+        Make the necessary VBox related environment changes.
+        Children not importing the VBox API should call this.
+        """
         # Make sure we've got our own VirtualBox config and VBoxSVC (on XPCOM at least).
         if not self.fUseDefaultSvc:
@@ -951,4 +943,18 @@
             sUser = os.environ.get('USERNAME', os.environ.get('USER', os.environ.get('LOGNAME', 'unknown')));
             os.environ['VBOX_IPC_SOCKETID'] = sUser + '-VBoxTest';
+        return True;
+
+    def importVBoxApi(self):
+        """
+        Import the 'vboxapi' module from the VirtualBox build we're using and
+        instantiate the two basic objects.
+
+        This will try detect an development or installed build if no build has
+        been associated with the driver yet.
+        """
+        if self.fImportedVBoxApi:
+            return True;
+
+        self._makeEnvironmentChanges();
 
         # Do the detecting.
Index: /trunk/src/VBox/ValidationKit/tests/unittests/tdUnitTest1.py
===================================================================
--- /trunk/src/VBox/ValidationKit/tests/unittests/tdUnitTest1.py	(revision 61352)
+++ /trunk/src/VBox/ValidationKit/tests/unittests/tdUnitTest1.py	(revision 61353)
@@ -376,4 +376,5 @@
 
         self._figureVersion();
+        self._makeEnvironmentChanges();
 
         self.testRunUnitTestsSet(r'^tst*', 'testcase')
