next-checks: add clippy-test to next-clippy-checks
We are currently only running clippy checks for each platform but
not for the tests.
* Run clippy checks for all platforms and for tests. The latter is
done via the new "clippy-tests" target that was recently added
on the Makefile.
* Remove repetition of clippy tests on the platforms already set up
Change-Id: I5558c77e942cf4ada0d4bc721315f4fcf289ab18
Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com>
diff --git a/group/tf-next-build/fvp-next:nil b/group/tf-next-build/fvp-next:nil
index 3cdfcfb..5635b09 100644
--- a/group/tf-next-build/fvp-next:nil
+++ b/group/tf-next-build/fvp-next:nil
@@ -4,11 +4,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
#
-pre_tf_build() {
- if not_upon "$local_ci"; then
- make PLAT=fvp -C "$tf_root/rust" clippy
- fi
-}
post_tf_build() {
build_fip RUST=1 PLAT=fvp
diff --git a/group/tf-next-build/qemu-next:nil b/group/tf-next-build/qemu-next:nil
index cb21adf..219193d 100644
--- a/group/tf-next-build/qemu-next:nil
+++ b/group/tf-next-build/qemu-next:nil
@@ -4,8 +4,3 @@
#
# SPDX-License-Identifier: BSD-3-Clause
#
-pre_tf_build() {
- if not_upon "$local_ci"; then
- make PLAT=qemu -C "$tf_root/rust" clippy
- fi
-}
diff --git a/script/next-checks/next-checks-clippy.sh b/script/next-checks/next-checks-clippy.sh
index 5b8539d..167bab9 100755
--- a/script/next-checks/next-checks-clippy.sh
+++ b/script/next-checks/next-checks-clippy.sh
@@ -21,6 +21,7 @@
available_platforms=$(make --silent -C ${TF_ROOT}/rust list_platforms)
+# Run clippy for all platforms
for plat in $available_platforms
do
echo >> $LOG_FILE
@@ -36,6 +37,19 @@
fi
done
+# Now run clippy for tests
+echo >> $LOG_FILE
+echo "############### ${TEST_CASE} - platform: tests" >> "$LOG_FILE"
+echo >> $LOG_FILE
+make -C ${TF_ROOT}/rust clippy-test >> "$LOG_FILE" 2>&1
+
+if [ "$?" -ne 0 ]; then
+ echo -e " clippy-test\t: FAIL" >> "$LOG_TEST_FILENAME"
+ EXIT_VALUE=1
+else
+ echo -e " clippy-test\t: PASS" >> "$LOG_TEST_FILENAME"
+fi
+
echo >> "$LOG_TEST_FILENAME"
if [[ "$EXIT_VALUE" == 0 ]]; then
echo "Result : SUCCESS" >> "$LOG_TEST_FILENAME"