summaryrefslogtreecommitdiff
path: root/tests/kms-test-pageflip.py
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-07-31 17:46:34 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-07-31 18:15:43 +0300
commit2ce4e51cfc5be4b4aeeae331f9accffad46e6e1b (patch)
tree05d19d2e0aa7b50f46f4523c954929ea75a7b704 /tests/kms-test-pageflip.py
parent986f7f64845736c6bdb7bf1380a1c3ac06db48fd (diff)
tests: Only call execute() if the test is run directly
Only run a test automatically if the Python test script is executed directly. This will allow importing tests as modules in a test runner. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'tests/kms-test-pageflip.py')
-rwxr-xr-xtests/kms-test-pageflip.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/kms-test-pageflip.py b/tests/kms-test-pageflip.py
index 14bea0a..1bb1214 100755
--- a/tests/kms-test-pageflip.py
+++ b/tests/kms-test-pageflip.py
@@ -118,4 +118,6 @@ class PageFlipTest(kmstest.KMSTest):
f'({self.flips}/{frames} frames in {interval} s)')
self.success()
-PageFlipTest().execute()
+
+if __name__ == '__main__':
+ PageFlipTest().execute()