Include many files and call the same function from each file in a loop but got wrong result

I’m not sure that I understand the question. The code I wrote above puts each file in its own module, effectively preventing contamination. What exactly do you mean by pipelining your test code?