SF: Optionally skip slow unittests
TimeStatsTest::canDumpWithInvalidMaxLayers can take many seconds to run
(even a full minute, depending on the target).
Add a new flag "--no-slow" for libsurfaceflinger_unittests which will
cause it to skip slow tests like these, and add a check to that test
which checks for that flag to skip it.
To run use it with atest, you need to use:
atest libsurfaceflinger_unittest -- --module-arg libsurfaceflinger_unittest:native-test-flag:--no-slow
Bug: None
Test: atest libsurfaceflinger_unittest
Change-Id: I433c1707eb52866fb9f5c61956db338cc5c58723
diff --git a/services/surfaceflinger/tests/unittests/Android.bp b/services/surfaceflinger/tests/unittests/Android.bp
index 42b7146..1a13f77 100644
--- a/services/surfaceflinger/tests/unittests/Android.bp
+++ b/services/surfaceflinger/tests/unittests/Android.bp
@@ -24,6 +24,7 @@
},
srcs: [
":libsurfaceflinger_sources",
+ "libsurfaceflinger_unittest_main.cpp",
"CompositionTest.cpp",
"DisplayIdentificationTest.cpp",
"DisplayTransactionTest.cpp",