Print out the checked out commit hash
authorBruce Forstall <Bruce_Forstall@msn.com>
Thu, 9 Aug 2018 18:52:56 +0000 (11:52 -0700)
committerBruce Forstall <Bruce_Forstall@msn.com>
Thu, 9 Aug 2018 18:52:56 +0000 (11:52 -0700)
This is useful to see exactly which version of CoreFX you are testing against.

tests/scripts/run-corefx-tests.py

index cce760918eef0222c7acb7ca094aa13464d85664..a569aadd4c808d42ec3222ba9810ac72923621ab 100644 (file)
@@ -267,6 +267,15 @@ def main(args):
     if returncode != 0:
         sys.exit(1)
 
+    # Print the currently checked out commit hash. Mostly useful if you just checked
+    # out HEAD, which is the default.
+
+    command = "git rev-parse HEAD"
+    log(command)
+    returncode = 0 if testing else os.system(command)
+    if returncode != 0:
+        sys.exit(1)
+
     # On Unix, coreFx build.sh requires HOME to be set, and it isn't by default
     # under our CI system, so set it now.