diff options
author | Vincent Guittot <vincent.guittot@linaro.org> | 2014-11-04 11:54:37 +0100 |
---|---|---|
committer | Vincent Guittot <vincent.guittot@linaro.org> | 2014-11-04 11:54:37 +0100 |
commit | 869b5c6f42549459cba12856ce62312c9cae73cb (patch) | |
tree | 15ca42b962d2039ba6e0fb641a0667f43ff988ac /doc | |
parent | 1cf9f3aa4237532cd099a8b15f64a3605a150570 (diff) |
add a dry run option for workgen
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>
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Diffstat (limited to 'doc')
-rwxr-xr-x | doc/workgen | 10 |
1 files 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]) |