5858 hdMachineType = flag .String ("hyperdisk-machine-type" , "c3-standard-4" , "Type of machine to provision instance on" )
5959 hdMinCpuPlatform = flag .String ("hyperdisk-min-cpu-platform" , "sapphirerapids" , "Minimum CPU architecture" )
6060
61+ // Some architectures don't have local ssd. Give way to opt out of tests like datacache.
62+ skipLocalSsdTests = flag .Bool ("skip-local-ssd-tests" , false , "Skip local ssd tests like datacache" )
63+
6164 testContexts = []* remote.TestContext {}
6265 hyperdiskTestContexts = []* remote.TestContext {}
6366 computeService * compute.Service
@@ -177,6 +180,13 @@ func NewDefaultTestContext(zone string, instanceNumber string) *remote.TestConte
177180 return NewTestContext (zone , * minCpuPlatform , * machineType , instanceNumber )
178181}
179182
183+ func getLocalSsdCount () int64 {
184+ if * skipLocalSsdTests {
185+ return 0
186+ }
187+ return common .LocalSSDCountForDataCache
188+ }
189+
180190func NewTestContext (zone , minCpuPlatform , machineType string , instanceNumber string ) * remote.TestContext {
181191 nodeID := fmt .Sprintf ("%s-%s-%s-%s" , * vmNamePrefix , zone , machineType , instanceNumber )
182192 klog .Infof ("Setting up node %s" , nodeID )
@@ -193,7 +203,7 @@ func NewTestContext(zone, minCpuPlatform, machineType string, instanceNumber str
193203 CloudtopHost : * cloudtopHost ,
194204 EnableConfidentialCompute : * enableConfidentialCompute ,
195205 ComputeService : computeService ,
196- LocalSSDCount : common . LocalSSDCountForDataCache ,
206+ LocalSSDCount : getLocalSsdCount () ,
197207 }
198208
199209 if machineType == * hdMachineType {
0 commit comments