User:Armenzg:unittest script: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 1: Line 1:
   
   
<pre>
<pre>
# You will most likely change these parameters
# You will most likely change these parameters
OS='win32' # e.g. linux64
OS='win32' # e.g. linux64
ID='1297441801'
ID='1297441801'
BRANCH='mozilla-central'
BRANCH='mozilla-central'
# TODO $OS_ARCH should be calculated based on $OS
# TODO $OS_ARCH should be calculated based on $OS
OS_ARCH='win32' # e.g. linux-x86_64
OS_ARCH='win32' # e.g. linux-x86_64
TYPE='' #TYPE='-debug'
TYPE='' #TYPE='-debug'
LOCATION='tinderbox-builds' # e.g. 'nightly', 'tryserver-builds', 'releases'
LOCATION='tinderbox-builds' # e.g. 'nightly', 'tryserver-builds', 'releases'
 
# You most likely won't change these parameters too often
# You most likely won't change these parameters too often
BASE='ftp://ftp.mozilla.org/pub/mozilla.org/firefox'
BASE='ftp://ftp.mozilla.org/pub/mozilla.org/firefox'
VERSION=`wget --quiet -O- http://hg.mozilla.org/${BRANCH}/raw-file/default/browser/config/version.txt`  
VERSION=`wget --quiet -O- http://hg.mozilla.org/${BRANCH}/raw-file/default/browser/config/version.txt`  
 
# Calculate following parameters based on previous values
POST_URL='${LOCATION}/${BRANCH}-${OS}${TYPE}/${ID}'
# TODO if LOCATION is "nightly" then
# POST_URL='${LOCATION}/latest-${BRANCH}'
URL='${BASE}/${POST_URL}'
# symbols is specified even though I am skipping to download it
UNITTEST_PARAMS='--appname=firefox/firefox.exe --utility-path=bin --extra-profile-file=bin/plugins --symbols-path=symbols'
MOCHITEST_PARAMS='--certificate-path=certs --autorun --close-when-done --console-level=INFO'
REFTEST_PATH='reftest/tests/layout/reftests'


# Calculate following parameters based on previous values
# Download binaries and tests
POST_URL='${LOCATION}/${BRANCH}-${OS}${TYPE}/${ID}'
wget --progress=dot:mega -N $URL/firefox-${VERSION}.en-US.${OS_ARCH}.tar.bz2
# TODO if LOCATION is "nightly" then
wget --progress=dot:mega -N $URL/firefox-${VERSION}.en-US.${OS_ARCH}.tests.zip
# POST_URL='${LOCATION}/latest-${BRANCH}'
# Unzip binaries and tests
URL='${BASE}/${POST_URL}'
tar -jxvf firefox-4.0b8pre.en-US.linux-i686.tar.bz2
# symbols is specified even though I am skipping to download it
# TODO add selective unzipping
UNITTEST_PARAMS='--appname=firefox/firefox.exe --utility-path=bin --extra-profile-file=bin/plugins --symbols-path=symbols'
unzip -o -jxvf firefox-$VERSION.en-US.$PLATFOM.tests.zip
MOCHITEST_PARAMS='--certificate-path=certs --autorun --close-when-done --console-level=INFO'
REFTEST_PATH='reftest/tests/layout/reftests'


# Download binaries and tests
# All known tests suites to this date
wget --progress=dot:mega -N $URL/firefox-${VERSION}.en-US.${OS_ARCH}.tar.bz2
### mochitest 1 to 5 - TODO iterate
wget --progress=dot:mega -N $URL/firefox-${VERSION}.en-US.${OS_ARCH}.tests.zip
python mochitest/runtests.py ${MOCHITEST_PARAMS} --total-chunks=5 --this-chunk=1 --chunk-by-dir=4
# Unzip binaries and tests
tar -jxvf firefox-4.0b8pre.en-US.linux-i686.tar.bz2
# TODO add selective unzipping
unzip -o -jxvf firefox-$VERSION.en-US.$PLATFOM.tests.zip
# All known tests suites to this date
### mochitest 1 to 5 - TODO iterate
python mochitest/runtests.py ${MOCHITEST_PARAMS} --total-chunks=5 --this-chunk=1 --chunk-by-dir=4


### mochitest-other (chrome, browser-chrome, a11y & ipcplugins)
### mochitest-other (chrome, browser-chrome, a11y & ipcplugins)
python mochitest/runtests.py ${UNITTEST_PARAMS} ${MOCHITEST_PARAMS} --chrome
python mochitest/runtests.py ${UNITTEST_PARAMS} ${MOCHITEST_PARAMS} --chrome
python mochitest/runtests.py ${UNITTEST_PARAMS} ${MOCHITEST_PARAMS} --browser-chrome
python mochitest/runtests.py ${UNITTEST_PARAMS} ${MOCHITEST_PARAMS} --browser-chrome
python mochitest/runtests.py ${UNITTEST_PARAMS} ${MOCHITEST_PARAMS} --a11y
python mochitest/runtests.py ${UNITTEST_PARAMS} ${MOCHITEST_PARAMS} --a11y
python mochitest/runtests.py ${UNITTEST_PARAMS} ${MOCHITEST_PARAMS} --setpref='dom.ipc.plugins.enabled=false' --test-path='modules/plugin/test'
python mochitest/runtests.py ${UNITTEST_PARAMS} ${MOCHITEST_PARAMS} --setpref='dom.ipc.plugins.enabled=false' --test-path='modules/plugin/test'
   
   
### reftests (reftest, crashtest & jsreftest)
### reftests (reftest, crashtest & jsreftest)
python reftest/runreftest.py ${UNITTEST_PARAMS} ${REFTEST_PATH}/reftest.list
python reftest/runreftest.py ${UNITTEST_PARAMS} ${REFTEST_PATH}/reftest.list
python reftest/runreftest.py ${UNITTEST_PARAMS} ${REFTEST_PATH}/crashtests.list
python reftest/runreftest.py ${UNITTEST_PARAMS} ${REFTEST_PATH}/crashtests.list
python reftest/runreftest.py ${UNITTEST_PARAMS} --extra-profile-file=jsreftest/tests/user.js jsreftest/tests/jstests.list
python reftest/runreftest.py ${UNITTEST_PARAMS} \
--extra-profile-file=jsreftest/tests/user.js jsreftest/tests/jstests.list
   
   
### xpcshell
### xpcshell
bash -c 'if [ ! -d firefox/plugins ]; then mkdir firefox/plugins; fi && cp bin/xpcshell.exe firefox && cp -R bin/components/* firefox/components/ && cp -R bin/plugins/* firefox/plugins/ && python -u xpcshell/runxpcshelltests.py --symbols-path=symbols --manifest=xpcshell/tests/all-test-dirs.list firefox/xpcshell.exe'
bash -c 'if [ ! -d firefox/plugins ]; then mkdir firefox/plugins; fi && \
cp bin/xpcshell.exe firefox && cp -R bin/components/* firefox/components/ && \
cp -R bin/plugins/* firefox/plugins/ && python -u xpcshell/runxpcshelltests.py \
--symbols-path=symbols --manifest=xpcshell/tests/all-test-dirs.list firefox/xpcshell.exe'
</pre>
</pre>
Confirmed users
3,990

edits

Navigation menu