[Buildbot-commits] buildbot/buildbot/test test_slavecommand.py,1.6,1.7

Brian Warner warner at users.sourceforge.net
Sat Dec 4 22:30:25 UTC 2004


Update of /cvsroot/buildbot/buildbot/buildbot/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32089/buildbot/test

Modified Files:
	test_slavecommand.py 
Log Message:
use sys.executable instead of hard-coding 'python' for child commands, might
help portability


Index: test_slavecommand.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_slavecommand.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- test_slavecommand.py	14 Oct 2004 17:28:34 -0000	1.6
+++ test_slavecommand.py	4 Dec 2004 22:30:23 -0000	1.7
@@ -11,7 +11,7 @@
     import sys
     startLogging(sys.stdout)
 
-import re, time
+import re, time, sys
 import signal
 
 from buildbot.slave.commands import SlaveShellCommand
@@ -115,7 +115,7 @@
         self.assertEquals(got, expected)
         
     def testShell1(self):
-        cmd = "python emit.py 0"
+        cmd = sys.executable + " emit.py 0"
         args = {'command': cmd, 'workdir': '.', 'timeout': 5}
         failed = self.doTest(SlaveShellCommand, args)
         self.failIf(failed)
@@ -124,7 +124,7 @@
         self.checkrc(0)
 
     def testShell2(self):
-        cmd = "python emit.py 1"
+        cmd = sys.executable + " emit.py 1"
         args = {'command': cmd, 'workdir': '.', 'timeout': 5}
         failed = self.doTest(SlaveShellCommand, args)
         self.failIf(failed)
@@ -133,7 +133,7 @@
         self.checkrc(1)
 
     def testShell3(self):
-        cmd = "python emit.py 0"
+        cmd = sys.executable + " emit.py 0"
         args = {'command': cmd, 'workdir': '.',
                 'env': {'EMIT_TEST': "envtest"}, 'timeout': 5}
         failed = self.doTest(SlaveShellCommand, args)
@@ -145,7 +145,7 @@
         self.checkrc(0)
 
     def testShell4(self):
-        cmd = "python emit.py 0"
+        cmd = sys.executable + " emit.py 0"
         args = {'command': cmd, 'workdir': "subdir", 'timeout': 5}
         failed = self.doTest(SlaveShellCommand, args)
         self.failIf(failed)





More information about the Commits mailing list