ReferencePlatforms/Test/WindowsMobile: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
 
(20 intermediate revisions by 2 users not shown)
Line 2: Line 2:


==Reference Image==
==Reference Image==
This section will explain the steps to go from a used N810 to a reference imageIt will stop short of the actual imaging process but will set up the required tools to create the image.
This section will explain the steps to setup a Windows Mobile device for automation testingPlease see device specific sections for flashing a new image or adjusting specific settings.


Keep in mind, most communication with the device will happen remotely over a telnet style session from a host computer to the device. 
Here are some original notes for the [[https://wiki.mozilla.org/User:Asasaki:TouchProSetup HTCTouchPro]]


===Setting up the wifi===
===Setting up the wifi===
Line 10: Line 13:
===Adjust device settings===
===Adjust device settings===
reserved spot for adjusting power, screen, networking and other related settings
reserved spot for adjusting power, screen, networking and other related settings
*adjust power settings to not shutdown while plugged in
** settings->system(tab)->power
*regedit to turn off security alerts/warnings
*find your ip address
** settings->connections(tab)->advanced(tab)
===Install test-agent===


Download test-agent from blassey's people account:
http://people.mozilla.org/~blassey/test-agent/test-agent.exe


===Install test-agent===
The code for test-agent is located here if you want to build it yourself:
http://hg.mozilla.org/users/blassey_mozilla.com/test-agent/


I find it best to do this with Opera on the device, then use the File Explorer on the device to move the downloaded .exe and move it to \


===Setup test-agent to run on boot===
===Setup test-agent to run on boot===


Create a startup link in \windows\startup.  I have one to download [[http://people.mozilla.com/~jmaher/testagent.lnk here]] (just download it and copy it to \windows\startup, then reboot your device and you can telnet to it)


=====Daily Reboot=====
Alternatively you can create this manuallly:
Click on the test-agent in the device file manager, then on your host machine telnet to the IP, port 27020 and
 
$>cd \windows\startup
$>push testagent.lnk
16#\test-agent.exe
^]
 
telnet to the IP, port 27020 again, and
 
$>rebt
 
Verify that you can telnet to the IP port 27020 after it comes back up.
 
===Daily Reboot===
good idea to include this, need to figure out how to do this  
good idea to include this, need to figure out how to do this  


=====Talos=====
===Binary and test data===
 
TODO: actually test this process out and make it cleaner
 
Download the latest Fennec binary from:
http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mobile-1.9.2/fennec-1.0a4pre.en-US.wince-arm.zip
 
Unpack that to a local directory (such as \tests)
 
download test binaries + data for host OS and setup
 
edit the httpd stuff to act as a webserver
 
===Talos===
 
==== Tools ====
checkout talos to your host machine:
* cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -d talos mozilla/testing/performance/talos
 
Download patch from bug 474478 to the root of your talos tree:
https://bugzilla.mozilla.org/attachment.cgi?id=407536
 
Apply patch to cvs tree via patch -p0 < mypatch.diff
 
Download this other patch from bug 474478:
https://bugzilla.mozilla.org/attachment.cgi?id=407537
 
Unzip the files and add them to the root of the talos tree
 
==== Pageset ====
 
Push the tp4 pageset to the webserver root.
 
Copy talos/getInfo.html , talos/page_load_test , and talos/startup_test into the webserver root.
 
==== Config + Running ====
 
Run PerfConfigurator similar to this:


Upload the tp4 pageset to /tools/tp4, then
* python PerfConfigurator.py -v -e \\tests\\fennec\\fennec.exe -t omnia2 -b mobile-browser --activeTests ts --sampleConfig mobile.config --browserWait 60 --noChrome --output local.config --remoteDevice 192.168.1.110 --remotePort 27020 --webServer 192.168.1.114:8888 --deviceRoot \\tests\\talos


  ln -s /builds/talos/page_load_test /var/www/html/
  ** Note: 192.168.1.110 is the ip of my device from step #2
          --remotePort of 27020 is default for test-agent from step 1
          --deviceRoot is where to copy talos bits and profile to
          --webServer is the ip address of the webserver hosting the pageset


=====Maemkit=====
On a pc get maemkit and put it onto the N810.  Modify maemkit.cfg
hg clone http://hg.mozilla.org/qa/maemkit
vim maemkit.cfg # run :%s'/media/mmc1/release'/builds/unittest'g
scp -r maemkit root@${DEVIP}:/tools/maemkit


==Clone Filesystem==
Finally run:
Using parted, set up the filesystem on the target card
  * python run_tests.py local.config
parted --script /dev/sdb mklabel msdos
parted --script /dev/sdb mkpartfs primary ext2 0 3500
parted --script /dev/sdb mkpartfs primary linux-swap 3500 3900
mkfs.ext2 -L maemo-n810-ref /dev/sdb1
mkswap /dev/sdb2
Then insert the MiniSD card into the device.  Now image the device
mount -t jffs2 /dev/mtdblock4 /opt
  mount /dev/mmcblk1p1 /floppy
rsync -a /opt/. /floppy/.
umount /floppy
On the real computer, mount the flash drive and sync the filesystem to a directory on the drive
mkdir /flashing/tmp /flashing/moz-ref-image-v1
mount /dev/sdb1 /flashing/tmp
rsync -a /flashing/tmp/. /flashing/moz-ref-image-v1/.
sync
umount /flashing/tmp
On the real computer, install the talos pagesets
cd moz-ref-image-v1/tools
cp -r /flashing/mmc2/pages .
cp -r /flashing/mmc2/tp4 .
rm -f /flashing/moz-ref-image-v1/var/www/page_load_test
ln -s /tools/talos/page_load_test /var/www/page_load_test
ln -s /tools/pages /tools/page_load_test/pages
ln -s /tools/pages /tools/talos/page_load_test/tp3
ln -s /tools/tp4 /tools/talos/page_load_test/tp4

Latest revision as of 20:35, 23 November 2009

This document is designed to explain how to create the mozilla reference image for testing on maemo devices using a MiniSD card as the boot device. It will also describe how to image this image to other N810 units for use in the production environment.

Reference Image

This section will explain the steps to setup a Windows Mobile device for automation testing. Please see device specific sections for flashing a new image or adjusting specific settings.

Keep in mind, most communication with the device will happen remotely over a telnet style session from a host computer to the device.

Here are some original notes for the [HTCTouchPro]

Setting up the wifi

TODO

Adjust device settings

reserved spot for adjusting power, screen, networking and other related settings

  • adjust power settings to not shutdown while plugged in
    • settings->system(tab)->power
  • regedit to turn off security alerts/warnings
  • find your ip address
    • settings->connections(tab)->advanced(tab)

Install test-agent

Download test-agent from blassey's people account: http://people.mozilla.org/~blassey/test-agent/test-agent.exe

The code for test-agent is located here if you want to build it yourself: http://hg.mozilla.org/users/blassey_mozilla.com/test-agent/

I find it best to do this with Opera on the device, then use the File Explorer on the device to move the downloaded .exe and move it to \

Setup test-agent to run on boot

Create a startup link in \windows\startup. I have one to download [here] (just download it and copy it to \windows\startup, then reboot your device and you can telnet to it)

Alternatively you can create this manuallly: Click on the test-agent in the device file manager, then on your host machine telnet to the IP, port 27020 and

$>cd \windows\startup
$>push testagent.lnk
16#\test-agent.exe
^]

telnet to the IP, port 27020 again, and

$>rebt

Verify that you can telnet to the IP port 27020 after it comes back up.

Daily Reboot

good idea to include this, need to figure out how to do this

Binary and test data

TODO: actually test this process out and make it cleaner

Download the latest Fennec binary from: http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mobile-1.9.2/fennec-1.0a4pre.en-US.wince-arm.zip

Unpack that to a local directory (such as \tests)

download test binaries + data for host OS and setup

edit the httpd stuff to act as a webserver

Talos

Tools

checkout talos to your host machine:

* cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -d talos mozilla/testing/performance/talos 

Download patch from bug 474478 to the root of your talos tree: https://bugzilla.mozilla.org/attachment.cgi?id=407536

Apply patch to cvs tree via patch -p0 < mypatch.diff

Download this other patch from bug 474478: https://bugzilla.mozilla.org/attachment.cgi?id=407537

Unzip the files and add them to the root of the talos tree

Pageset

Push the tp4 pageset to the webserver root.

Copy talos/getInfo.html , talos/page_load_test , and talos/startup_test into the webserver root.

Config + Running

Run PerfConfigurator similar to this:

* python PerfConfigurator.py -v -e \\tests\\fennec\\fennec.exe -t omnia2 -b mobile-browser --activeTests ts --sampleConfig mobile.config --browserWait 60 --noChrome --output local.config --remoteDevice 192.168.1.110 --remotePort 27020 --webServer 192.168.1.114:8888 --deviceRoot \\tests\\talos
** Note: 192.168.1.110 is the ip of my device from step #2
         --remotePort of 27020 is default for test-agent from step 1
         --deviceRoot is where to copy talos bits and profile to
         --webServer is the ip address of the webserver hosting the pageset


Finally run:

* python run_tests.py local.config