From 2caa5db5b21cdddfcc9c7b62334d7bf83c573f52 Mon Sep 17 00:00:00 2001 From: cherierm Date: Fri, 13 Apr 2007 09:29:34 +0000 Subject: [PATCH] a script to launch the sg test on Windows git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3404 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- examples/gras/all2all/test_sg.vbs | 29 +++++++++++++++++++++++++++++ examples/gras/chrono/test_sg.vbs | 29 +++++++++++++++++++++++++++++ examples/gras/mmrpc/test_sg.vbs | 29 +++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+) create mode 100644 examples/gras/all2all/test_sg.vbs create mode 100644 examples/gras/chrono/test_sg.vbs create mode 100644 examples/gras/mmrpc/test_sg.vbs diff --git a/examples/gras/all2all/test_sg.vbs b/examples/gras/all2all/test_sg.vbs new file mode 100644 index 0000000000..ab5590bc6f --- /dev/null +++ b/examples/gras/all2all/test_sg.vbs @@ -0,0 +1,29 @@ +Dim oShell +Dim sInstallDirectory ' The install directory of the simulator Simgrid +Dim sCurrentDirectory ' The current directory of the script +Dim sCommandLine ' The command line of the application to launch +Dim iExitCode ' The exit code of the application to launch + +Set oShell = WScript.CreateObject ("WSCript.shell") +Set oUseEnv = oShell.Environment("USER") + +' Get the install directory of Simgrid from the environment variable SG_INSTALL_DIR +sInstallDirectory = oUseEnv("SG_INSTALL_DIR") +sCurrentDirectory = GetCurrentDirectory() +' Construct the command line of the application to launch +sCommandLine = "cmd /K " & sCurrentDirectory & "bin\all2all_simulator " & sInstallDirectory & "\simgrid\examples\msg\small_platform.xml " & sCurrentDirectory & "all2all.xml" + +iRetVal = oShell.run(sCommandLine,1,True) + +Set oShell = Nothing +Set oWshShell = Nothing + +' This function returns the directory of the script +Function GetCurrentDirectory() + Dim sScriptFullName + + sScriptFullName = WScript.ScriptFullName + GetCurrentDirectory = mid(sScriptFullName,1,InStrRev(sScriptFullName,"\")) + +End Function + diff --git a/examples/gras/chrono/test_sg.vbs b/examples/gras/chrono/test_sg.vbs new file mode 100644 index 0000000000..61e5e38d04 --- /dev/null +++ b/examples/gras/chrono/test_sg.vbs @@ -0,0 +1,29 @@ +Dim oShell +Dim sInstallDirectory ' The install directory of the simulator Simgrid +Dim sCurrentDirectory ' The current directory of the script +Dim sCommandLine ' The command line of the application to launch +Dim iExitCode ' The exit code of the application to launch + +Set oShell = WScript.CreateObject ("WSCript.shell") +Set oUseEnv = oShell.Environment("USER") + +' Get the install directory of Simgrid from the environment variable SG_INSTALL_DIR +sInstallDirectory = oUseEnv("SG_INSTALL_DIR") +sCurrentDirectory = GetCurrentDirectory() +' Construct the command line of the application to launch +sCommandLine = "cmd /K " & sCurrentDirectory & "bin\chrono_simulator " & sInstallDirectory & "\simgrid\examples\msg\small_platform.xml " & sCurrentDirectory & "chrono.xml" + +iRetVal = oShell.run(sCommandLine,1,True) + +Set oShell = Nothing +Set oWshShell = Nothing + +' This function returns the directory of the script +Function GetCurrentDirectory() + Dim sScriptFullName + + sScriptFullName = WScript.ScriptFullName + GetCurrentDirectory = mid(sScriptFullName,1,InStrRev(sScriptFullName,"\")) + +End Function + diff --git a/examples/gras/mmrpc/test_sg.vbs b/examples/gras/mmrpc/test_sg.vbs new file mode 100644 index 0000000000..a8da2372e6 --- /dev/null +++ b/examples/gras/mmrpc/test_sg.vbs @@ -0,0 +1,29 @@ +Dim oShell +Dim sInstallDirectory ' The install directory of the simulator Simgrid +Dim sCurrentDirectory ' The current directory of the script +Dim sCommandLine ' The command line of the application to launch +Dim iExitCode ' The exit code of the application to launch + +Set oShell = WScript.CreateObject ("WSCript.shell") +Set oUseEnv = oShell.Environment("USER") + +' Get the install directory of Simgrid from the environment variable SG_INSTALL_DIR +sInstallDirectory = oUseEnv("SG_INSTALL_DIR") +sCurrentDirectory = GetCurrentDirectory() +' Construct the command line of the application to launch +sCommandLine = "cmd /K " & sCurrentDirectory & "bin\mmrpc_simulator " & sInstallDirectory & "\simgrid\examples\msg\small_platform.xml " & sCurrentDirectory & "mmrpc.xml" + +iRetVal = oShell.run(sCommandLine,1,True) + +Set oShell = Nothing +Set oWshShell = Nothing + +' This function returns the directory of the script +Function GetCurrentDirectory() + Dim sScriptFullName + + sScriptFullName = WScript.ScriptFullName + GetCurrentDirectory = mid(sScriptFullName,1,InStrRev(sScriptFullName,"\")) + +End Function + -- 2.20.1