Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
a script to launch the sg test on Windows
authorcherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 13 Apr 2007 09:29:34 +0000 (09:29 +0000)
committercherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 13 Apr 2007 09:29:34 +0000 (09:29 +0000)
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 [new file with mode: 0644]
examples/gras/chrono/test_sg.vbs [new file with mode: 0644]
examples/gras/mmrpc/test_sg.vbs [new file with mode: 0644]

diff --git a/examples/gras/all2all/test_sg.vbs b/examples/gras/all2all/test_sg.vbs
new file mode 100644 (file)
index 0000000..ab5590b
--- /dev/null
@@ -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 (file)
index 0000000..61e5e38
--- /dev/null
@@ -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 (file)
index 0000000..a8da237
--- /dev/null
@@ -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
+