Tuesday, January 18, 2011

L10n script

I tried to help a friend to get his locale in shape and removed the dust of a script I wrote for Armenian a year ago.
Here is for you to use it or to learn the process!
#!/bin/bash
# Script:  generate-locale.sh
# Author:  Armen Zambrano Gasparnian
# Contact: armenzg@mozilla.com
# Purpose: Repackage a locale in hg
# Date:    Jan 13th, 2010

# NOTE:
#    If you run this script and you reach the step "make installers-$LOCALE"
#    you can skip running this script and just run these subset of steps:
#      cd $BASE_DIR/$BRANCH/browser/locales
#      PYTHONPATH=../../../compare-locales/lib python ../../../compare-locales/scripts/compare-locales -m merged l10n.ini ../../../l10n $LOCALE | tee ../../../compare-locales.log
#      make installers-$LOCALE LOCALE_MERGEDIR=$PWD/merged; cd -
#    You want to add new files and do modifications of your locale in:
#      $BASE_DIR/l10n/$LOCALE  

# Change it to your locale
export LOCALE='x-testing'

set -ex
export BASE_DIR=`pwd`
export L10N_HG_SERVER='http://hg.mozilla.org/l10n-central'
export BRANCH='mozilla-central'
export EN_US_REPO='http://hg.mozilla.org/$BRANCH'
export EN_US_BINARY_URL="http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central/"
export REVISION='default'
# We don't really disable webm but we just bypass a check in the confgure step that we don't need
export CONFIGURE_ARGS='--enable-application=browser --with-l10n-base='$BASE_DIR'/l10n --disable-webm'


### 1) Clobber previous run
rm -rf $BRANCH/dist/install
rm -rf $BRANCH/dist/*$LOCALE*

### 2) Checkout the browser repo
# if checkout does not exists
[ -d $BRANCH ] || hg clone $EN_US_HG_SERVER/$REPO_PATH ; 
hg -R $BRANCH pull -r default 

### 3) Checkout the locale repo
mkdir -p $BASE_DIR/l10n
cd $BASE_DIR/l10n
# if we don't have the locale clone it
[ -d $LOCALE ] || hg clone $L10N_HG_SERVER/$LOCALE ; 
hg -R $LOCALE pull -r default

### 4) Let's generate a "merged" directory with compare-locales
cd $BASE_DIR 
rm -rf compare-locales
hg clone http://hg.mozilla.org/build/compare-locales compare-locales
cd compare-locales; hg up -C -r RELEASE_AUTOMATION; cd ..
cd $BASE_DIR/$BRANCH/browser/locales
# a directory called "merged" will be generated under browser/locales
PYTHONPATH=../../../compare-locales/lib python ../../../compare-locales/scripts/compare-locales -m merged l10n.ini ../../../l10n $LOCALE | tee ../../../compare-locales.log

### 5) Setup
cd $BASE_DIR/$BRANCH
autoconf-2.13
cd js/src && autoconf-2.13 && cd ../..
./configure $CONFIGURE_ARGS 
make -C config
# get the latest en-US and unpack it
make -C browser/locales wget-en-US
make -C browser/locales unpack;

make -C nsprpub
make -C modules/libmar
# 6) generate the xpi and the installers
cd browser/locales; make installers-$LOCALE LOCALE_MERGEDIR=$PWD/merged; cd -
# 7) list the packages in the correct place, the correct naming and the correct chmod
cd $BASE_DIR
mv $BRANCH/dist/*hy-AM* $BRANCH/dist/install/*xpi .


Creative Commons License
This work by Zambrano Gasparnian, Armen is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.

Monday, January 10, 2011

Reftests and xpcshell test suites run slow on Windows 7 machines

I previously blogged about xpcshell being extremely slow on Windows 7 and jimm was able to fix something which significantly reduced the time it took. In that post I compared two different operating systems one on Mac minis and the other on a mix of VMs and IX fast hardware machines.

This time I am comparing Windows XP against Windows 7 running on the same base hardware (Mac minis - dual core 2.26GHz CPU). The comparison shows that the xpchsell and reftests test suites run significantly slower on Windows 7 than Windows XP.
Comparison of performance and test suites between Windows XP and Windows 7

If you believe you can give a hand write a comment on bug 617503.

Link to raw data.


Creative Commons License
This work by Zambrano Gasparnian, Armen is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.

XP optimized unit tests enabled for Minefield

Last week we started to run unit tests on Windows XP for every Minefield build we generate.
This change excludes the branches mozilla-1.9.1 and mozilla-1.9.2 where we will still be running them on Win 2003 machines.

There are several permanent oranges that philor and dholbert have filed.
All of them are just affecting the reftests suite, hence, it is hidden until they all are tackled.
Once everything is perma-orange-free we will discontinue running unit tests on Windows 2003 machines as it will improve wait times on the builder machines.

We can now see XP unit tests on tbpl.mozilla.org




Please if you find any new permanent oranges feel free to file them and add them under:
 Big thanks (again) to philor and dholbert for filling the known bugs.

 


Creative Commons License
This work by Zambrano Gasparnian, Armen is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.