blob: 9f83ddc00628765e850b6255815ce676969c1436 (
plain) (
blame)
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
|
#+html: <p align="center"><img src="res/logo.png" width="30%" height="30%" /></p>
* ck
*The Config Keeper*
* build it
** requirements
- clang (llvm) or gcc (gnu)
- cmake
- sqlite3-dev
** compiler
By default I use clang, if you want to use gcc just
edit the =CMakeLists.txt= file and change =clang= to =gcc=
** make
#+BEGIN_SRC sh
# clone the repo
> cd ~/code; git clone https://gitlab.com/grm-grm/ck
# make a build directory and enter it
> mkdir ~/ck_build; cd ~/ck_build;
# run cmake
> cmake ~/code/ck
# run make
> make
# run ck
> ./ck
#+END_SRC
* for devs
** make
Just build with address sanitizer enabled like so:
llvm has better asan than gcc, so I use that.
#+BEGIN_SRC sh
# clone the repo
> cd ~/code; git clone https://gitlab.com/grm-grm/ck
# make a build directory and enter it
> mkdir ~/ck_build; cd ~/ck_build;
# run cmake
> cmake ~/code/ck -DCK_ASAN=ON
# run make
> make
# run ck
> ./ck
#+END_SRC
** tests
The testing "suite" is a bash script that runs regression
and unit tests. Regression tests are under the =tests/= directory
and are bash scripts that test =ck= functionality. Unit tests reside
under =unit/= directory and test the code.
*** run tests
Simply go to the build dir and type.
#+BEGIN_SRC sh
$ ./check_ck
#+END_SRC
*** test suite
#+BEGIN_SRC sh
$ ./check_ck -h
ck test suite
use without flags to run all tests
flags:
-u, --unit run only the unit tests
-r, --regression run only the regression tests
-c, --clear remove test files
use it if the tests fail
-h, --help, * print this
#+END_SRC
|