How to use _clean_project method in tempest

Best Python code snippet using tempest_python

release_project.py

Source:release_project.py Github

copy

Full Screen

...45 return True46def _complite_project(project_path):47 compileall.compile_dir(project_path)48 print "complite end"49def _clean_project(project_path):50 def clean_py():51 print "clean py begin"52 all_py = []53 for (dirpath, dirnames, filenames) in os.walk(project_path):54 # print dirpath, dirnames, filenames55 all_py += [os.path.join(dirpath, file) for file in filenames if file.endswith(".py")]56 for py_file in all_py:57 os.remove(py_file)58 print "clean py end"59 clean_py()60 def clean_svn():61 print "clean .svn begin"62 svn_info_path = os.path.join(project_path, ".svn")63 if os.path.exists(svn_info_path):64 shutil.rmtree(svn_info_path)65 print "clean .svn end"66 clean_svn()67def _cp_project(project_path, todir):68 if os.path.exists(todir):69 print "release输出的文件夹:%s 文件夹存在,需要删除文件夹吗?[y/n]" % todir70 if get_bool_input():71 shutil.rmtree(todir)72 else:73 print "exit"74 sys.exit(0)75 shutil.copytree(project_path, todir)76 print "cp project to: %s" % todir77def release_project(project_path, output_path, svn_check=True):78 print "***********release project begin*************"79 if svn_check:80 _check_project(project_path)81 _cp_project(project_path, output_path)82 _complite_project(output_path)83 _clean_project(output_path)84 print "***********release project end*************"85def creat_version(release_path, output_path, version, prefix="kiosk"):86 version = version.replace(".", "")87 pack_name = os.path.join(output_path, prefix + "_" + version + ".tgz")88 print pack_name89 _pack_project(release_path, pack_name)90 project_tgz = pack_name91 info_path = os.path.join(output_path, "version" + version)92 _split_file(project_tgz, info_path, prefix=prefix)93 _generate_download_info(project_tgz, info_path, files_prefix=prefix, version=version)94def _pack_project(release_path, pack_name):95 print "pack release path"96 do_cmd("gzip --rsyncable {pack_name} {release_path}".format(pack_name=pack_name, release_path=release_path))97 print "pack end: to %s" % pack_name...

Full Screen

Full Screen

Package.py

Source:Package.py Github

copy

Full Screen

...24 raise('缺少ExportOption.plist路径参数')25 self._project_dir = project_path26 self._ipa_path = ipa_path27 self._plist_path = plist_path28 self._clean_project()29 self._archive_project()30 self._export_ipa()31 def _clean_project(self):32 os.system('open %s' % self._get_xcodeproj_path())33 os.system('sleep 10')34 print("\033[32m********* 开始构建项目 ********* \033[0m")35 os.system('xcodebuild clean -project %s -scheme %s -configuration %s || exit' % 36 (self._get_xcodeproj_path(), self._get_scheme(), self._get_build_configuration()))37 def _archive_project(self):38 os.system('xcodebuild archive -project %s -scheme %s -configuration %s -archivePath %s || exit' % 39 (self._get_xcodeproj_path(), self._get_scheme(), self._get_build_configuration(), self._get_archive_path())) 40 if os.path.exists(self._get_archive_path()):41 print("\033[32;1m项目构建成功 🚀 🚀 🚀 \033[0m")42 else:43 print("\033[31;1marchive失败,请打开xcode检查错误信息 😢 😢 😢 \033[0m")44 exit()45 def _export_ipa(self):...

Full Screen

Full Screen

cli_tests.py

Source:cli_tests.py Github

copy

Full Screen

...34 assert_equal(b"hello\nworld\n", result.output)35@contextlib.contextmanager36def _vendorize_example(example_name):37 path = os.path.join(os.path.dirname(__file__), "../examples", example_name)38 _clean_project(path)39 _local.run(40 ["python-vendorize"],41 cwd=path,42 encoding="utf-8",43 )44 yield path45def _clean_project(path):46 vendor_path = os.path.join(path, "_vendor")47 if os.path.exists(vendor_path):...

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 tempest 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