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.

Commit migrated from https://github.com/dotnet/coreclr/commit/5ceef2eccb16222ac8c1c64c3254ca7db3d287b9

src/coreclr/tests/scripts/run-corefx-tests.py

index cce7609..a569aad 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.