Add test_that launching script to path

Add a script that launches autotest source tree's copy
of test_that to the chroot path.

CQ-DEPEND=CL:Iaeb425cb5575ceb67f868d3c8d8343a58255cae8

BUG=chromium:236471
TEST=If source tree test_that.py does not exist, script errors out with
appropriate message. Otherwise, test_that.py is launched and command
line args are passed along correctly.

Change-Id: I940e09d6986fe049eb4c94a91e3e484aabccd7a4
Reviewed-on: https://gerrit.chromium.org/gerrit/49496
Tested-by: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Queue: Aviv Keshet <akeshet@chromium.org>
diff --git a/Makefile b/Makefile
index 341d12e..ebd9865 100644
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,7 @@
 	install -m 0644 lib/constants.py "${DESTDIR}/usr/lib/crostestutils"
 	install -m 0755 cros_run_unit_tests "${DESTDIR}/usr/bin"
 	install -m 0755 run_remote_tests.sh ${DESTDIR}/usr/bin
+	install -m 0755 test_that ${DESTDIR}/usr/bin
 	install -m 0644 unit_test_black_list.txt \
 		"${DESTDIR}/usr/share/crostestutils"
 	install -m 0755 utils_py/generate_test_report.py \
diff --git a/test_that b/test_that
new file mode 100755
index 0000000..4776de5
--- /dev/null
+++ b/test_that
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+# Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+SCR="/mnt/host/source/src/third_party/autotest/files/site_utils/test_that.py"
+
+if [ ! -f $SCR ]; then
+    echo "You appear to have a minilayout checkout, without autotest and"
+    echo "test_that.py available in your source tree. Aborting."
+    exit 1
+fi
+
+sudo $SCR $@
\ No newline at end of file