#!/usr/bin/perl # # # This script gets called after a full mozilla build & test. # Use this to build and test an embedded or commercial branding of Mozilla. # # Edit, and rename this file to post-mozilla.pl to activate. # ./build-seamonkey-utils.pl will call PostMozilla::main() after # a successful build and testing of mozilla. This package can report # status via the $TinderUtils::build_status variable. Yeah this is a hack, # but it works for now. Feel free to improve this mechanism to properly # return values & stuff. -mcafee # use strict; package PostMozilla; sub main { # Get build directory from caller. my ($mozilla_build_dir) = @_; print $mozilla_build_dir; TinderUtils::print_log "Post-Mozilla build goes here.\n"; # # Build script goes here. # TinderUtils::print_log "consider ${Settings::BinDir};\n"; # installed-chrome.txt my $chromemsg = "Compacting installed-chrome.txt [lines: "; my $lines = `wc -l ${Settings::BinDir}/chrome/installed-chrome.txt`; $lines = $1 if $lines =~ /(\d+)/; $chromemsg .= $lines; `sort ${Settings::BinDir}/chrome/installed-chrome.txt|uniq > ${Settings::BinDir}/chrome/installed-chrome.txt.new`; `mv ${Settings::BinDir}/chrome/installed-chrome.txt.new ${Settings::BinDir}/chrome/installed-chrome.txt`; $lines = `wc -l ${Settings::BinDir}/chrome/installed-chrome.txt`; $lines = $1 if $lines =~ /(\d+)/; $chromemsg .= ' => ' . $lines . "]\n"; TinderUtils::print_log $chromemsg; # DRefTool my $drefcmd = "${Settings::BinDir}/run-mozilla.sh ". "${Settings::BinDir}/dreftool ". "-D ~/mozilla ". "-e ${Settings::BinDir}/nullcall.lst ". "-f ${Settings::BinDir}/nullfunc.lst "; TinderUtils::print_log "Running |$drefcmd|\n"; TinderUtils::print_log "Begin DRefTool output:\n"; TinderUtils::print_log $_ foreach `$drefcmd`; # ParseCSS my $parsecsscmd = q{(find /mnt/ibm/mozhack/mozilla -name '*.css'}. '|xargs '. "${Settings::BinDir}/run-mozilla.sh ". "${Settings::BinDir}/ParseCSS ". '>/dev/null) 2>&1'; TinderUtils::print_log "Running |$parsecsscmd|\n"; TinderUtils::print_log "Begin ParseCSS output:\n"; TinderUtils::print_log $_ foreach `$parsecsscmd`; # xpcshell my $xpcshellchromecmd = q{((perl -ne 'print qq|/mnt/ibm/mozhack/mozilla/$1\n| if /\((.*\.js)\)$/' }. "${Settings::BinDir}/chrome/chromelist.txt | xargs -n 1 ". "${Settings::BinDir}/run-mozilla.sh ${Settings::BinDir}/xpcshell ". '-w -s -f ) 2>&1)|grep -v nsNativeComponentLoader'; TinderUtils::print_log "Running |$xpcshellchromecmd|\n"; TinderUtils::print_log "Begin xpcshell chrome output:\n"; TinderUtils::print_log $_ foreach `$xpcshellchromecmd`; my $xpcshellcompcmd = "((find ${Settings::BinDir}/components -name '*.js'". '|xargs -n 1 '. "${Settings::BinDir}/run-mozilla.sh ${Settings::BinDir}/xpcshell ". '-w -s -f ) 2>&1)|grep -v nsNativeComponentLoader'; TinderUtils::print_log "Running |$xpcshellcompcmd|\n"; TinderUtils::print_log "Begin xpcshell chrome output:\n"; TinderUtils::print_log $_ foreach `$xpcshellcompcmd`; # Report some kind of status to parent script. # # {'busted', 'testfailed', 'success'} # # Report a fake success, for example's sake. return 'success'; } # Need to end with a true value, (since we're using "require"). 1;