Best Python code snippet using autotest_python
systemtap.py
Source:systemtap.py
...20 depdir = os.path.join(self.autodir, 'deps/systemtap')21 tarball_systemtap = utils.unmap_url(depdir, tarball_systemtap, self.tmpdir)22 tarball_elfutils = utils.unmap_url(depdir, tarball_elfutils, self.tmpdir)23 srcdir = os.path.join(depdir, 'src')24 utils.extract_tarball_to_dir(tarball_systemtap, srcdir)25 elfdir = os.path.join(srcdir, 'elfutils')26 utils.extract_tarball_to_dir(tarball_elfutils, elfdir)27 self.job.setup_dep(['dejagnu'])28 if not local:29 self.job.setup_dep(['systemtap'])30 # Try grabbing the systemtap tarball out of the deps directory31 depdir = os.path.join(self.autodir, 'deps/systemtap')32 if os.path.exists(os.path.join(depdir, tarball_systemtap)):33 tarball = utils.unmap_url(depdir, tarball_systemtap, self.tmpdir)34 else:35 tarball = utils.unmap_url(self.bindir, tarball_systemtap, self.tmpdir)36 utils.extract_tarball_to_dir(tarball_systemtap, self.srcdir)37 testsuite = os.path.join(self.srcdir, 'testsuite')38 os.chdir(testsuite)39 utils.configure()40 utils.make()41 # Run a simple systemtap script to make sure systemtap and the42 # kernel debuginfo packages are correctly installed43 script = "PATH=%s/bin:$PATH stap -c /bin/true -e 'probe syscall.read { exit() }'" % self.systemtap_dir44 try:45 utils.system(script)46 except Exception:47 raise error.TestError('simple systemtap test failed, kernel debuginfo package may be missing: %s' % script)48 def run_once(self):49 testsuite = os.path.join(self.srcdir, 'testsuite')50 os.chdir(testsuite)...
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.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!