Skip to content

Commit

Permalink
Makefile,contrib: update test tags linter to reject integration_tests…
Browse files Browse the repository at this point in the history
… tag

Signed-off-by: Timo Beckers <timo@isovalent.com>
  • Loading branch information
ti-mo committed Apr 18, 2023
1 parent e784448 commit 73fae19
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,8 @@ endif
$(QUIET) contrib/scripts/check-fmt.sh
@$(ECHO_CHECK) contrib/scripts/check-log-newlines.sh
$(QUIET) contrib/scripts/check-log-newlines.sh
@$(ECHO_CHECK) contrib/scripts/check-privileged-tests-tags.sh
$(QUIET) contrib/scripts/check-privileged-tests-tags.sh
@$(ECHO_CHECK) contrib/scripts/check-test-tags.sh
$(QUIET) contrib/scripts/check-test-tags.sh
@$(ECHO_CHECK) contrib/scripts/check-assert-deep-equals.sh
$(QUIET) contrib/scripts/check-assert-deep-equals.sh
@$(ECHO_CHECK) contrib/scripts/lock-check.sh
Expand Down
12 changes: 0 additions & 12 deletions contrib/scripts/check-privileged-tests-tags.sh

This file was deleted.

12 changes: 12 additions & 0 deletions contrib/scripts/check-test-tags.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

g=$(grep -Elr '^//go:build.*(privileged_tests|integration_tests)' . --include \*_test.go \
--exclude-dir={.git,_build,vendor,test})

if [ -n "$g" ]; then
echo "Test file(s) containing deprecated build tag:"
echo $g
echo
echo "Use testutils.{Privileged,Integration}{Check,Test} for marking tests."
exit 1
fi

0 comments on commit 73fae19

Please sign in to comment.