tests: add reconfigure test, add shell script to run tests
This commit is contained in:
parent
05432a020f
commit
3149e5793c
20
run-tests.sh
Normal file
20
run-tests.sh
Normal file
@ -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
|
20
tests/reconfigure/wscript
Normal file
20
tests/reconfigure/wscript
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user