Conjuror / MozITP

The Mozilla Integrated Tool Package

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mozilla Integrated Tool Package

This package is a one-stop shop for Firefox OS related tools

Installation

You need to install Vagrant, see more detail from this guide.

And you also need to install the provider for Vagrant. We will use VirtualBox as default.

Ubuntu

  • Download Vagrant's Debian package from here.
  • Install Vagrant by sudo dpkg -i <PATH_TO_PKG_FILE>
  • Install VirtualBox by sudo apt-get install virtualbox
  • Download and install VirtualBox Extension Pack from here.
  • Then set up USB for VirtualBox by sudo adduser <USERNAME> vboxusers
  • Re-login or restart your PC.

Mac OS X

  • Install Brew Cask.
  • Install Vagrant by sudo brew cask install vagrant; sudo brew cask install vagrant-manager
  • Install VirtualBox by sudo brew cask install virtualbox
  • Install VirtualBox Extension Pack by brew cask install virtualbox-extension-pack

Cloning the Repo

Use git clone with --recursive so the vm/ submodule are cloned too.

git clone --recursive <this repo's URL>

Usage

  • Add execute permissions
$ chmod u+x launch.sh
$ chmod u+x stop.sh
  • Launch VM
$ ./launch.sh

A Vagrant VM will be launched.

You should see something like this:

menu

  • Stop the VM
$ ./stop.sh
  • Reset the VM to factory default
$ ./reset_vm.sh
  • Run GIJ (Gaia integration test in JavaScript) directly. This is very useful in automation.

Warning: sometimes the test case itself has bugs, which makes the GIJ test fail. To verify if it's a GIJ platform bug or a test case bug, run ./bin/gij_sanity_test.sh. If it passes, it could be a bug in the test case, not the platform.

$ ./launch.sh gij
  • Run GIJ on specific app
$ export APP=video; ./launch.sh gij # The `export` is important, don't miss it
  • Run GIJ on device directly. The device must be connected through USB before you run the command

Warning: sometimes the test case itself has bugs, which makes the GIJ test fail. To verify if it's a GIJ platform bug or a test case bug, run ./bin/gij_device_sanity_test.sh. If it passes, it could be a bug in the test case, not the platform.

$ ./launch.sh gij device
  • Using your own gaia repository If you already have a gaia repository, use the following commands:
export GAIA=/path/to/your/gaia
./launch.sh

If you change your mind and want to use the latest gaia instead, you can

./reset_vm.sh
unset GAIA
./launch.sh

Or if you want to keep the VM, you can

unset GAIA
./launch.sh
# Remove the flag
cd vm
vagrant ssh -c "rm ~/.users_gaia_exists"
# Restart the VM
./stop.sh
./launch.sh

#Troubleshooting

  • To run launch.sh in jenkins, use xvfb-run.
  • To use the USB device, add the user to the vboxusers group.
sudo adduser <your username> vboxusers
  • If you want to run USB device test in Jenkins, also add the jenkins user to the vboxusers group

#Supported Platforms

  • Linux
  • OS X
  • (We will support windows if enought people ask for it)
  • Flashable devices: Aries (Sony Z3C), Flame

About

The Mozilla Integrated Tool Package


Languages

Language:Shell 100.0%