[libvirt] [libvirt-test-API][PATCH] Modify makefile to add check option.

Liping Cheng lcheng at redhat.com
Wed Jun 29 10:16:23 UTC 2016


ACK


Liping


----- Original Message -----
From: "Ruifeng Bian" <rbian at redhat.com>
To: libvir-list at redhat.com
Cc: "Ruifeng Bian" <rbian at redhat.com>
Sent: Wednesday, June 29, 2016 5:01:26 PM
Subject: [libvirt] [libvirt-test-API][PATCH] Modify makefile to add check	option.

Use inspektor to check code style.

Change-Id: I8c238c785f8e5dbd585379cad0d4687d0d5b5ce2
Signed-off-by: Ruifeng Bian <rbian at redhat.com>
---
 Makefile        |  3 +++
 selftests/check | 15 +++++++++++++++
 2 files changed, 18 insertions(+)
 create mode 100755 selftests/check

diff --git a/Makefile b/Makefile
index 91a95db..837f41d 100644
--- a/Makefile
+++ b/Makefile
@@ -20,6 +20,9 @@ dist:
 	@echo " "
 	@echo "the archive is $(APP).tar.gz"
 
+check:
+	selftests/check
+
 clean:
 	@find . -name "*.pyc" -exec rm -f {} \;
 	@rm -rf log/ log.xml
diff --git a/selftests/check b/selftests/check
new file mode 100755
index 0000000..f064651
--- /dev/null
+++ b/selftests/check
@@ -0,0 +1,15 @@
+#!/bin/bash
+ret=0
+run_cmd() {
+    echo "Running '$1'"
+    $1
+    if [ $? != 0 ]; then
+        ret=1
+    fi
+    echo ""
+}
+run_cmd 'inspekt lint'
+run_cmd 'inspekt indent'
+run_cmd 'inspekt style'
+exit ${ret}
+
-- 
2.4.3

--
libvir-list mailing list
libvir-list at redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list




More information about the libvir-list mailing list