build: fix 'make test' target to build with clang
[vpp.git] / Makefile
index ed7d5b2..70e7dd3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -448,10 +448,16 @@ endef
 
 .PHONY: test
 test:
+ifeq ($(CC),cc)
+       $(eval CC=clang)
+endif
        $(call test,vpp,test)
 
 .PHONY: test-debug
 test-debug:
+ifeq ($(CC),cc)
+       $(eval CC=clang)
+endif
        $(call test,vpp_debug,test)
 
 .PHONY: test-cov