Changeset 17 for mergebot/trunk/utils
- Timestamp:
- Jun 8, 2009 3:07:47 AM (16 years ago)
- Location:
- mergebot/trunk/utils
- Files:
-
- 2 added
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
mergebot/trunk/utils/makerpm
r16 r17 1 1 #!/bin/bash 2 python setup.py bdist_rpm --install-script= bdist_rpm_installscript2 python setup.py bdist_rpm --install-script=utils/bdist_rpm_installscript -
mergebot/trunk/utils/test.py
r16 r17 12 12 13 13 14 from trac.tests.functional import FunctionalTestSuite, FunctionalTestEnvironment, FunctionalTester, TwillTest, tc, b, logfile14 from trac.tests.functional import FunctionalTestSuite, FunctionalTestEnvironment, FunctionalTester, FunctionalTwillTestCaseSetup, tc, b, logfile 15 15 from trac.tests.contentgen import random_page #, random_sentence, random_word 16 16 17 17 18 class MergeBotTestEnvironment(FunctionalTestEnvironment):19 """Slight change to FunctionalTestEnvironment to keep the PYTHONPATH from20 our environment.21 """22 def start(self):23 """Starts the webserver"""24 server = Popen(["python", "./trac/web/standalone.py",25 "--port=%s" % self.port, "-s",26 "--basic-auth=trac,%s," % self.htpasswd,27 self.tracdir],28 #env={'PYTHONPATH':'.'},29 stdout=logfile, stderr=logfile,30 )31 self.pid = server.pid32 time.sleep(1) # Give the server time to come up33 34 def _tracadmin(self, *args):35 """Internal utility method for calling trac-admin"""36 if call(["python", "./trac/admin/console.py", self.tracdir] +37 list(args),38 #env={'PYTHONPATH':'.'},39 stdout=logfile, stderr=logfile):40 raise Exception('Failed running trac-admin with %r' % (args, ))41 42 43 FunctionalTestEnvironment = MergeBotTestEnvironment18 #class MergeBotTestEnvironment(FunctionalTestEnvironment): 19 # """Slight change to FunctionalTestEnvironment to keep the PYTHONPATH from 20 # our environment. 21 # """ 22 # def start(self): 23 # """Starts the webserver""" 24 # server = Popen(["python", "./trac/web/standalone.py", 25 # "--port=%s" % self.port, "-s", 26 # "--basic-auth=trac,%s," % self.htpasswd, 27 # self.tracdir], 28 # #env={'PYTHONPATH':'.'}, 29 # stdout=logfile, stderr=logfile, 30 # ) 31 # self.pid = server.pid 32 # time.sleep(1) # Give the server time to come up 33 # 34 # def _tracadmin(self, *args): 35 # """Internal utility method for calling trac-admin""" 36 # if call(["python", "./trac/admin/console.py", self.tracdir] + 37 # list(args), 38 # #env={'PYTHONPATH':'.'}, 39 # stdout=logfile, stderr=logfile): 40 # raise Exception('Failed running trac-admin with %r' % (args, )) 41 # 42 # 43 #FunctionalTestEnvironment = MergeBotTestEnvironment 44 44 45 45 … … 148 148 port = 8889 149 149 baseurl = "http://localhost:%s" % port 150 self._testenv = FunctionalTestEnvironment("testenv%s" % port, port )150 self._testenv = FunctionalTestEnvironment("testenv%s" % port, port, baseurl) 151 151 152 152 # Configure mergebot … … 186 186 187 187 188 class MergeBotTestEnabled( TwillTest):188 class MergeBotTestEnabled(FunctionalTwillTestCaseSetup): 189 189 def runTest(self): 190 190 self._tester.logout() … … 197 197 198 198 199 class MergeBotTestQueueList( TwillTest):199 class MergeBotTestQueueList(FunctionalTwillTestCaseSetup): 200 200 def runTest(self): 201 201 tc.follow('MergeBot') … … 204 204 205 205 206 class MergeBotTestNoVersion( TwillTest):206 class MergeBotTestNoVersion(FunctionalTwillTestCaseSetup): 207 207 """Verify that if a ticket does not have the version field set, it will not 208 208 appear in the MergeBot list. … … 215 215 216 216 217 class MergeBotTestBranch( TwillTest):217 class MergeBotTestBranch(FunctionalTwillTestCaseSetup): 218 218 def runTest(self): 219 219 """Verify that the 'branch' button works""" … … 223 223 224 224 225 class MergeBotTestRebranch( TwillTest):225 class MergeBotTestRebranch(FunctionalTwillTestCaseSetup): 226 226 def runTest(self): 227 227 """Verify that the 'rebranch' button works""" … … 232 232 233 233 234 class MergeBotTestMerge( TwillTest):234 class MergeBotTestMerge(FunctionalTwillTestCaseSetup): 235 235 def runTest(self): 236 236 """Verify that the 'merge' button works""" … … 241 241 242 242 243 class MergeBotTestCheckMerge( TwillTest):243 class MergeBotTestCheckMerge(FunctionalTwillTestCaseSetup): 244 244 def runTest(self): 245 245 """Verify that the 'checkmerge' button works""" … … 250 250 251 251 252 class MergeBotTestSingleUseCase( TwillTest):252 class MergeBotTestSingleUseCase(FunctionalTwillTestCaseSetup): 253 253 def runTest(self): 254 254 """Create a branch, make a change, checkmerge, and merge it."""
Note: See TracChangeset
for help on using the changeset viewer.