From 997b2a96c1aec1c7f35cd2228eba907f29a28f25 Mon Sep 17 00:00:00 2001 From: Michael Goddard Date: Thu, 30 Jun 2011 14:51:16 +1000 Subject: Add rudimentary config.test support when configuring modules. An extra script is added (qtmodule-configtests) which is currently invoked from syncqt (with some derived parameters passed to it). The module can optionally have an entry in the module's sync.profile file in the form of a perl map of "test name" => parameters. Tests can print an advisory message if they fail (e.g. "Install this SDK/dev package"), or abort the syncqt process (e.g. mandatory prereq missing). Also, if the test has a "requires(foo)" line that results in it being skipped, this is also supported. Change-Id: Ic3c820a488a0992c944994d4d7dc283da36742d6 Reviewed-on: http://codereview.qt.nokia.com/928 Reviewed-by: Qt Sanity Bot Reviewed-by: Sarah Jane Smith Reviewed-by: Marius Storm-Olsen --- bin/syncqt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'bin/syncqt') diff --git a/bin/syncqt b/bin/syncqt index 691f09139c..0c22cf8a6f 100755 --- a/bin/syncqt +++ b/bin/syncqt @@ -15,6 +15,7 @@ use Cwd; use Cwd 'abs_path'; use Config; use strict; +use English qw(-no_match_vars ); # set output basedir to be where ever syncqt is run from our $out_basedir = getcwd(); @@ -50,6 +51,7 @@ my $module_fwd = ""; my $cache_module_fwd = 0; my $developer_build = 0; my $no_module_version_header = 0; +my $makefile_generator = ""; my @modules_to_sync ; $force_relative = 1 if ( -d "/System/Library/Frameworks" ); @@ -90,6 +92,7 @@ sub showUsage print " easy development\n"; print " -no-module-version-header\n"; print " Don't create module version header file\n"; + print " -generator Specify the makefile generator setting (e.g. 'UNIX')\n"; print " -help This help\n"; exit 0; } @@ -658,6 +661,9 @@ while ( @ARGV ) { # skip, it's been dealt with at the top of the file shift @ARGV; next; + } elsif($arg eq "-generator") { + $var = "makefile_generator"; + $val = shift @ARGV; } elsif($arg =~/^-/) { print "Unknown option: $arg\n\n" if(!$var); showUsage(); @@ -741,6 +747,8 @@ while ( @ARGV ) { $cache_module_fwd = 1; } elsif ($var eq "developer_build") { $developer_build = 1; + } elsif ($var eq "makefile_generator") { + $makefile_generator = $val; } elsif ($var eq "no_module_version_header") { $no_module_version_header = 1; } elsif ($var eq "output") { @@ -1310,4 +1318,13 @@ if($check_includes) { } } +# Do configure tests now (pass some things along) +# fatal tests have a non zero return +unless ($showonly) { + my $configtests = dirname($0)."/qtmodule-configtests"; + if (system($EXECUTABLE_NAME, $configtests, $basedir, $out_basedir, $qtbasedir, $makefile_generator)) { + die "$configtests exited with status $?"; + } +} + exit 0; -- cgit v1.2.3