Welcome | Get started | Dive into Lino | Contribute | Reference
Running the Lino test suite¶
Once your environment is correctly set up you can run the test suite for the Lino framework as follows:
$ oood
$ pp inv prep test
Where oood
starts up the LibreOffice server, required by
several tests. See Running a LibreOffice server. You don't need to do this
here if you installed LO as a service on your machine.
The pp inv prep test
command then loops over all your
projects (pp
), initializes their demo databases (inv
initdb
) and then runs the test suite (inv test
. The whole
process takes 20 minutes on my machine when there's no error. It
produces a lot of output of this style:
==== lino ====
no previously-included directories found matching 'docs'
.
----------------------------------------------------------------------
Ran 1 test in 0.013s
OK
(...)
==== noi ====
--------------------------------------------------------------------------------
In demo project lino_noi.projects.team.settings.demo:
`initdb std demo demo2` started on database .../default.db.
Operations to perform:
...
Installed 148 object(s) from 11 fixture(s)
...................
----------------------------------------------------------------------
Ran 19 tests in 34.440s
OK
(...)
If any error occurs, then you need to find out the reason. Possible reasons for failures are:
PodError: An error occurred during the conversion. Could not connect to LibreOffice on port 8100. UNO (LibreOffice API) says: Connector : couldn't connect to socket (Success).
This means that you don't have the LibreOffice server running. See Running a LibreOffice server.
Some dependency is not installed on your machine.
Some test suite is broken.
In order to check whether everything worked well, we are now going to run the test suite.
Make sure that your demo databases are initialized and that you did
not do any manual changes therein. Because the test suite has many
test cases which would fail if these demo databases were missing or
not in their virgin state. In case you did write into some database
during the previous section, just run inv prep
once more.
Tips & tricks¶
You can split the process into two:
$ pp inv prep $ pp inv test
This can save you time if there is some problem. Once
inv initdb
has run successfully for all projects, you can focus oninv test
.You can run the test suite for one project at a time by doing:
$ go <prjname> $ inv prep test
You can prepend the standard Unix time command if you want to know how much time it took on your machine:
$ time pp inv prep test
You can use the -v option of
pp
so that you can peacefully go to the kitchen and make yourself a cup of tea, knowing that your computer will announce the result through its speakers when the process has finished:$ time pp -v inv prep test
You can try this by issuing:
$ pp -v ls
Your computer should then say the words "Successfully terminated 'ls' for all projects" with a more or less clear male voice.
Note that this requires the espeak package to be installed on your machine:
$ sudo apt-get install espeak