|
|
|
@ -1,12 +1,7 @@
@@ -1,12 +1,7 @@
|
|
|
|
|
#!/usr/bin/env python |
|
|
|
|
|
|
|
|
|
from waflib.Tools import waf_unit_test |
|
|
|
|
|
|
|
|
|
def options(opt): |
|
|
|
|
grp = opt.add_option_group('filesystem_stdio options') |
|
|
|
|
|
|
|
|
|
grp.add_option('--enable-fs-tests', action='store_true', dest = 'FS_TESTS', default = False, |
|
|
|
|
help = 'enable filesystem_stdio tests') |
|
|
|
|
pass |
|
|
|
|
|
|
|
|
|
def configure(conf): |
|
|
|
|
nortti = { |
|
|
|
@ -15,8 +10,6 @@ def configure(conf):
@@ -15,8 +10,6 @@ def configure(conf):
|
|
|
|
|
} |
|
|
|
|
conf.env.append_unique('CXXFLAGS', conf.get_flags_by_compiler(nortti, conf.env.COMPILER_CC)) |
|
|
|
|
|
|
|
|
|
conf.env.FS_TESTS = conf.options.FS_TESTS |
|
|
|
|
|
|
|
|
|
if conf.env.DEST_OS != 'android': |
|
|
|
|
if conf.env.cxxshlib_PATTERN.startswith('lib'): |
|
|
|
|
conf.env.cxxshlib_PATTERN = conf.env.cxxshlib_PATTERN[3:] |
|
|
|
@ -32,21 +25,25 @@ def build(bld):
@@ -32,21 +25,25 @@ def build(bld):
|
|
|
|
|
libs += [ 'public' ] |
|
|
|
|
|
|
|
|
|
bld.shlib(target = 'filesystem_stdio', |
|
|
|
|
features = 'cxx', |
|
|
|
|
features = 'cxx seq', |
|
|
|
|
source = bld.path.ant_glob(['*.c', '*.cpp']), |
|
|
|
|
use = libs, |
|
|
|
|
install_path = bld.env.LIBDIR, |
|
|
|
|
subsystem = bld.env.MSVC_SUBSYSTEM) |
|
|
|
|
|
|
|
|
|
if bld.env.FS_TESTS: |
|
|
|
|
if bld.env.TESTS: |
|
|
|
|
# build in same module, so dynamic linking will work |
|
|
|
|
# for now (until we turn libpublic to shared module lol) |
|
|
|
|
bld.program(features = 'test', |
|
|
|
|
source = 'tests/caseinsensitive.c', |
|
|
|
|
target = 'test_caseinsensitive', |
|
|
|
|
tests = { |
|
|
|
|
'caseinsensitive' : 'tests/caseinsensitive.c', |
|
|
|
|
'interface' : 'tests/interface.cpp', |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for i in tests: |
|
|
|
|
bld.program(features = 'test seq', |
|
|
|
|
source = tests[i], |
|
|
|
|
target = 'test_%s' % i, |
|
|
|
|
use = libs + ['DL'], |
|
|
|
|
rpath = '$ORIGIN', |
|
|
|
|
subsystem = bld.env.CONSOLE_SUBSYSTEM, |
|
|
|
|
install_path = None) |
|
|
|
|
bld.add_post_fun(waf_unit_test.summary) |
|
|
|
|
bld.add_post_fun(waf_unit_test.set_exit_code) |
|
|
|
|