Lines Matching defs:utils

55 from common             import utils;
126 if utils.getHostOs() in ('win', 'os2', 'haiku', 'dos'):
163 constants.tbreq.SIGNON_PARAM_OS: { self.VALUE: utils.getHostOs(), self.FN: None },
164 constants.tbreq.SIGNON_PARAM_OS_VERSION: { self.VALUE: utils.getHostOsVersion(), self.FN: None },
165 constants.tbreq.SIGNON_PARAM_CPU_ARCH: { self.VALUE: utils.getHostArch(), self.FN: None },
232 if utils.getHostOs() is 'win':
266 sHostOs = utils.getHostOs()
268 utils.sudoProcessCall(['/sbin/umount', sMountPoint]);
269 utils.sudoProcessCall(['/bin/mkdir', '-p', sMountPoint]);
270 utils.sudoProcessCall(['/usr/sbin/chown', str(os.getuid()), sMountPoint]); # pylint: disable=E1101
273 utils.processOutputChecked(['/sbin/mount_smbfs', '-o', 'automounted,nostreams,soft,noowners,noatime,rdonly',
281 utils.sudoProcessCall(['/bin/umount', sMountPoint]);
282 utils.sudoProcessCall(['/bin/mkdir', '-p', sMountPoint]);
284 utils.sudoProcessOutputChecked(['/bin/mount', '-t', 'cifs',
295 utils.sudoProcessOutputChecked(['/bin/mount', '-t', 'nfs',
304 utils.sudoProcessCall(['/sbin/umount', sMountPoint]);
305 utils.sudoProcessCall(['/bin/mkdir', '-p', sMountPoint]);
311 utils.sudoProcessOutputChecked(['/sbin/mount', '-F', 'smbfs',
322 utils.sudoProcessOutputChecked(['/sbin/mount', '-F', 'nfs',
334 utils.processCall(['net', 'use', sMountPoint, '/d']);
335 utils.processOutputChecked(['net', 'use', sMountPoint,
359 if not utils.isRunningFromCheckout():
361 self._sTestBoxHelper = os.path.join(g_ksValidationKitDir, utils.getHostOs(), utils.getHostArch(), \
366 utils.getHostOsDotArch(), sType, 'testboxscript', \
367 utils.getHostOs(), utils.getHostArch(), \
369 if utils.getHostOs() in ['win', 'os2']:
372 return utils.processOutputChecked([self._sTestBoxHelper, sCmd]).strip();
418 if utils.getHostOs() == 'linux':
423 sVar = utils.sudoProcessOutputChecked(['cat', '/sys/devices/virtual/dmi/id/product_uuid']);
429 elif utils.getHostOs() == 'win':
441 elif utils.getHostOs() == 'darwin':
443 sVar = utils.processOutputChecked(['/bin/sh', '-c',
452 elif utils.getHostOs() == 'solaris':
455 sVar = utils.processOutputChecked(['/bin/sh', '-c',
682 and utils.getHostOs() not in ['win', 'os2'] \
690 iRc = utils.sudoProcessCall(['/bin/rm', '-Rf', sFullName])
692 iRc = utils.sudoProcessCall(['/bin/rm', '-f', sFullName])
860 if utils.getHostOs() in ('win', 'os2'):
863 elif utils.getHostOs() == 'darwin':