From: Augustin Degomme Date: Tue, 1 Oct 2013 19:34:03 +0000 (+0200) Subject: adapt perl tesh to handle timeout from command line, and defaut to 50 for windows... X-Git-Tag: v3_9_90~53 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/39206ce7634bcbb07c6b8ec500e8a01e601d70eb adapt perl tesh to handle timeout from command line, and defaut to 50 for windows\nThis avoids some processes that hang at 100% cpu if ctest timeout is reached --- diff --git a/buildtools/Cmake/AddTests.cmake b/buildtools/Cmake/AddTests.cmake index 44209b92ba..5337fd9173 100644 --- a/buildtools/Cmake/AddTests.cmake +++ b/buildtools/Cmake/AddTests.cmake @@ -22,7 +22,7 @@ SET(TRIGGER_SITE "http://cdash.inria.fr/CDash/cgi-bin/Submit-Random-TestingResul #If you use the --read-var-info option Memcheck will run more slowly but may give a more detailed description of any illegal address. if(WIN32) -SET(TESH_COMMAND perl.exe ${CMAKE_BINARY_DIR}/bin/tesh) +SET(TESH_COMMAND perl.exe ${CMAKE_BINARY_DIR}/bin/tesh --timeout 50) else() SET(TESH_COMMAND ${CMAKE_BINARY_DIR}/bin/tesh) endif() diff --git a/buildtools/Cmake/Scripts/tesh.pl b/buildtools/Cmake/Scripts/tesh.pl index cbdc724554..174245cf48 100755 --- a/buildtools/Cmake/Scripts/tesh.pl +++ b/buildtools/Cmake/Scripts/tesh.pl @@ -15,6 +15,7 @@ B [I] I =cut my($bindir)="."; my($srcdir)="."; +my($timeout)=0; my $path = $0; my $OS; $path =~ s|[^/]*$||; @@ -67,6 +68,10 @@ sub cd_cmd { } } +sub timeout_cmd{ + $timeout=$_[1]; +} + sub setenv_cmd { my($var,$ctn); if ($_[0] =~ /^(.*)=(.*)$/) { @@ -120,6 +125,7 @@ sub get_options { 'debug|d' => \$opt{"debug"}, 'cd=s' => \&cd_cmd, + 'timeout=s' => \&timeout_cmd, 'setenv=s' => \&setenv_cmd, 'cfg=s' => \@cfg, 'log=s' => \$log, @@ -139,7 +145,6 @@ my %opts = get_options(@ARGV); ## my($sort)=0; my($nb_arg)=0; -my($timeout)=0; my($old_buffer); my($linebis); my($SIGABRT)=0;