aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtools/check-codingstyle.sh5
-rwxr-xr-xtools/check-complexity.sh15
-rwxr-xr-xtools/do-reformat-codingstyle.sh5
-rwxr-xr-xtools/gen-test-report.sh8
-rwxr-xr-xtools/run-test.sh6
5 files changed, 39 insertions, 0 deletions
diff --git a/tools/check-codingstyle.sh b/tools/check-codingstyle.sh
new file mode 100755
index 0000000..118887c
--- /dev/null
+++ b/tools/check-codingstyle.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+clang-format --dry-run lib/*.c
+clang-format --dry-run lib/*.h
+clang-format --dry-run include/*.h
diff --git a/tools/check-complexity.sh b/tools/check-complexity.sh
new file mode 100755
index 0000000..236ed56
--- /dev/null
+++ b/tools/check-complexity.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+complexity --histogram --score --thresh=3 \
+ include/libredundancyfileop.h \
+ \
+ lib/crc16.h \
+ lib/fileop.c \
+ lib/fileop.h \
+ lib/file-util.c \
+ lib/file-util.h \
+ lib/libredundancyfileop.c \
+ lib/static-configurator.c \
+ lib/static-configurator.h
+
+
diff --git a/tools/do-reformat-codingstyle.sh b/tools/do-reformat-codingstyle.sh
new file mode 100755
index 0000000..34dfc50
--- /dev/null
+++ b/tools/do-reformat-codingstyle.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+clang-format -i lib/*.c
+clang-format -i lib/*.h
+clang-format -i include/*.h
diff --git a/tools/gen-test-report.sh b/tools/gen-test-report.sh
new file mode 100755
index 0000000..74bbaf5
--- /dev/null
+++ b/tools/gen-test-report.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+rm -Rf ./coverage
+mkdir -p ./coverage
+mkdir -p ./coverage/report
+
+lcov -c --rc lcov_branch_coverage=1 -d . -o ./coverage/testcoverage.info
+genhtml --rc lcov_branch_coverage=1 -o ./coverage/report -f ./coverage/testcoverage.info --num-spaces 4
diff --git a/tools/run-test.sh b/tools/run-test.sh
new file mode 100755
index 0000000..489427b
--- /dev/null
+++ b/tools/run-test.sh
@@ -0,0 +1,6 @@
+#!/bin/sh -e
+
+./test/interface_test_unit
+./test/fileop_test_utils
+./test/file_util_test
+./test/interface_test