From: Aleksander Mistewicz Date: Wed, 16 Nov 2016 13:48:52 +0000 (+0100) Subject: Add --tizen3 argument to tsp/scripts/publish.py X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8ede8d0bc79eb9e2a2573d5063d6054edff1bbc0;p=tools%2Ftestlab%2Fmajor.git Add --tizen3 argument to tsp/scripts/publish.py Change-Id: I7b2c8d9d10efcd82022f04d36b63619ac29ee99b Signed-off-by: Aleksander Mistewicz --- diff --git a/tsp/scripts/publish.py b/tsp/scripts/publish.py index a08ec0e..89c2efb 100755 --- a/tsp/scripts/publish.py +++ b/tsp/scripts/publish.py @@ -65,7 +65,7 @@ def print_row(row, color): print template.render(build_nr=build_nr, sr=sr, row=[date, build_nr, target],\ status=status, target=target, color=color, screenshotable=SCREENSHOTABLE) -def print_view(dbpath): +def print_view(dbpath, tizen3): def next_color(col): return COLORS[(COLORS.index(col) + 1) % len(COLORS)] conn = sqlite3.connect(dbpath) @@ -76,6 +76,8 @@ def print_view(dbpath): prev_sr = '' for row in testresults: sr=row[0] + if tizen3 and not '-3.0-' in sr: + continue if not sr == prev_sr: prev_sr = sr col = next_color(col) @@ -88,6 +90,10 @@ def parse_arguments(): parser.add_argument("db3", metavar='', type=str, help='database path') + parser.add_argument("-3", "--tizen3", + action="store_true", dest="tizen3", + help='Print results for Tizen 3.0 only') + args = parser.parse_args() return args @@ -95,7 +101,7 @@ def parse_arguments(): def main(): args = parse_arguments() if args.db3: - print_view(args.db3) + print_view(args.db3, args.tizen3) if __name__ == '__main__': main()