aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNaoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>2022-07-04 07:30:41 +0900
committerNaoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>2022-08-02 00:54:57 +0900
commit9eb9bf0460b2bba954452126bc02cf74aeb731cd (patch)
treecf2a751eca7ada7a8658f765e4788971e20bb790
parente8a05c6f1ac288a8cfa5b0837313fec8fb7aadaf (diff)
Add qualification tools to librefop repo
The librefop use gcov, gnucomplexity and clang-format to realize qualification. This patch add these helper script into source tree. Bug-AGL: SPEC-4500 Signed-off-by: Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp> Change-Id: I014a0a315b08688470a540b397790aaee41d7efd
-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