def _verify_machine_local(self):
     binary = os.path.join(self.autodir, CLIENT_BINARY)
     try:
         self.host.run('test -x %s' % binary)
     except:
         raise error.AutoservInstallError("Autotest does not appear "
                                          "to be installed")
Exemple #2
0
 def _find_installable_dir(cls, host):
     client_autodir_paths = cls.get_client_autodir_paths(host)
     for path in client_autodir_paths:
         try:
             host.run('mkdir -p %s' % utils.sh_escape(path))
             host.run('test -w %s' % utils.sh_escape(path))
             return path
         except error.AutoservRunError:
             logging.debug('Failed to create %s', path)
     raise error.AutoservInstallError(
         'Unable to find a place to install Autotest; tried %s' %
         ', '.join(client_autodir_paths))
Exemple #3
0
    def verify_machine(self):
        binary = os.path.join(self.autodir, 'autotest')
        try:
            self.host.run('ls %s > /dev/null 2>&1' % binary)
        except:
            raise error.AutoservInstallError(
                "Autotest does not appear to be installed")

        if not self.parallel_flag:
            tmpdir = os.path.join(self.autodir, 'tmp')
            download = os.path.join(self.autodir, 'tests/download')
            self.host.run('umount %s' % tmpdir, ignore_status=True)
            self.host.run('umount %s' % download, ignore_status=True)
Exemple #4
0
    def verify_machine(self):
        system_wide = True
        binary = os.path.join('/usr/bin/autotest-local')
        try:
            self.host.run('test -x %s' % binary)
        except:
            system_wide = False

        if not system_wide:
            binary = os.path.join(self.autodir, 'autotest')
            try:
                self.host.run('test -x %s' % binary)
            except:
                raise error.AutoservInstallError(
                    "Autotest does not appear to be installed")

        if not self.parallel_flag:
            tmpdir = os.path.join(self.autodir, 'tmp')
            download = os.path.join(self.autodir, 'tests/download')
            self.host.run('umount %s' % tmpdir, ignore_status=True)
            self.host.run('umount %s' % download, ignore_status=True)
 def _verify_machine_system_wide(self):
     if not _client_system_wide_install(self.host):
         raise error.AutoservInstallError("Autotest does not appear "
                                          "to be installed")