Running testcases from make file

I am trying to run a regression from a makefile.My code is

TEST_CASES = my_test2 my_test_with_1_1
     test:
	$(foreach i,$(TEST_CASES),vsim -novopt -onfinish stop -c -do "do wave.do; run -all; " my_top +UVM_TESTNAME=$(i) +UVM_VERBOSITY=UVM_LOW +UVM_OBJECTION_TRACE)

but when I am running “make test” I am getting an error **

only one -do option can be specified

**.
Why is this and how to solve it??

You can’t use ‘foreach’ in this manner. Reading the GNU make manual on the ‘foreach’ command, the multiple expansions are concatenated into a single result.

In reply to cgales:

To solve it, use a for loop in whatever the default shell used by your makefile