On Tue, 2014-11-04 at 13:52 +0100, Vincent Guittot wrote: > The dry run option "-d" only generates a output json file and doesn't call > rt-app. The output file can be then used with rt-app > > Typical use should be: > workgen -d -o <output file> <input file> >
Thank you Vincent. It looks ok to me, based on my very limited Phyton skills. Regards, Ivan > Signed-off-by: Vincent Guittot <vincent.guit...@linaro.org> > --- > doc/workgen | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/doc/workgen b/doc/workgen > index 4951086..9a0d7cd 100755 > --- a/doc/workgen > +++ b/doc/workgen > @@ -150,9 +150,10 @@ if __name__ == '__main__': > outfile = "unikid.json" > selfupdate = 0 > verbose = 0 > + dry_run = False > > try: > - opts, args = getopt.getopt(sys.argv[1:], "o:av") > + opts, args = getopt.getopt(sys.argv[1:], "o:avd") > except getopt.GetoptError as err: > print str(err) # will print something like "option -a not recognized" > sys.exit(2) > @@ -164,15 +165,18 @@ if __name__ == '__main__': > selfupate = 1 > if o == "-v": > verbose = 1 > + if o == "-d": > + dry_run = True > > + for f in args: > if selfupdate: > outfile = f > > - for f in args: > check_suspend_json(f, outfile) > check_unikid_json(outfile, outfile) > > - subprocess.call(["rt-app", outfile]) > + if not dry_run: > + subprocess.call(["rt-app", outfile]) > > > > _______________________________________________ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev