util/testing: Call test-lint target from what-jenkins-does

Instead of having duplicate lines in the what-jenkins-does target and
the test-lint target, make test-lint with the --junit argument from
what-jenkins-does.

Now there's only one place to update when changing the call.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: I2f90df76126f453fbcd91f4c4af5d784ac2dbe88
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69835
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/util/testing/Makefile.inc b/util/testing/Makefile.inc
index dfb66be..652adc4 100644
--- a/util/testing/Makefile.inc
+++ b/util/testing/Makefile.inc
@@ -88,10 +88,9 @@
 		exit 1; \
 	fi
 
-ifneq ($(JENKINS_SKIP_UNIT_TESTS),y)
-	util/lint/lint lint-stable --junit
-	util/lint/lint lint-extended --junit
 what-jenkins-does: test-cleanup validate_sec_tools
+ifneq ($(JENKINS_SKIP_LINT_TESTS),y)
+	JUNIT=--junit $(MAKE) test-lint
 endif
 	cd 3rdparty/intel-sec-tools/ ; go mod vendor
 	cd util/goswid ; go mod vendor
@@ -116,8 +115,8 @@
 test-basic: test-lint test-tools test-abuild test-payloads test-cleanup
 
 test-lint:
-	util/lint/lint lint-stable
-	util/lint/lint lint-extended
+	util/lint/lint lint-stable $(JUNIT)
+	util/lint/lint lint-extended $(JUNIT)
 
 test-abuild:
 	util/abuild/abuild -o $(COREBOOT_BUILD_DIR)/chromeos -B -e $(if $(TEST_NOCCACHE),,-y) -c $(CPUS) -p $(TEST_PAYLOAD) -x