Who am I?
I am Thomas Tuegel from Indianapolis, USA. I have just completed my B.S. in physics and mathematics at Butler University. In August, I will begin studying for my Ph.D. in physics at the University of Illinois at Urbana-Champaign. I have been accepted as a student in the 2010 Google Summer of Code to work on testing support in Cabal.
The immediate goal of this project is to implement testing support in Cabal so that users have access to useful information about package test suite results presented in a uniform format. Initially, this will make it easy for users to run test suites locally, but eventually Hackage will collect test suite results for uploaded packages. By making this information readily available to the public, we hope to incline more authors to provide useful, working test suites for their packages, improving the quality of software available on Hackage.
Cabal will support two test suite interfaces: a shell interface designed for easy integration with existing test suites and a library interface that will be the standard for integrating new test suites. For tests using the shell interface, Cabal will collect the exit code (indicating success or failure of the test suite) and standard output from the test suite executable. The shell interface will allow us to collect meaningful information from existing test suites without modification; existing test suites need only be designated as such in the .cabal file.
The library interface is really the interesting part of this project. A library test suite will export an entry point of a particular type which Cabal (or other test agents) can import into a stub executable. Then, the stub executable can access information about each test in the suite, run selected tests, and report the results. Cabal will specify a uniform interface for library test suites so that test agents can be written which are compatible with the many packages we hope will have test suites implementing the library interface in the future.
Cabal will be one test agent providing the capability to run selected tests from a library test suite and report the results on the standard output. To facilitate other test agents compiling stub executables linking to the test suite library, Cabal will install the library to a local package database reserved for this purpose.