[Xfce4-commits] <midori:master> Add --enable-tests configuration option

Christian Dywan noreply at xfce.org
Sun May 2 12:32:01 CEST 2010


Updating branch refs/heads/master
         to a1a2510fa93e18d1890bb94898823c6ae7f7d264 (commit)
       from 001d9e463a35db495dc27ca7397fa116593a52df (commit)

commit a1a2510fa93e18d1890bb94898823c6ae7f7d264
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sun May 2 12:26:32 2010 +0200

    Add --enable-tests configuration option
    
    This allows building tests regardless of running ./waf check,
    either to ensure they compile or to use them outside of waf.
    
    Disabled by default.

 wscript |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/wscript b/wscript
index d101304..d37934a 100644
--- a/wscript
+++ b/wscript
@@ -259,6 +259,7 @@ def configure (conf):
     # Store options in env, since 'Options' is not persistent
     if 'CC' in os.environ: conf.env['CC'] = os.environ['CC'].split()
     conf.env['addons'] = option_enabled ('addons')
+    conf.env['tests'] = option_enabled ('tests')
     conf.env['docs'] = option_enabled ('docs')
     if 'LINGUAS' in os.environ: conf.env['LINGUAS'] = os.environ['LINGUAS']
 
@@ -383,6 +384,7 @@ def set_options (opt):
     add_enable_option ('sqlite', 'history database support', group)
     add_enable_option ('libnotify', 'notification support', group)
     add_enable_option ('addons', 'building of extensions', group)
+    add_enable_option ('tests', 'building of tests', group, disable=True)
     add_enable_option ('hildon', 'Maemo integration', group, disable=not is_maemo ())
 
     # Provided for compatibility
@@ -540,7 +542,7 @@ def build (bld):
                     bld.install_files ('${SYSCONFDIR}/xdg/' + APPNAME + \
                                        '/extensions/' + folder, source)
 
-    if Options.commands['check']:
+    if Options.commands['check'] or bld.env['tests']:
         bld.add_subdirs ('tests')
 
     if Options.commands['clean']:



More information about the Xfce4-commits mailing list