How to use trim_custom_directories method in autotest

Best Python code snippet using autotest_python

base_packages.py

Source:base_packages.py Github

copy

Full Screen

...77 repo_run_command(repo, 'touch %s' % repo_testfile).stdout.strip()78 repo_run_command(repo, 'rm ' + repo_testfile)79 except error.CmdError:80 raise error.RepoWriteError('Unable to write to ' + repo)81def trim_custom_directories(repo, older_than_days=None):82 if not repo:83 return84 if older_than_days is None:85 older_than_days = global_config.global_config.get_config_value(86 'PACKAGES', 'custom_max_age', type=int, default=40)87 cmd = 'find . -type f -atime +%s -exec rm -f {} \;' % older_than_days88 repo_run_command(repo, cmd, ignore_status=True)89class RepositoryFetcher(object):90 url = None91 def fetch_pkg_file(self, filename, dest_path):92 """ Fetch a package file from a package repository.93 @param filename: The filename of the package file to fetch.94 @param dest_path: Destination path to download the file to.95 @raises PackageFetchError if the fetch failed...

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