~ci-train-bot/unity-scope-click/unity-scope-click-ubuntu-yakkety-landing-072

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
unity-scope-click hacking guide
===============================

Getting unity-scope-click
-------------------------

To get the main development branch of unity-scope-click:

    $ bzr branch lp:unity-scope-click/devel


Getting dependencies
--------------------

To succesfully build the scope there are a few packages required:

    $ sudo apt-get build-dep unity-scope-click


Building the scope
------------------

This scope is built using cmake. Here's an example on how to build it:

    $ mkdir build
    $ cd build
    $ cmake ..
    $ make -j 8


Running the unit tests
----------------------

    $ make check

Or, if you want to run the tests under valgrind:

    $ make check-valgrind


Running the autopilot tests
---------------------------

    $ make test-click-scope-autopilot-fake-servers


Running the autopkgtest tests
-----------------------------

    $ adt-run --unbuilt-tree . -o /tmp/adt-clickscope \
      -U --apt-pocket proposed --- qemu ~/adt-vivid-amd64-cloud.img


Running the scope
-----------------

You will usually run the scope inside a unity8 session, but when developing
a good way to test it is with unity-scope-tool. Inside the build directory do:

    $ mkdir clickscope
    $ (cd clickscope;ln -s ../scope/click/libclickscope.so .; ln -s ../data/clickscope.ini .)
    $ U1_DEBUG=true unity-scope-tool clickscope/clickscope.ini


Running the coverage tests
--------------------------

To run the coverage tests you'll need to install the gcovr and lcov packages.
Then you need to compile with coverage enabled, like this:

    $ cmake .. -DCMAKE_BUILD_TYPE=coverage
    $ make
    $ make test
    $ make coverage


If you want the coverage report in pretty HTML, use:

    $ make coverage-html

The html will be left in the coveragereport directory.

Updating departments db
-----------------------
See tools/init-departments/README for details about how to re-create departments database
file found in data/departments.db.