diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2017-08-02 13:14:29 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2017-08-02 13:14:29 +0100 |
commit | 5e669da4a655868d74833a6e3cc89a803f430aad (patch) | |
tree | 6f3397f1db23c7b1fc5a27f952c70e9f5aed8e28 /tests/gen-installed-test.py | |
parent | 5571ecd6a82b3d56c4a107f2c2bda0c14d67cb6f (diff) | |
download | gdk-pixbuf-5e669da4a655868d74833a6e3cc89a803f430aad.tar.gz |
meson: Support installed tests
We want to be able to run the gdk-pixbuf tests after installing them in
a known system location, especially when running CI.
Diffstat (limited to 'tests/gen-installed-test.py')
-rw-r--r-- | tests/gen-installed-test.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/gen-installed-test.py b/tests/gen-installed-test.py new file mode 100644 index 000000000..745abf339 --- /dev/null +++ b/tests/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)) |