Merge lp:~hjd/widelands/tests-poc into lp:~widelands-dev/widelands/debian
Status: | Rejected |
---|---|
Rejected by: | SirVer |
Proposed branch: | lp:~hjd/widelands/tests-poc |
Merge into: | lp:~widelands-dev/widelands/debian |
Diff against target: |
30 lines (+9/-0) 3 files modified
debian/control (+1/-0) debian/tests/control (+2/-0) debian/tests/testsuite (+6/-0) |
To merge this branch: | bzr merge lp:~hjd/widelands/tests-poc |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Widelands Developers | Pending | ||
Review via email: mp+250533@code.launchpad.net |
Description of the change
I have some good news and bad news:
I have added support for running the integration/
Autopkgtest, also known as DEP8 (see [2] for more info), is a way to test Debian packages in order to verify they run and behave as expected. The tests are run on binary packages which means you don't have to rebuild the package each time you want to run them. This makes it easy to run automated package tests more frequently, for instance Ubuntu runs them whenever they upload a new version or when one of its dependencies change [3].
I had read a bit about this already and knew that Ubuntu/Debian was working on adding test cases to some of their core packages to ensure quality and catch regressions easier. I hadn't really looked into it, but it turned out adding autopkgtests was a lot easier than I thought. All it really needed was a control file with the dependencies and one or more tests which can then be run. (Please ignore the early commits as they were mostly horrible hacks to see if I could get *something* to run on the PPA builders).
In order to verify this, I ran it on a local VM:
$ adt-run -B --built-tree=. --- null
I checked out the widelands source code and merged this branch into it to be able to build the Debian packages. It should be possible to run the tests when building the packages, but I wasn't able to trigger it. Since the main goal was getting the tests to run and compilation took a long time, I switched to using pre-built packages instead. I added my test-PPA to get the latest packages from trunk. The "null" at the end indicates I don't want to run the tests on my system instead of through QEMU, and LXC container or similar. The command above might not be the most optimal way of running things, but it worked as a proof of concept.
As mentioned above, the Launchpad PPA builders unfortunately won't run the tests. However, they will be run for offical Debian and Ubuntu packages so when build19 is packaged, they will be run to verify Widelands works on those systems. One issue remains on this front though, which I've mentioned before, is the need for a timeout mechanism. For now I've only enable one of the test suites, because when I tried to run all tests it would freeze or get stuck on one of them thus never exiting. Ideally this should run all tests, but it would need some way to mark these tests so it doesn't end up as a process which has to be killed manully.
Please let me know if something is unclear, or if you want more details, I wasn't sure how much to include.
[1] https:/
[2] http://
[3] http://
Unmerged revisions
- 40. By Hans Joachim Desserud
-
Add comment on why the tests are restricted to a single suite
- 39. By Hans Joachim Desserud
-
Remove added test which probably didn't have any effect anyways
- 38. By Hans Joachim Desserud
-
Reorder and make the testsuite executable
- 37. By Hans Joachim Desserud
-
Maybe I need to override the test step to trigger them to run?
- 36. By Hans Joachim Desserud
-
Attempt to add a proper autopkgtest
- 35. By Hans Joachim Desserud
-
Now try to run it after actually building something
- 34. By Hans Joachim Desserud
-
Specify widelands binary
- 33. By Hans Joachim Desserud
-
singular
- 32. By Hans Joachim Desserud
-
Attempt to run the script
- 31. By Hans Joachim Desserud
-
comma
Thanks for the explanations, very interesting and valuable experiments. Thanks for investing the time.
I am not sure how interesting it is to run our tests on a debian system on deploy. Do you think we should check that in? That is very late in the cycle of our product to catch bugs.
Otherwise I read that we cannot have automated nightly testing from our bzr branches - that is unfortunate and stays a big plus for Github.
Could you add a summary of your experiments to tinyurl. com/WlMoveToGit hub with maybe a link here for more information.
As said, I am on the fence if this is worth merging. You have a better understanding of the implications, so I think you should decide.