summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbitbake/bin/bitbake-diffsigs29
1 files changed, 13 insertions, 16 deletions
diff --git a/bitbake/bin/bitbake-diffsigs b/bitbake/bin/bitbake-diffsigs
index 79f1d6a438..11b40b4e94 100755
--- a/bitbake/bin/bitbake-diffsigs
+++ b/bitbake/bin/bitbake-diffsigs
@@ -74,6 +74,7 @@ def find_compare_task(bbhandler, pn, taskname):
74 74
75 75
76parser = optparse.OptionParser( 76parser = optparse.OptionParser(
77 description = "Compares siginfo/sigdata files written out by BitBake",
77 usage = """ 78 usage = """
78 %prog -t recipename taskname 79 %prog -t recipename taskname
79 %prog sigdatafile1 sigdatafile2 80 %prog sigdatafile1 sigdatafile2
@@ -81,25 +82,21 @@ parser = optparse.OptionParser(
81 82
82parser.add_option("-t", "--task", 83parser.add_option("-t", "--task",
83 help = "find the signature data files for last two runs of the specified task and compare them", 84 help = "find the signature data files for last two runs of the specified task and compare them",
84 action="store_true", dest="taskmode") 85 action="store", dest="taskargs", nargs=2, metavar='recipename taskname')
85 86
86options, args = parser.parse_args(sys.argv) 87options, args = parser.parse_args(sys.argv)
87 88
88if len(args) == 1: 89if options.taskargs:
89 parser.print_help() 90 tinfoil = bb.tinfoil.Tinfoil()
91 tinfoil.prepare(config_only = True)
92 find_compare_task(tinfoil, options.taskargs[0], options.taskargs[1])
90else: 93else:
91 if options.taskmode: 94 if len(args) == 1:
92 tinfoil = bb.tinfoil.Tinfoil() 95 parser.print_help()
93 if len(args) < 3: 96 elif len(args) == 2:
94 logger.error("Please specify a recipe and task name") 97 output = bb.siggen.dump_sigfile(sys.argv[1])
95 sys.exit(1)
96 tinfoil.prepare(config_only = True)
97 find_compare_task(tinfoil, args[1], args[2])
98 else: 98 else:
99 if len(args) == 2: 99 output = bb.siggen.compare_sigfiles(sys.argv[1], sys.argv[2])
100 output = bb.siggen.dump_sigfile(sys.argv[1])
101 else:
102 output = bb.siggen.compare_sigfiles(sys.argv[1], sys.argv[2])
103 100
104 if output: 101 if output:
105 print '\n'.join(output) 102 print '\n'.join(output)