I am teaching a high school computer science class, and am trying to automate the execution of JUnit tests against all of my student submissions. I am using a perl script wrapper to clone the student repositories and originally used system("gradle test") to run the tests within each repository.
I found that I needed to add a timeout mechanism because a number of my students created circular loops in their code, so I switched to using IPC::Cmd as follows:
$cmd = "gradle test";
my ($success, $error, $full_buf,$stdout_buf,$stderr_buf) =
run (command =>$cmd, verbose => 1, timeout => 20);
This works great on a Mac, but on Windows, I get the following error from gradle: Could not determine if Stdout is a console: could not get handle file information (errno 1)
I have tried redirecting both stdout and stderr, but then it fails for stdin... Any ideas would be greatly appreciated.