diff options
author | David Robillard <d@drobilla.net> | 2020-03-09 21:49:55 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-03-09 21:49:55 +0100 |
commit | 2fb85397366c58accbb77e5a7bd898877facc44d (patch) | |
tree | 28e5cc07a2d5c9b27404d063db0652937488067f /wscript | |
parent | a7cb0cb1506792d6893556bc976822e254a89106 (diff) | |
download | pugl-2fb85397366c58accbb77e5a7bd898877facc44d.tar.gz pugl-2fb85397366c58accbb77e5a7bd898877facc44d.tar.bz2 pugl-2fb85397366c58accbb77e5a7bd898877facc44d.zip |
Add test for basic view creation, exposure, and destruction
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -37,6 +37,9 @@ def options(ctx): 'log': 'print GL information to console', 'grab-focus': 'work around keyboard issues by grabbing focus'}) + ctx.get_option_group('Test options').add_option( + '--gui-tests', action='store_true', help='Run GUI tests') + def configure(conf): conf.load('compiler_c', cache=True) @@ -174,6 +177,9 @@ def _build_pc_file(bld, name, desc, target, libname, deps={}, requires=[]): LIBS=' '.join(link_flags)) +tests = ['show_hide'] + + def build(bld): # C Headers includedir = '${INCLUDEDIR}/pugl-%s/pugl' % PUGL_MAJOR_VERSION @@ -334,12 +340,24 @@ def build(bld): platform, 'cairo', uselib=['M', 'CAIRO']) + for test in tests: + bld(features = 'c cprogram', + source = 'test/test_%s.c' % test, + target = 'test/test_%s' % test, + install_path = '', + use = ['pugl_%s_static' % platform, + 'pugl_%s_stub_static' % platform], + uselib = deps[platform]['uselib'] + ['CAIRO']) + if bld.env.DOCS: autowaf.build_dox(bld, 'PUGL', PUGL_VERSION, top, out) def test(tst): - pass + if tst.options.gui_tests: + with tst.group('gui') as check: + for test in tests: + check(['test/test_%s' % test]) def lint(ctx): |