Before writing tests, one needs to figure whats wrong with the existing ones and fix them. Or better more get them to run first.
This is where I started testing those we already have gnome-weather. (Insert – This is where I realized my system needed a lot more packages, thrashing and fixing to run anything close to tests) .
Usually, by my experience prior to this project, I would simply run the python tests (via “make check”). However, as gnome-weather has quite a complicated way to get started, one needs gnome-desktop-testing runner installed via jhbuild.
jhbuild build gnome-desktop-testing-runner
jhbuild run gnome-desktop-testing-runner org.gnome.Weather
Following this, to be able to run the above tests the app needs to be built with –enable-installed-tests -> this to be added in autogenargs in the file “~/.config/jhbuildrc”.
I faced some at-spi issues, which I resolved by building at-spi2-atk, at-spi2-core and pyatspi2-python2 with jhbuild.
In my case however, some packages clashed because of which depreciation errors kept intruding. To overcome this, I moved to a much saner approach. Install a pristine environment for the tests. (Read – create a gnome-continuous VM and work on installed tests).
The following post will talk all about setting up a VM for gnome-continuous. The image we will need is Here.
There are various options of VM Managers available , the easiest to use is Virt-Manager, the one I used.
The foremost thing we will do is, setting up a Bridged Network which the VM can use to ssh into.
- Go to “Edit – Connection Detals”
- Navigate to “Virtual Networks”
- Click “+” < Input any name for the Network < Then click Forward < Forward < Forward < Check “Forwarding to physical network”
- Choose your connection (em1 usually, if wired) and finally, method = NAT
- Click Finish.
Your final output should be something like the below:
After the network is setup, we will create the VM which will be using the above network to connect to the internet and for ssh connections. The steps to install the gnome-continuous image can be seen in the following screens.
Make sure the VM boots. A few troubleshooting tips:
- Make sure the storage format is selected correctly, the default format is “raw”, while we are using “qcow2” , which might cause problems in booting the VM. You can correct the same by changing the it from the IDE Disk settings tab as follows:
- Another issue can be the boot loader settings. Make sure the Boot source is set to be from the Hard Disk.
After this hopefully, your VM should be up and running!
If not. you arent alone ! 😛 Although the VM should ideally boot up by now, there is a slight bug because of which you might be prompted to login. I was subjected to a blank gnome screen and was stuck after this. The workaround for the following awaits you in the escape terminal. The steps you need are :
- Start the vt2 terminal by sending in the combination Ctrl+Atl+F1/F2
- Login as root
- Use “useradd test”
- and finally ‘passwd test”
This should get the VM up and running with a VM 😀
More on testing to follow 🙂