Browse Source

* fix -rpath passing to linker for Windows OS by
avoiding use of single quotes.
* Use 'ulimit -t ' instead of timeout for bash shells.

git-svn-id: trunk@19477 -

pierre 14 years ago
parent
commit
e366c013e3
1 changed files with 7 additions and 3 deletions
  1. 7 3
      tests/utils/dotest.pp

+ 7 - 3
tests/utils/dotest.pp

@@ -730,7 +730,9 @@ begin
       if Config.NeedLibrary then
       if Config.NeedLibrary then
         begin
         begin
           if CompilerTarget<>'darwin' then
           if CompilerTarget<>'darwin' then
-            args:=args+' -Fl'+TestOutputDir+' ''-k-rpath .'''
+          { do not use single quote for -k as they are mishandled on
+            Windows Shells }
+            args:=args+' -Fl'+TestOutputDir+' -k-rpath -k.'
           else
           else
             args:=args+' -Fl'+TestOutputDir;
             args:=args+' -Fl'+TestOutputDir;
         end;
         end;
@@ -1115,11 +1117,13 @@ begin
 
 
       if UseTimeout then
       if UseTimeout then
       begin
       begin
-        execcmd:=execcmd+'timeout -9 ';
         if Config.Timeout=0 then
         if Config.Timeout=0 then
           Config.Timeout:=DefaultTimeout;
           Config.Timeout:=DefaultTimeout;
         str(Config.Timeout,s);
         str(Config.Timeout,s);
-        execcmd:=execcmd+s;
+        if (RemoteShellBase='bash') then
+          execcmd:=execcmd+'ulimit -t '+s+'; '
+        else
+          execcmd:=execcmd+'timeout -9 '+s;
       end;
       end;
       { as we moved to RemotePath, if path is not absolute
       { as we moved to RemotePath, if path is not absolute
         we need to use ./execfilename only }
         we need to use ./execfilename only }