support passing the new test-logging flags through build.py

Change-Id: Id37c1ae07b4043947d32ef7efa17d24f471949f1
diff --git a/aos/build/build.py b/aos/build/build.py
index 2e456f1..5be0950 100755
--- a/aos/build/build.py
+++ b/aos/build/build.py
@@ -670,6 +670,7 @@
                            Defaults to everything.
   extra_flag...            Extra flags associated with the targets.
                            --gtest_*: Arguments to pass on to tests.
+                           --print_logs, --log_file=*: More test arguments.
 
 Specifying targets:
  Targets are combinations of architecture, compiler, and debug flags. Which
@@ -755,12 +756,13 @@
       continue
     if arg == '-h' or arg == '--help':
       print_help(0)
-    if re.match('^--gtest_.*$', arg):
+    if (re.match('^--gtest_.*$', arg) or arg == '--print-logs' or
+        re.match('^--log_file=.*$', arg)):
       if args.action_name == 'tests':
         args.extra_flags.append(arg)
         continue
       else:
-        print_help(1, '--gtest_* is only valid for tests')
+        print_help(1, '%s is only valid for tests' % arg)
     if args.platform:
       args.targets.append(arg)
     else: