unit-test.py: ensure TEST_ONLY looked at for all

Noticed that cmake and meson were not honoring this env variable

Tested:
Verified meson based build system acted correctly with this change

Change-Id: I5e98588daf68e2fedcacd61df58d795843931329
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/scripts/unit-test.py b/scripts/unit-test.py
index fe29daf..bbc24ff 100755
--- a/scripts/unit-test.py
+++ b/scripts/unit-test.py
@@ -726,6 +726,9 @@
             check_call_cmd('ctest', '.')
 
     def analyze(self):
+        if TEST_ONLY:
+            return
+
         if os.path.isfile('.clang-tidy'):
             check_call_cmd('run-clang-tidy-8.py', '-p', '.')
         maybe_make_valgrind()
@@ -883,6 +886,9 @@
             raise Exception('Valgrind tests failed')
 
     def analyze(self):
+        if TEST_ONLY:
+            return
+
         self._maybe_valgrind()
 
         # Run clang-tidy only if the project has a configuration