How to use _run_grubby_prepare_args method in autotest

Best Python code snippet using autotest_python Github


Full Screen

...710 return True711 if d_name.lower() == 'suse' and d_version >= 12:712 return True713 return False714 def _run_grubby_prepare_args(self, arguments, include_bootloader=True):715 '''716 Prepares the argument list when running a grubby command717 '''718 args = []719 if self.path is None:720 self._set_path()721 args.append(self.path)722 if self.path is not None and not os.path.exists(self.path):723 self.log.error('grubby executable does not exist: "%s"', self.path)724 if not os.access(self.path, os.R_OK | os.X_OK):725 self.log.error('insufficient permissions (read and execute) '726 'for grubby executable: "%s"', self.path)727 # If a bootloader has been detected, that is, a mode has been set,728 # it's passed as the first command line argument to grubby729 if include_bootloader and self.bootloader is not None:730 args.append('--%s' % self.bootloader)731 # Override configuration file732 if self.opts is not None and self.opts.config_file:733 args.append('--config-file=%s' % self.opts.config_file)734 elif self._dist_uses_grub2():735 args.append('--config-file=/boot/grub2/grub.cfg')736 args += arguments737 return args738 def _run_grubby_get_output(self, arguments, include_bootloader=True):739 '''740 Utility function that runs grubby with arguments and returns output741 '''742 args = self._run_grubby_prepare_args(arguments, include_bootloader)743 return self._run_get_output(args)744 def _run_grubby_get_return(self, arguments, include_bootloader=True):745 '''746 Utility function that runs grubby with and returns status code747 '''748 args = self._run_grubby_prepare_args(arguments, include_bootloader)749 return self._run_get_return(args)750 def _extract_tarball(self, tarball, directory):751 '''752 Extract tarball into the an directory753 This code assume the first (or only) entry is the main directory754 :type tarball: string755 :param tarball: tarball file path756 :type directory: string757 :param directory: directory path758 :return: path of toplevel directory as extracted from tarball759 '''760 f = members = f.getmembers()762 topdir = members[0]...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:


You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run autotest automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?