fromupstream: support multiple '-t' args

It's nice to spell out multiple TEST= lines sometimes.

BUG=none
TEST=`fromupstream.py -t foo [...]` and
     `fromupstream.py -t test1 -t test2 [...]`

Change-Id: I2903322271ff9f88cafa747194f7a33cfa1be93c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/2367223
Tested-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Tzung-Bi Shih <tzungbi@chromium.org>
Commit-Queue: Tzung-Bi Shih <tzungbi@chromium.org>
diff --git a/contrib/fromupstream.py b/contrib/fromupstream.py
index a353f0d..626f119 100755
--- a/contrib/fromupstream.py
+++ b/contrib/fromupstream.py
@@ -405,7 +405,7 @@
 
     parser.add_argument('--bug', '-b',
                         type=str, help='BUG= line')
-    parser.add_argument('--test', '-t',
+    parser.add_argument('--test', '-t', action='append', default=[],
                         type=str, help='TEST= line')
     parser.add_argument('--crbug', action='append',
                         type=int, help='BUG=chromium: line')
@@ -461,7 +461,7 @@
         crbugs = ', '.join('chromium:%d' % x for x in args['crbug'])
         bug_lines += [x.strip(' ,') for x in _wrap_commit_line('BUG=', crbugs).split('\n')]
 
-    test_lines = [_wrap_commit_line('TEST=', args['test'])] if args['test'] else []
+    test_lines = [_wrap_commit_line('TEST=', x) for x in args['test']]
 
     if args['replace']:
         old_commit_message = _git(['show', '-s', '--format=%B', 'HEAD'])