diff options
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 53 |
1 files changed, 3 insertions, 50 deletions
@@ -31,6 +31,8 @@ projects = ''' plugins/omins.lv2 '''.split() +line_just = 47 + def rebase(ctx): 'rebase all git submodules' @@ -84,7 +86,6 @@ def options(opt): opt.load('compiler_c') opt.load('compiler_cxx') opt.load('lv2') - autowaf.set_options(opt, test=True) run_opts = opt.add_option_group('Run options') run_opts.add_option('--cmd', type='string', dest='cmd', help='command to run from build directory') @@ -99,8 +100,6 @@ def sub_config_and_use(conf, name, has_objects = True, pkgname = ''): autowaf.set_local_lib(conf, pkgname, has_objects) def configure(conf): - autowaf.display_header('Global Configuration') - autowaf.set_line_just(conf, 45) conf.load('compiler_c', cache=True) conf.load('compiler_cxx', cache=True) conf.load('lv2', cache=True) @@ -135,60 +134,14 @@ def configure(conf): if not_building != []: Logs.warn('Not building:\n\t%s\n' % '\n\t'.join(not_building)) -def source_tree_env(): - "sets up the environment to run things from the source tree" - env = os.environ - library_path = [] - if 'LD_LIBRARY_PATH' in env: - library_path = env['LD_LIBRARY_PATH'].split(os.pathsep) - for i in 'serd sord sratom lilv suil raul ganv'.split(): - library_path += [ os.path.join(os.getcwd(), 'build', i) ] - - ingen_module_path = [] - for i in 'client server shared gui serialisation'.split(): - path = os.path.join(os.getcwd(), 'build', 'ingen', 'src', i) - library_path += [ path ] - ingen_module_path += [ path ] - - env.LD_LIBRARY_PATH = os.pathsep.join(library_path) - env.INGEN_MODULE_PATH = os.pathsep.join(ingen_module_path) - env.LV2_PATH = os.pathsep.join(['~/.lv2', os.path.join(os.getcwd(), 'lv2')]) - return env - -def run(ctx): - if not Options.options.cmd: - Logs.error("missing --cmd option for run command") - return - - cmd = Options.options.cmd - Logs.pprint('GREEN', 'Running %s' % cmd) - - subprocess.call(cmd, shell=True, env=source_tree_env()) - def build(bld): autowaf.set_recursive() for i in bld.env.DROBILLAD_BUILD: bld.recurse(i) def test(ctx): - autowaf.set_recursive(); - os.environ = source_tree_env() - original_cwd = os.getcwd() for i in ['raul', 'serd', 'sord', 'sratom', 'lilv', 'ingen']: - try: - ctx.recurse(i) - except autowaf.TestFailed: - pass - finally: - os.chdir(original_cwd) - - if ctx.autowaf_tests_failed > 0: - Logs.pprint('RED', '\nSummary: %d / %d tests failed\n' % ( - ctx.autowaf_tests_failed, ctx.autowaf_tests_total)) - sys.exit(1) - else: - Logs.pprint('GREEN', '\nSummary: All %d tests passed\n' % ( - ctx.autowaf_tests_total)) + ctx.recurse(i) def posts(ctx): autowaf.set_recursive() |