diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2017-08-03 13:15:04 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2017-08-03 13:19:47 +0100 |
commit | b09e4ca69b4dca6fd9d2e98a3722d765f86c837f (patch) | |
tree | 6b8044d29eaaf43066fce365eeb6e1f37111848c /build-aux/gen-installed-test.py | |
parent | 861a6dbea289d1ed98af1f66eb8024bc04464bd9 (diff) | |
download | gdk-pixbuf-b09e4ca69b4dca6fd9d2e98a3722d765f86c837f.tar.gz |
Move all aux scripts to their own directory
This makes it easier to find them and reference them.
Diffstat (limited to 'build-aux/gen-installed-test.py')
-rw-r--r-- | build-aux/gen-installed-test.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/build-aux/gen-installed-test.py b/build-aux/gen-installed-test.py new file mode 100644 index 000000000..745abf339 --- /dev/null +++ b/build-aux/gen-installed-test.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python3 + +import sys +import os +import argparse + +def write_template(filename, data): + with open(filename, 'w') as f: + f.write(data) + +def build_template(bindir, binname): + return "[Test]\nType=session\nExec={}\n".format(os.path.join(bindir, binname)) + +argparser = argparse.ArgumentParser(description='Generate installed-test data.') +argparser.add_argument('--testbindir', metavar='dir', help='Installed test directory') +argparser.add_argument('--testbin', metavar='name', help='Installed test name') +argparser.add_argument('output', help='Output file') + +args = argparser.parse_args() + +write_template(args.output, build_template(args.testbindir, args.testbin)) |