Move these, the simplest of our tests, to be run from avocado rather than
our hand-rolled test harness.
Signed-off-by: David Gibson
---
Makefile | 10 ++++++++++
avocado/static_checkers/clang-tidy.sh | 3 +++
avocado/static_checkers/cppcheck.sh | 3 +++
oldtest/run | 4 ++--
test/build/clang_tidy | 17 -----------------
test/build/cppcheck | 17 -----------------
test/run | 2 --
7 files changed, 18 insertions(+), 38 deletions(-)
create mode 100755 avocado/static_checkers/clang-tidy.sh
create mode 100755 avocado/static_checkers/cppcheck.sh
delete mode 100644 test/build/clang_tidy
delete mode 100644 test/build/cppcheck
diff --git a/Makefile b/Makefile
index a5256f5..0fd9fe9 100644
--- a/Makefile
+++ b/Makefile
@@ -294,3 +294,13 @@ cppcheck: $(SRCS) $(HEADERS)
--suppress=unusedStructMember \
$(filter -D%,$(FLAGS) $(CFLAGS) $(CPPFLAGS)) \
.
+
+AVOCADO = avocado
+
+.PHONY: avocado
+avocado:
+ $(MAKE) -C test
+ $(AVOCADO) run avocado
+
+check: avocado
+ $(MAKE) -C test check
diff --git a/avocado/static_checkers/clang-tidy.sh b/avocado/static_checkers/clang-tidy.sh
new file mode 100755
index 0000000..67bcf27
--- /dev/null
+++ b/avocado/static_checkers/clang-tidy.sh
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+make clang-tidy
diff --git a/avocado/static_checkers/cppcheck.sh b/avocado/static_checkers/cppcheck.sh
new file mode 100755
index 0000000..2c6d396
--- /dev/null
+++ b/avocado/static_checkers/cppcheck.sh
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+make cppcheck
diff --git a/oldtest/run b/oldtest/run
index 75309f6..56fcd1b 100755
--- a/oldtest/run
+++ b/oldtest/run
@@ -66,8 +66,8 @@ run() {
setup build
# test build/all
-# test build/cppcheck
-# test build/clang_tidy
+ test build/cppcheck
+ test build/clang_tidy
teardown build
# setup pasta
diff --git a/test/build/clang_tidy b/test/build/clang_tidy
deleted file mode 100644
index 40573bf..0000000
--- a/test/build/clang_tidy
+++ /dev/null
@@ -1,17 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-or-later
-#
-# PASST - Plug A Simple Socket Transport
-# for qemu/UNIX domain socket mode
-#
-# PASTA - Pack A Subtle Tap Abstraction
-# for network namespace/tap device mode
-#
-# test/build/clang_tidy - Run source through clang-tidy(1) linter
-#
-# Copyright (c) 2021 Red Hat GmbH
-# Author: Stefano Brivio
-
-htools clang-tidy
-
-test Run clang-tidy
-host make clang-tidy
diff --git a/test/build/cppcheck b/test/build/cppcheck
deleted file mode 100644
index 0e1dbce..0000000
--- a/test/build/cppcheck
+++ /dev/null
@@ -1,17 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-or-later
-#
-# PASST - Plug A Simple Socket Transport
-# for qemu/UNIX domain socket mode
-#
-# PASTA - Pack A Subtle Tap Abstraction
-# for network namespace/tap device mode
-#
-# test/build/cppcheck - Run source through cppcheck(1) linter
-#
-# Copyright (c) 2021 Red Hat GmbH
-# Author: Stefano Brivio
-
-htools cppcheck
-
-test Run cppcheck
-host make cppcheck
diff --git a/test/run b/test/run
index 8f4f845..ce24f44 100755
--- a/test/run
+++ b/test/run
@@ -66,8 +66,6 @@ run() {
setup build
test build/all
- test build/cppcheck
- test build/clang_tidy
teardown build
setup pasta
--
2.40.0