How to use test_boot method in autotest

Best Python code snippet using autotest_python

test_linux_boot.py

Source:test_linux_boot.py Github

copy

Full Screen

...29if config.bin_path:30 resource_path = config.bin_path31else:32 resource_path = joinpath(absdirpath(__file__), "..", "resources")33def test_boot(34 cpu: str,35 num_cpus: int,36 cache_type: str,37 memory_class: str,38 length: str,39 to_tick: Optional[int] = None,40):41 name = "{}-cpu_{}-cores_{}_{}_riscv-boot-test".format(42 cpu, str(num_cpus), cache_type, memory_class)43 verifiers = []44 exit_regex = re.compile(45 "Exiting @ tick {} because simulate\(\) limit reached".format(46 str(to_tick)47 )48 )49 verifiers.append(verifier.MatchRegex(exit_regex))50 config_args=[51 "--cpu",52 cpu,53 "--num-cpus",54 str(num_cpus),55 "--mem-system",56 cache_type,57 "--dram-class",58 memory_class,59 "--resource-directory",60 resource_path,61 ]62 if to_tick:63 name += "_to-tick"64 config_args += ["--tick-exit", str(to_tick)]65 gem5_verify_config(66 name=name,67 verifiers=verifiers,68 fixtures=(),69 config=joinpath(70 config.base_dir,71 "tests",72 "gem5",73 "configs",74 "riscv_boot_exit_run.py",75 ),76 config_args=config_args,77 valid_isas=(constants.riscv_tag,),78 valid_hosts=constants.supported_hosts,79 length=length,80 )81#### The quick (pre-submit/Kokoro) tests ####82test_boot(83 cpu="atomic",84 num_cpus=1,85 cache_type="classic",86 memory_class="SingleChannelDDR3_1600",87 length=constants.quick_tag,88 to_tick=10000000000, # Simulates 1/100th of a second.89)90test_boot(91 cpu="timing",92 num_cpus=1,93 cache_type="classic",94 memory_class="SingleChannelDDR3_2133",95 length=constants.quick_tag,96 to_tick=10000000000,97)98test_boot(99 cpu="minor",100 num_cpus=1,101 cache_type="classic",102 memory_class="SingleChannelDDR3_2133",103 length=constants.quick_tag,104 to_tick=10000000000,105)106test_boot(107 cpu="minor",108 num_cpus=4,109 cache_type="classic",110 memory_class="SingleChannelDDR3_2133",111 length=constants.quick_tag,112 to_tick=10000000000,113)114test_boot(115 cpu="minor",116 num_cpus=1,117 cache_type="mi_example",118 memory_class="SingleChannelDDR3_2133",119 length=constants.quick_tag,120 to_tick=10000000000,121)122test_boot(123 cpu="minor",124 num_cpus=8,125 cache_type="mi_example",126 memory_class="SingleChannelDDR3_2133",127 length=constants.quick_tag,128 to_tick=10000000000,129)130test_boot(131 cpu="timing",132 num_cpus=1,133 cache_type="mi_example",134 memory_class="SingleChannelDDR4_2400",135 length=constants.quick_tag,136 to_tick=10000000000,137)138test_boot(139 cpu="o3",140 num_cpus=1,141 cache_type="classic",142 memory_class="DualChannelDDR3_1600",143 length=constants.quick_tag,144 to_tick=10000000000,145)146test_boot(147 cpu="timing",148 num_cpus=4,149 cache_type="classic",150 memory_class="DualChannelDDR3_2133",151 length=constants.quick_tag,152 to_tick=10000000000,153)154test_boot(155 cpu="timing",156 num_cpus=4,157 cache_type="mi_example",158 memory_class="DualChannelDDR4_2400",159 length=constants.quick_tag,160 to_tick=10000000000,161)162#### The long (Nightly) tests ####163# Due to Nightly test timeout issues, outlined here:164# https://gem5.atlassian.net/browse/GEM5-1120, these tests have been disabled165# until the exact error causing the Nightly tests to timeout is established.166# test_boot(167# cpu="atomic",168# num_cpus=1,169# cache_type="classic",170# memory_class="HBM2Stack",171# length=constants.long_tag,172# )173# test_boot(174# cpu="timing",175# num_cpus=1,176# cache_type="mi_example",177# memory_class="SingleChannelLPDDR3_1600",178# length=constants.long_tag,179# )180# test_boot(181# cpu="timing",182# num_cpus=4,183# cache_type="mi_example",184# memory_class="DualChannelDDR4_2400",185# length=constants.long_tag,186# )187# test_boot(188# cpu="atomic",189# num_cpus=4,190# cache_type="classic",191# memory_class="DualChannelLPDDR3_1600",192# length=constants.long_tag,193# )194# test_boot(195# cpu="o3",196# num_cpus=8,197# cache_type="mi_example",198# memory_class="HBM2Stack",199# length=constants.long_tag,...

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