Allow passing --no-daemon to test.py

Change-Id: I6c693c154a7a45648b6dca04b60da881b39af44e
diff --git a/tools/test.py b/tools/test.py
index dcff8c9..4ffed63 100755
--- a/tools/test.py
+++ b/tools/test.py
@@ -259,6 +259,10 @@
                         help='Pass --stacktrace to the gradle run',
                         default=False,
                         action='store_true')
+    result.add_argument('--no-daemon',
+                        help='Pass --no-daemon to the gradle run',
+                        default=False,
+                        action='store_true')
     result.add_argument(
         '--kotlin-compiler-dev',
         help='Specify to download a kotlin dev compiler and run '
@@ -352,7 +356,7 @@
     if options.stacktrace or utils.is_bot():
         gradle_args.append('--stacktrace')
 
-    if utils.is_bot():
+    if options.no_daemon or utils.is_bot():
         # Bots don't like dangling processes.
         gradle_args.append('--no-daemon')