diff --git a/run-tests.sh b/run-tests.sh new file mode 100644 index 0000000..4c99fb1 --- /dev/null +++ b/run-tests.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +die() +{ + exit 1 +} + +# build waf +./build-waf.sh + +# install conan +python -m pip install pip --upgrade --user +pip install conan --user + +# run tests +python waf-$1 configure build msdev clean || die + +# reconfigure needs a special case +python waf-$1 -t tests/reconfigure -o build-reconfigure configure --test-option || die +python waf-$1 -t tests/reconfigure -o build-reconfigure configure --reconfigure || die diff --git a/tests/reconfigure/wscript b/tests/reconfigure/wscript new file mode 100644 index 0000000..860fa3b --- /dev/null +++ b/tests/reconfigure/wscript @@ -0,0 +1,20 @@ +#! /usr/bin/env python +# encoding: utf-8 +# a1batross, 2019 + +VERSION = '1.0' +APPNAME = 'waifu-tests' +top = '.' + +def options(opt): + opt.add_option('--test-option', default=False, dest='TEST_OPTION', action='store_true') + opt.load('reconfigure') + +def configure(conf): + conf.load('reconfigure') + + if not getattr(conf.options, 'TEST_OPTION', False): + raise Exception('TEST FAILED') + +def build(bld): + pass