Stop using sum(1).

toybox doesn't have the BSD sum, and adding it doesn't seem like a good
idea in 2018. I assumed this was for Linux/Mac portability (because the
Mac doesn't have md5sum), but I'm informed that this isn't used on macOS
anyway.

Bug: N/A
Test: treehugger
Change-Id: I7b0d53fd14904778b5a1a01dfd8d9913407207ff
diff --git a/build/Android.common_test.mk b/build/Android.common_test.mk
index c508fe7..17d0232 100644
--- a/build/Android.common_test.mk
+++ b/build/Android.common_test.mk
@@ -20,11 +20,12 @@
 include art/build/Android.common_path.mk
 
 # Directory used for temporary test files on the host.
-# Use a BSD checksum calculated from CWD and USER as one of the path
+# Use a hash calculated from CWD and USER as one of the path
 # components for the test output. This should allow us to run tests from
 # multiple repositories at the same time.
+# We only take the first few characters to keep paths short.
 ART_TMPDIR := $(if $(TMPDIR),$(TMPDIR),/tmp)
-ART_HOST_TEST_DIR := $(ART_TMPDIR)/test-art-$(shell echo $$CWD-${USER} | sum | cut -d ' ' -f1)
+ART_HOST_TEST_DIR := $(ART_TMPDIR)/test-art-$(shell echo $$CWD-${USER} | $(MD5SUM) | cut -c-5)
 
 # List of known broken tests that we won't attempt to execute. The test name must be the full
 # rule name such as test-art-host-oat-optimizing-HelloWorld64.