6262 hdMachineType = flag .String ("hyperdisk-machine-type" , "c3-standard-4" , "Type of machine to provision instance on, or `none' to skip" )
6363 hdMinCpuPlatform = flag .String ("hyperdisk-min-cpu-platform" , "sapphirerapids" , "Minimum CPU architecture" )
6464
65+ // Some architectures don't have local ssd. Give way to opt out of tests like datacache.
66+ skipLocalSsdTests = flag .Bool ("skip-local-ssd-tests" , false , "Skip local ssd tests like datacache" )
67+
6568 testContexts = []* remote.TestContext {}
6669 hyperdiskTestContexts = []* remote.TestContext {}
6770 computeService * compute.Service
@@ -183,6 +186,13 @@ func NewDefaultTestContext(zone string, instanceNumber string) *remote.TestConte
183186 return NewTestContext (zone , * minCpuPlatform , * machineType , instanceNumber )
184187}
185188
189+ func getLocalSsdCount () int64 {
190+ if * skipLocalSsdTests {
191+ return 0
192+ }
193+ return common .LocalSSDCountForDataCache
194+ }
195+
186196func NewTestContext (zone , minCpuPlatform , machineType string , instanceNumber string ) * remote.TestContext {
187197 nodeID := fmt .Sprintf ("%s-%s-%s-%s" , * vmNamePrefix , zone , machineType , instanceNumber )
188198 klog .Infof ("Setting up node %s" , nodeID )
@@ -199,7 +209,7 @@ func NewTestContext(zone, minCpuPlatform, machineType string, instanceNumber str
199209 CloudtopHost : * cloudtopHost ,
200210 EnableConfidentialCompute : * enableConfidentialCompute ,
201211 ComputeService : computeService ,
202- LocalSSDCount : common . LocalSSDCountForDataCache ,
212+ LocalSSDCount : getLocalSsdCount () ,
203213 }
204214
205215 if machineType == * hdMachineType {
0 commit comments