'************************************************************************* ' ' Licensed to the Apache Software Foundation (ASF) under one ' or more contributor license agreements. See the NOTICE file ' distributed with this work for additional information ' regarding copyright ownership. The ASF licenses this file ' to you under the Apache License, Version 2.0 (the ' "License"); you may not use this file except in compliance ' with the License. You may obtain a copy of the License at ' ' http://www.apache.org/licenses/LICENSE-2.0 ' ' Unless required by applicable law or agreed to in writing, ' software distributed under the License is distributed on an ' "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ' KIND, either express or implied. See the License for the ' specific language governing permissions and limitations ' under the License. ' '************************************************************************* ' ' short description : run several testscripts on windows ' ' - list of scripts to run is read from stdin ' - this script has been tested on WindowsXP and may run on Win2003 ' and Windows Vista ' - the script does *not* Support Win9x / WinME or WindowsNT ' - before you start the script set sLocation and sTestTool ' - run this script with: ' cscript.exe runtests.vbs have this line modified, because an error in ' *************-> testtool.exe. (the soffice processes are not ' *************-> killed in resetoffice.bas) ' *************-> 2009/07/06 ' *************-> wolfgang pechlaner (wope@openoffice.org) WshShell.Run sKill, 1, true '06.11.2009 Florian Bircher (fbircher@openoffice.org) WScript.Sleep 1000 sTestCase = oStdIn.ReadLine WScript.echo " " WScript.Echo "****************************************************" WScript.Echo "running " & sTestCase sTest = sLocation & sTestCase WScript.echo "*** -> " & sTest If not oFSO.FileExists( sTest ) Then WScript.Echo " Could not run " & sTest WScript.Echo " File not found" Else ' first run is the real test ... Set oExec = WshShell.Exec("""" & sTestTool & """ -run """ & sTest & """" ) WScript.Sleep 1000 If oExec.Status = 0 Then WScript.Echo " Successfully started" Else WScript.Echo " There might be something wrong with starting the Testtool!" End If '--- wait until Testtool has finished & closed While oExec.Status = 0 WScript.Sleep 1000 i = i+1 Wend End If 'run the office exit script! WScript.Echo " trying to kill the previous office process" WshShell.Run """" & sTestTool & """ -run """ & sExitOfficeBas & """", 1, true Set oExec = Nothing Wend WScript.Echo "Duration:" & i & "sec "