misc: in crcchecker.py, don't check for uncommitted changes in CI 78/40678/1
authorDave Wallace <[email protected]>
Fri, 15 Mar 2024 01:41:00 +0000 (21:41 -0400)
committerDave Wallace <[email protected]>
Mon, 8 Apr 2024 22:44:18 +0000 (22:44 +0000)
Type: fix

Change-Id: I63260a953e54518b3084b62fccdb4af81315b229
Signed-off-by: Dave Wallace <[email protected]>
(cherry picked from commit 3a0d7d2c95e8b8087c20b99fed5bcf62fac027d9)

extras/scripts/crcchecker.py

index 01cb025..7dcdb68 100755 (executable)
@@ -82,13 +82,15 @@ def filelist_from_git_ls():
 
 def is_uncommitted_changes():
     """Returns true if there are uncommitted changes in the repo"""
-    git_status = "git status --porcelain -uno"
-    returncode = run(git_status.split(), stdout=PIPE, stderr=PIPE)
-    if returncode.returncode != 0:
-        sys.exit(returncode.returncode)
-
-    if returncode.stdout:
-        return True
+    # Don't run this check in the Jenkins CI
+    if os.getenv("FDIOTOOLS_IMAGE") is None:
+        git_status = "git status --porcelain -uno"
+        returncode = run(git_status.split(), stdout=PIPE, stderr=PIPE)
+        if returncode.returncode != 0:
+            sys.exit(returncode.returncode)
+
+        if returncode.stdout:
+            return True
     return False