aboutsummaryrefslogtreecommitdiffstats
path: root/README.org
diff options
context:
space:
mode:
authorAnastasis Grammenos <anastasis.gramm2@gmail.com>2018-09-16 15:27:31 +0300
committerAnastasis Grammenos <anastasis.gramm2@gmail.com>2018-09-16 15:27:31 +0300
commitaf17ead850f90cf6e4476aa74975e68d7293fb27 (patch)
tree8e2db1f5feae9b25cf5294ea635378f444d295c7 /README.org
parent0f33c8a9cbabda257c4dd73009266a4cf5f857a7 (diff)
downloadck-af17ead850f90cf6e4476aa74975e68d7293fb27.tar.gz
ck-af17ead850f90cf6e4476aa74975e68d7293fb27.tar.bz2
ck-af17ead850f90cf6e4476aa74975e68d7293fb27.zip
Add unit test infrastructure
Diffstat (limited to 'README.org')
-rw-r--r--README.org32
1 files changed, 24 insertions, 8 deletions
diff --git a/README.org b/README.org
index 320a11b..9f83ddc 100644
--- a/README.org
+++ b/README.org
@@ -8,13 +8,14 @@
- cmake
- sqlite3-dev
-** gcc
-Edit the =CMakeLists.txt= file and change the =clang= to =gcc=
+** 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://github.com/gramanas/ck
+> 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
@@ -31,7 +32,7 @@ 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://github.com/gramanas/ck
+> 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
@@ -43,12 +44,27 @@ llvm has better asan than gcc, so I use that.
#+END_SRC
** tests
-The testing "suite" is just a bash script
-that executs all the bash scripts under
-=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
+$ ./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