So, here goes the first week of the Google Summer of Code coding period.
It was another busy week, and a lot of school and other activities have taken most of my time. So far, I've only managed to write a small amount of code to demonstrate my idea.
The goal for this week was to get a testing framework up and running. Truth be told, it was a bad idea to put this on a list as a first item. I have managed to get weston ready for the testing framework, but I'm unable to wire it up (or rather, verify that I've correctly wired it) due to weston not yet working without any outputs.
Still, I'd like to discuss what I've done so far.
Weston already has its testing framework, and most of the tests are run on the headless backend, a backend that has a fake input and output device. I have added a new command line switch to weston that allows me to tell the headless backend to not create any virtual outputs. This comes in handy for emulating a zero outputs scenario in the test suite.
But, it's not just starting with zero outputs present that needs to be tested. I also need to test a scenario where no outputs are present at start, but an output is plugged in later. I also need to be able to remove outputs and plug them back in at any time in order to emulate a real-life hotplugging scenario (ie, bad connector).
Weston test suite has a helper module, weston-test.so, which is loaded into weston to help test certain internals that couldn't be accessed otherwise. This means that I can use this module to control weston outputs. While using the mentioned module, it was easy to remove all outputs at runtime, but the problem was: How to get it back?
Since the headless-backend supports only one (or none) output(s) at the moment, I've decided to reuse that one output as many times as it's needed. This required me to expose some of the internals of the backend, meaning that any module that's plugged into weston might be able to control such internals. But since headless backend is mostly used as a testing backend, I don't think this will pose much of a threat to anyone. Still, I need to discuss this approach with Pekka and other people involved in the project.
To summarize: I have modified headless backend so it's able to start with no virtual outputs and exposed some internals so I can manually plug a virtual output into the headless-backend from the weston-test.so testing module. I have verified that the code works, but I haven't yet wired it up due to not knowing where it should be, as weston doesn't yet work when starting with zero outputs.
Lets hope next post will be more exciting.