~vauxoo/openerp-tools/runbot7_vauxoo_force_build_sticky_dev_jorge

« back to all changes in this revision

Viewing changes to openerp-runbot/openerprunbot/jobs/install_all.py

  • Committer: Moises Lopez
  • Date: 2014-02-19 01:01:52 UTC
  • Revision ID: moylop260@vauxoo.com-20140219010152-0l3v8l5s7tvicete
[REF][openerp-runbot] Add a ugly pdb breakpoint with read file. TODO: Set a pdb config breakpoints.

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
        t.start()
119
119
 
120
120
    def work(self):
 
121
        if eval( open("pdb_set_trace", "r").read() ).get("install_all_def_work", False):
 
122
            import pdb;pdb.set_trace()
121
123
        try:
122
124
            log("start new work")
123
125
            self.state = STATE_PULLING
125
127
            r = self.pull_branches()
126
128
            log("pull_branches" + repr(r))
127
129
            if r:
128
 
                self.state = STATE_TESTING
 
130
                #self.state = STATE_TESTING#Here no start to test, only start rsync
129
131
                log("self.state" + repr( self.state) )
130
132
                self.start_time = time.time()
131
133
                self.start()
216
218
            os.rename(src,dst)
217
219
 
218
220
    def start_rsync(self):
 
221
        if eval( open("pdb_set_trace", "r").read() ).get("install_all_def_start_rsync", False):
 
222
            import pdb;pdb.set_trace()
219
223
        log("job-start-rsync",branch=self.name)
220
224
        for i in [self.server_path, self.log_path, self.flags_path, self.client_web_doc_path]:
221
225
            if not os.path.exists(i):
246
250
            
247
251
        current_path = os.path.join( os.getcwd(), 'static' ) + os.sep
248
252
        cmd = "grep -rl a2aevl8w " + current_path + "  | xargs sed -i 's/a2aevl8w/admin/g'"
 
253
        log("start grep",cmd=cmd)
249
254
        subprocess.call(cmd, shell=True)
 
255
        log("end grep",cmd=cmd)
250
256
        
251
257
        current_path = os.path.join( os.getcwd(), 'repo' ) + os.sep
252
258
        cmd = "grep -rl a2aevl8w " + current_path + "  | xargs sed -i 's/a2aevl8w/admin/g'"
 
259
        log("start grep",cmd=cmd)
253
260
        subprocess.call(cmd, shell=True)
 
261
        log("end grep",cmd=cmd)
254
262
 
255
263
 
256
264
    def start_createdb(self, no_create=False):
301
309
        return rc
302
310
 
303
311
    def start_test_all(self, without_demo=False):
 
312
        if eval( open("pdb_set_trace", "r").read() ).get("install_all_def_start_test_all", False):
 
313
            import pdb;pdb.set_trace()
304
314
        log("job-start-server-all")
305
315
        mods = []
306
316
        if not os.path.exists(os.path.join(self.server_path,"openerp/addons")):
401
411
        self.client_web_pid=p.pid
402
412
 
403
413
    def start(self):
 
414
        if eval( open("pdb_set_trace", "r").read() ).get('"install_all_def_start"', False):
 
415
            import pdb;pdb.set_trace()
404
416
        log("job-start",branch=self.name,port=self.port)
405
417
        self.start_rsync()
406
418
        log("end: start_rsync")
407
419
        log("start: resolve_server_bin_path")
408
420
        self.resolve_server_bin_path()
409
421
        log("end: resolve_server_bin_path")
 
422
        self.state = STATE_TESTING#Here rsync ended and now start to test
410
423
        try:
411
424
            if self.test:
412
425
                if self.version and self.version.startswith('6.'):
430
443
        log("branch-started",branch=self.name,port=self.port)
431
444
 
432
445
    def stop(self):
 
446
        if eval( open("pdb_set_trace", "r").read() ).get('"install_all_def_stop"', False):
 
447
            import pdb;pdb.set_trace()
433
448
        log("Stopping job", id=self.job_id, branch=self.name)
434
449
        if self.running_server_pid:
435
450
            kill(self.running_server_pid, signal.SIGTERM)