User:Armenzg:unittest script: Difference between revisions

Jump to navigation Jump to search
no edit summary
mNo edit summary
No edit summary
Line 1: Line 1:
  url='http://stage.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds/mozilla-central-linux/1288334777/'
   
  name=
<pre>
  wget --progress=dot:mega -N $url/firefox-4.0b8pre.en-US.linux-i686.tar.bz2
# You will most likely change these parameters
OS='win32' # e.g. linux64
ID='1297441801'
BRANCH='mozilla-central'
# TODO $OS_ARCH should be calculated based on $OS
OS_ARCH='win32' # e.g. linux-x86_64
TYPE='' #TYPE='-debug'
LOCATION='tinderbox-builds' # e.g. 'nightly', 'tryserver-builds', 'releases'
# You most likely won't change these parameters too often
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`
 
# 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'
 
# Download binaries and tests
  wget --progress=dot:mega -N $URL/firefox-${VERSION}.en-US.${OS_ARCH}.tar.bz2
wget --progress=dot:mega -N $URL/firefox-${VERSION}.en-US.${OS_ARCH}.tests.zip
# Unzip binaries and tests
  tar -jxvf firefox-4.0b8pre.en-US.linux-i686.tar.bz2
  tar -jxvf firefox-4.0b8pre.en-US.linux-i686.tar.bz2
  wget --progress=dot:mega -N $url/firefox-4.0b8pre.en-US.linux-i686.tests.zip
  # TODO add selective unzipping
  # TODO add the selective unzipping
unzip -o -jxvf firefox-$VERSION.en-US.$PLATFOM.tests.zip
  unzip -o -jxvf firefox-4.0b8pre.en-US.linux-i686.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)
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} --a11y
python mochitest/runtests.py ${UNITTEST_PARAMS} ${MOCHITEST_PARAMS} --setpref='dom.ipc.plugins.enabled=false' --test-path='modules/plugin/test'
### reftests (reftest, crashtest & jsreftest)
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} --extra-profile-file=jsreftest/tests/user.js jsreftest/tests/jstests.list
   
   
  # TODO add the several test suites
  ### xpcshell
  python mochitest/runtests.py --appname=firefox/firefox-bin --utility-path=bin --extra-profile-file=bin/plugins --certificate-path=certs --autorun --close-when-done --console-level=INFO --symbols-path=symbols --total-chunks=5 --this-chunk=1 --chunk-by-dir=4
  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>
Confirmed users
3,990

edits

Navigation menu