@@ -152,6 +152,7 @@ BENCHMARK_WRAPPER(VibratorBench, off, {
152152
153153BENCHMARK_WRAPPER (VibratorBench, setAmplitude, {
154154 if (!hasCapabilities (vibrator::Capabilities::AMPLITUDE_CONTROL, state)) {
155+ state.SkipWithMessage (" missing capability" );
155156 return ;
156157 }
157158
@@ -180,6 +181,7 @@ BENCHMARK_WRAPPER(VibratorBench, setAmplitude, {
180181
181182BENCHMARK_WRAPPER (VibratorBench, setAmplitudeCached, {
182183 if (!hasCapabilities (vibrator::Capabilities::AMPLITUDE_CONTROL, state)) {
184+ state.SkipWithMessage (" missing capability" );
183185 return ;
184186 }
185187
@@ -200,6 +202,7 @@ BENCHMARK_WRAPPER(VibratorBench, setAmplitudeCached, {
200202
201203BENCHMARK_WRAPPER (VibratorBench, setExternalControl, {
202204 if (!hasCapabilities (vibrator::Capabilities::EXTERNAL_CONTROL, state)) {
205+ state.SkipWithMessage (" missing capability" );
203206 return ;
204207 }
205208
@@ -221,6 +224,7 @@ BENCHMARK_WRAPPER(VibratorBench, setExternalControl, {
221224
222225BENCHMARK_WRAPPER (VibratorBench, setExternalControlCached, {
223226 if (!hasCapabilities (vibrator::Capabilities::EXTERNAL_CONTROL, state)) {
227+ state.SkipWithMessage (" missing capability" );
224228 return ;
225229 }
226230
@@ -239,6 +243,7 @@ BENCHMARK_WRAPPER(VibratorBench, setExternalControlCached, {
239243
240244BENCHMARK_WRAPPER (VibratorBench, setExternalAmplitudeCached, {
241245 if (!hasCapabilities (vibrator::Capabilities::EXTERNAL_AMPLITUDE_CONTROL, state)) {
246+ state.SkipWithMessage (" missing capability" );
242247 return ;
243248 }
244249
@@ -331,9 +336,11 @@ class VibratorEffectsBench : public VibratorBench {
331336
332337BENCHMARK_WRAPPER (VibratorEffectsBench, alwaysOnEnable, {
333338 if (!hasCapabilities (vibrator::Capabilities::ALWAYS_ON_CONTROL, state)) {
339+ state.SkipWithMessage (" missing capability" );
334340 return ;
335341 }
336342 if (!hasArgs (state)) {
343+ state.SkipWithMessage (" missing args" );
337344 return ;
338345 }
339346
@@ -357,9 +364,11 @@ BENCHMARK_WRAPPER(VibratorEffectsBench, alwaysOnEnable, {
357364
358365BENCHMARK_WRAPPER (VibratorEffectsBench, alwaysOnDisable, {
359366 if (!hasCapabilities (vibrator::Capabilities::ALWAYS_ON_CONTROL, state)) {
367+ state.SkipWithMessage (" missing capability" );
360368 return ;
361369 }
362370 if (!hasArgs (state)) {
371+ state.SkipWithMessage (" missing args" );
363372 return ;
364373 }
365374
@@ -384,6 +393,7 @@ BENCHMARK_WRAPPER(VibratorEffectsBench, alwaysOnDisable, {
384393
385394BENCHMARK_WRAPPER (VibratorEffectsBench, performEffect, {
386395 if (!hasArgs (state)) {
396+ state.SkipWithMessage (" missing args" );
387397 return ;
388398 }
389399
@@ -441,9 +451,11 @@ class VibratorPrimitivesBench : public VibratorBench {
441451
442452BENCHMARK_WRAPPER (VibratorPrimitivesBench, performComposedEffect, {
443453 if (!hasCapabilities (vibrator::Capabilities::COMPOSE_EFFECTS, state)) {
454+ state.SkipWithMessage (" missing capability" );
444455 return ;
445456 }
446457 if (!hasArgs (state)) {
458+ state.SkipWithMessage (" missing args" );
447459 return ;
448460 }
449461
@@ -468,4 +480,4 @@ BENCHMARK_WRAPPER(VibratorPrimitivesBench, performComposedEffect, {
468480 }
469481});
470482
471- BENCHMARK_MAIN ();
483+ BENCHMARK_MAIN ();
0 commit comments