Changeset 99398 in vbox for trunk/src/VBox/ValidationKit/tests/additions
- Timestamp:
- Apr 14, 2023 9:47:19 AM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 156848
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py
r99285 r99398 1477 1477 self.sPathVBoxServiceExeGst = oTestVm.pathJoin(self.oTstDrv.getGuestSystemAdminDir(oTestVm), 'VBoxService') \ 1478 1478 + base.exeSuff(); 1479 1480 # For some tests we need know the Guest Additions version, so fetch it now. 1481 self.tpAdditionsVer = self.oTstDrv.getGuestAdditionsVersion(oSession); 1479 1482 1480 1483 reporter.log("Active tests: %s" % (self.asTests,)); … … 3072 3075 sVBoxControl = "C:\\Program Files\\Oracle\\VirtualBox Guest Additions\\VBoxControl.exe"; 3073 3076 else: 3074 sImageOut = oTestVm.pathJoin(self.oTstDrv.getGuestSystemDir(oTestVm), 'ls'); 3077 # Really old guests (like OL 6) have their coreutils in /bin instead of /usr/bin. 3078 if self.oTstDrv.txsIsFile(oSession, oTxsSession, "/bin/ls", fIgnoreErrors = True): 3079 sImageOut = "/bin/ls"; 3080 else: 3081 sImageOut = oTestVm.pathJoin(self.oTstDrv.getGuestSystemDir(oTestVm), 'ls'); 3075 3082 if oTestVm.isLinux(): ## @todo check solaris and darwin. 3076 3083 sVBoxControl = "/usr/bin/VBoxControl"; # Symlink … … 3125 3132 [ tdTestExec(sCmd = sImageOut, asArgs = [ sImageOut, '/C', 'dir', '/S', 'stdouterr-non-existing' ]), 3126 3133 tdTestResultExec(fRc = True, iExitCode = 1) ], 3127 # Current working directory set (VBox >= 7.1).3128 [ tdTestExec(sCmd = sImageOut, sCwd = sTempDir, asArgs = [ sImageOut, '/C', 'dir', '/S', sSystemDir ]),3129 tdTestResultExec(fRc = True) ],3130 3134 ]; 3135 3136 if self.oTstDrv.isVersionEqualOrBigger(self.tpAdditionsVer, "7.1.0"): 3137 atExec.extend([ 3138 # Current working directory set (VBox >= 7.1). 3139 [ tdTestExec(sCmd = sImageOut, sCwd = sTempDir, asArgs = [ sImageOut, '/C', 'dir', '/S', sSystemDir ]), 3140 tdTestResultExec(fRc = True) ] 3141 ]); 3142 3131 3143 # atExec.extend([ 3132 3144 # FIXME: Failing tests. … … 3177 3189 [ tdTestExec(sCmd = sImageOut, asArgs = [ sImageOut, 'stdouterr-non-existing' ]), 3178 3190 tdTestResultExec(fRc = True, iExitCode = 2) ], 3179 # Current working directory set (VBox >= 7.1).3180 [ tdTestExec(sCmd = sImageOut, sCwd = sTempDir, asArgs = [ sImageOut, '-R', sSystemDir ]),3181 tdTestResultExec(fRc = True) ],3182 3191 ]; 3192 3193 if self.oTstDrv.isVersionEqualOrBigger(self.tpAdditionsVer, "7.1.0"): 3194 atExec.extend([ 3195 # Current working directory set (VBox >= 7.1). 3196 [ tdTestExec(sCmd = sImageOut, sCwd = sTempDir, asArgs = [ sImageOut, '-R', sSystemDir ]), 3197 tdTestResultExec(fRc = True) ] 3198 ]); 3199 3183 3200 # atExec.extend([ 3184 3201 # FIXME: Failing tests. … … 3231 3248 sCmd = sShell; 3232 3249 else: 3233 sCmd = oTestVm.pathJoin(self.oTstDrv.getGuestSystemDir(oTestVm), 'echo'); 3250 # Really old guests (like OL 6) have their coreutils in /bin instead of /usr/bin. 3251 if self.oTstDrv.txsIsFile(oSession, oTxsSession, "/bin/echo", fIgnoreErrors = True): 3252 sCmd = "/bin/echo"; 3253 else: 3254 sCmd = oTestVm.pathJoin(self.oTstDrv.getGuestSystemDir(oTestVm), 'echo'); 3234 3255 3235 3256 for _ in xrange(0, 16): … … 3899 3920 fUseDirList = False; 3900 3921 cEntriesPerRead = random.randrange(1, 32768); 3901 if self.oTstDrv.fpApiVer >= 7.1 and self.oTstDrv.uRevision >= 156485: 3922 if self.oTstDrv.fpApiVer >= 7.1 and self.oTstDrv.uRevision >= 156485 \ 3923 and self.oTstDrv.isVersionEqualOrBigger(self.tpAdditionsVer, "7.1.0"): 3902 3924 # Listing directories only is available for >= VBox 7.1. 3903 3925 fUseDirList = random.choice( [True, False] ); … … 3949 3971 fUseDirList = False; 3950 3972 cEntriesPerRead = random.randrange(1, 32768); 3951 if self.oTstDrv.fpApiVer >= 7.1 and self.oTstDrv.uRevision >= 156485: 3973 if self.oTstDrv.fpApiVer >= 7.1 and self.oTstDrv.uRevision >= 156485 \ 3974 and self.oTstDrv.isVersionEqualOrBigger(self.tpAdditionsVer, "7.1.0"): 3952 3975 # Listing directories only is available for >= VBox 7.1. 3953 3976 fUseDirList = random.choice( [True, False] );
Note:
See TracChangeset
for help on using the changeset viewer.