Installation and setup
This chapter describes the installation and setup of Coco on your machine and a later update of software and licenses.
Choosing a license
There are two kinds of licenses, node-locked and floating licenses.
A node-locked license is bound to a specific machine and a specific user account. On that account, you can run as many Coco processes as you like. Note that if you run Coco from a Continuous Integration Server, the server has a separate account, and therefore Coco needs an additional node-locked license.
Floating licenses are bound to processes, not to computers. One needs as many floating licenses as there are Coco processes running at the same time. A Coco process can be:
- an instance of CoverageScanner or of the compiler wrappers
- an instance of the CoverageBrowser
- each instance of the command line tools, cmmerge, cmcsexeimport and cmreport
Every compiler call that is instrumented by Coco is counted separately because it requires one instance of the CoverageScanner to run. Builds with several compilations in parallel should however cause no real problem since a process that cannot get a license will wait until one is freed.
Floating licenses are managed by a license server. The server must be running on a machine that is reachable from the machine on which Coco runs. froglogic will provide a license file which determines the maximal number of Coco processes that can be active at the same time. The license server itself is not counted among the processes that need a license.
An installer for Coco can be downloaded via https://www.froglogic.com/squish/download/.
The installers for the various platforms supported by Coco have a common naming scheme, but the way they must be executed differs. The naming scheme is
.<suffix>, where <x.y.z> is the program version, <platform> describes the operating system and other details of the installation, and <suffix> is an operating system specific suffix. In the noncommercial version,
SquishCoco is replaced by
- Microsoft® Windows: The installer is a file
_Windows_x64.exeand must be executed.
- Linux™: The installer is a file
.runand must be executed with
bash, as in
$ bash SquishCocoSetup_3.3.2_Linux_x86_64.run
Note that the CentOS version of the installer is also valid for RedHat Linux™.
- macOS: The installation package is a file of the form
.pkg. Click it and the installer will be started.
If no valid license is present for your account, the installer will run the License Wizard at the end of the installation to configure the license.
Installation of a license server
If you have chosen a floating license, you need to specify a machine on your local network on which the license server program runs.
The license server needs a configuration file to run. It specifies the number of licenses served, the machine on which it runs, and the port used by the server. To specify the configuration file, Coco must be installed first.
Install Coco on the license server machine. After the installation, cocolicwizard will be started. Ignore it. Instead, run the command
cocolicserver --server-identifier and redirect its output to a file. How this is done depends slightly on the operating system.
- Microsoft® Windows: In a command window, switch to the project folder and type
\cocolicserver.exe --server-identifier > machine.txt
- Linux™: Open a command shell and type
$ /opt/SquishCoco/bin/cocolicserver --server-identifier > machine.txt
- macOS: Open a command shell and type
$ /Applications/SquishCoco/cocolicserver --server-identifier > machine.txt
This will generate a file
machine.txt in the current directory. Send it to froglogic, together with the number of requested licenses (and, if necessary, the port number).
Running the license server
froglogic sends you a configuration file, which is usually called
cocoserver.cfg. With it, the license server can run. In the simplest case, write:
$ cocolicserver -c cocoserver.cfg
The server then provides licenses to other machines in the same network. For additional options of cocolicserver, see cocolicserver – license server.
A new license can be installed with cocolic or cocolicwizard.
To update to a newer version of Coco, download and install it. It will then overwrite the previous version. The license will not be touched, you can continue to use it.
If a new compiler is installed, then the Coco installer should be run again, so that Coco becomes aware of the new compiler. This includes new versions of Microsoft® Visual Studio®. If Visual Studio 2013 was present during the Coco installation and Visual Studio 2015 is added, the Coco installer needs to be run.
If instead the compiler is updated, Coco should work mostly without changes.
Note: One exception is the C# compiler. If it is updated, the Coco setup will be overwritten and Coco needs to be reinstalled to make code coverage work again.