How to use unmap_url method in autotest

Best Python code snippet using autotest_python

systemtap.py

Source:systemtap.py Github

copy

Full Screen

...14 self.systemtap_dir = os.path.join(self.autodir,15 'deps/systemtap/systemtap')16 def setup(self, local=False, tarball_systemtap='systemtap-0.9.5.tar.gz', tarball_elfutils='elfutils-0.140.tar.bz2'):17 depdir = os.path.join(self.autodir, 'deps/systemtap')18 tarball_systemtap = utils.unmap_url(depdir, tarball_systemtap, self.tmpdir)19 tarball_elfutils = utils.unmap_url(depdir, tarball_elfutils, self.tmpdir)20 srcdir = os.path.join(depdir, 'src')21 utils.extract_tarball_to_dir(tarball_systemtap, srcdir)22 elfdir = os.path.join(srcdir, 'elfutils')23 utils.extract_tarball_to_dir(tarball_elfutils, elfdir)24 self.job.setup_dep(['dejagnu'])25 if local == False:26 self.job.setup_dep(['systemtap'])27 # Try grabbing the systemtap tarball out of the deps directory28 depdir = os.path.join(self.autodir, 'deps/systemtap')29 if os.path.exists(os.path.join(depdir, tarball_systemtap)):30 tarball = utils.unmap_url(depdir, tarball_systemtap, self.tmpdir)31 else:32 tarball = utils.unmap_url(self.bindir, tarball_systemtap, self.tmpdir)33 utils.extract_tarball_to_dir(tarball_systemtap, self.srcdir)34 testsuite = os.path.join(self.srcdir, 'testsuite')35 os.chdir(testsuite)36 utils.configure()37 utils.make()38 # Run a simple systemtap script to make sure systemtap and the39 # kernel debuginfo packages are correctly installed40 script = "PATH=%s/bin:$PATH stap -c /bin/true -e 'probe syscall.read { exit() }'" % self.systemtap_dir41 try:42 utils.system(script)43 except:44 raise error.TestError('simple systemtap test failed, kernel debuginfo package may be missing: %s' % script)45 def run_once(self):46 testsuite = os.path.join(self.srcdir, 'testsuite')...

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:

YouTube

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?

Helpful

NotHelpful