VirtualBox

source: vbox/trunk/src/VBox/ValidationKit/tests/smoketests/tdExoticOrAncient1.py@ 78138

Last change on this file since 78138 was 76553, checked in by vboxsync, 6 years ago

scm --update-copyright-year

  • Property svn:eol-style set to LF
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 3.7 KB
Line 
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3# $Id: tdExoticOrAncient1.py 76553 2019-01-01 01:45:53Z vboxsync $
4
5"""
6VirtualBox Validation Kit - Exotic and/or ancient OSes #1.
7"""
8
9__copyright__ = \
10"""
11Copyright (C) 2010-2019 Oracle Corporation
12
13This file is part of VirtualBox Open Source Edition (OSE), as
14available from http://www.virtualbox.org. This file is free software;
15you can redistribute it and/or modify it under the terms of the GNU
16General Public License (GPL) as published by the Free Software
17Foundation, in version 2 as it comes in the "COPYING" file of the
18VirtualBox OSE distribution. VirtualBox OSE is distributed in the
19hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
20
21The contents of this file may alternatively be used under the terms
22of the Common Development and Distribution License Version 1.0
23(CDDL) only, as it comes in the "COPYING.CDDL" file of the
24VirtualBox OSE distribution, in which case the provisions of the
25CDDL are applicable instead of those of the GPL.
26
27You may elect to license modified versions of this file under the
28terms and conditions of either the GPL or the CDDL or both.
29"""
30__version__ = "$Revision: 76553 $"
31
32
33# Standard Python imports.
34import os;
35import sys;
36
37# Only the main script needs to modify the path.
38try: __file__
39except: __file__ = sys.argv[0];
40g_ksValidationKitDir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))));
41sys.path.append(g_ksValidationKitDir);
42
43# Validation Kit imports.
44from testdriver import reporter;
45from testdriver import vbox;
46
47
48class tdExoticOrAncient1(vbox.TestDriver):
49 """
50 VBox exotic and/or ancient OSes #1.
51 """
52
53 def __init__(self):
54 vbox.TestDriver.__init__(self);
55 self.asRsrcs = None;
56 self.oTestVmSet = self.oTestVmManager.selectSet( self.oTestVmManager.kfGrpAncient
57 | self.oTestVmManager.kfGrpExotic);
58
59 #
60 # Overridden methods.
61 #
62 def showUsage(self):
63 rc = vbox.TestDriver.showUsage(self);
64 return rc;
65
66 def parseOption(self, asArgs, iArg):
67 return vbox.TestDriver.parseOption(self, asArgs, iArg);
68
69 def actionVerify(self):
70 if self.sVBoxValidationKitIso is None or not os.path.isfile(self.sVBoxValidationKitIso):
71 reporter.error('Cannot find the VBoxValidationKit.iso! (%s)'
72 'Please unzip a Validation Kit build in the current directory or in some parent one.'
73 % (self.sVBoxValidationKitIso,) );
74 return False;
75 return vbox.TestDriver.actionVerify(self);
76
77 def actionConfig(self):
78 # Make sure vboxapi has been imported so we can use the constants.
79 if not self.importVBoxApi():
80 return False;
81
82 assert self.sVBoxValidationKitIso is not None;
83 return self.oTestVmSet.actionConfig(self, sDvdImage = self.sVBoxValidationKitIso);
84
85 def actionExecute(self):
86 """
87 Execute the testcase.
88 """
89 return self.oTestVmSet.actionExecute(self, self.testOneVmConfig)
90
91
92 #
93 # Test execution helpers.
94 #
95
96 def testOneVmConfig(self, oVM, oTestVm):
97 """
98 Runs the specified VM thru test #1.
99 """
100
101 # Simple test.
102 self.logVmInfo(oVM);
103 if oTestVm.fGrouping & self.oTestVmManager.kfGrpNoTxs:
104 sResult = self.runVmAndMonitorComRawFile(oTestVm.sVmName, oTestVm.sCom1RawFile);
105 return sResult == 'PASSED';
106 oSession, _ = self.startVmAndConnectToTxsViaTcp(oTestVm.sVmName, fCdWait = True);
107 if oSession is not None:
108 return self.terminateVmBySession(oSession);
109 return False;
110
111if __name__ == '__main__':
112 sys.exit(tdExoticOrAncient1().main(sys.argv));
113
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette