Changeset b5b039 in indico


Ignore:
Timestamp:
06/18/10 18:59:00 (3 years ago)
Author:
Pedro Ferreira <jose.pedro.ferreira@…>
Branches:
master, burotel, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, d9941f8582b36b24821a11ea5ba16fda6a457fb1
Children:
7d88c9
Parents:
574b7d
git-author:
Pedro Ferreira <jose.pedro.ferreira@…> (06/16/10 14:14:21)
git-committer:
Pedro Ferreira <jose.pedro.ferreira@…> (06/18/10 18:59:00)
Message:

[FIX] initial_setup - webserver uid/gid spec

  • re-introduced it;
  • also improved error handling in JS Unit;
Location:
indico
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/consoleScripts/indicoInitialSetup.py

    rbdd862 rb5b039  
    6161    global eggDir 
    6262 
    63     optlist, args = getopt.getopt(sys.argv[1:],'',['rpm','existing-config=']) 
     63    optlist, args = getopt.getopt(sys.argv[1:],'',['rpm','existing-config=', 
     64                                                   'www-uid=','www-gid=']) 
     65 
     66    wwwUid = None 
     67    wwwGid = None 
    6468 
    6569    forRPM = False 
     
    7175        elif o == '--existing-config': 
    7276            existingPath = a 
     77        elif o == "--www-uid": 
     78            wwwUid = a 
     79        elif o == "--www-gid": 
     80            wwwGid = a 
    7381 
    7482    setIndicoInstallMode(True) 
     
    97105                                     'common'), 
    98106                        eggDir, 
    99                         force_no_db=(existingPath != None)) 
     107                        force_no_db=(existingPath != None), 
     108                        uid = wwwUid, 
     109                        gid = wwwGid) 
    100110 
    101111if __name__ == '__main__': 
  • indico/tests/runners.py

    r574b7d rb5b039  
    680680                                              getJSUnitFilename(), 
    681681                                              JSTEST_CFG_FILE)) 
    682                 if jsDryRun[1].startswith("No browsers were captured"): 
    683                     print ("Js-test-driver server has not started yet. " 
    684                            "Attempt #%s\n") % (i+1) 
     682 
     683                # Not very nice error checking, but how to do it nicely? 
     684                if "browsers" in jsDryRun[1] or \ 
     685                    "Connection refused" in jsDryRun[1]: 
     686                    print "Js-test-driver server has not started yet. " \ 
     687                          "Attempt #%s\n" % (i+1) 
    685688                    time.sleep(5) 
    686689                else: 
     
    688691                    break 
    689692            else: 
    690                 return ('[ERR] Could not start js unit tests because ' 
    691                         'js-test-driver server cannot be started.\n') 
     693                raise Exception('Could not start js unit tests because ' 
     694                                'js-test-driver server cannot be started.\n') 
    692695 
    693696            #setting tests to run 
     
    723726 
    724727        except OSError, e: 
    725             return ("[ERR] Could not start js-test-driver server - command " 
    726                     "\"java\" needs to be in your PATH. (%s)\n" % e) 
     728            self._error("[ERR] Could not start js-test-driver server - command " 
     729                        "\"java\" needs to be in your PATH. (%s)\n" % e) 
    727730        except KeyError: 
    728             return "[ERR] Please specify a JSUnitFilename in tests.conf\n" 
    729  
    730         #stopping the server 
    731         server.kill() 
     731            self._error("[ERR] Please specify a JSUnitFilename in tests.conf\n") 
     732        except Exception, e: 
     733            self._error(e) 
     734        finally: 
     735            # stopping the server 
     736            server.kill() 
     737 
    732738        return True 
    733739 
Note: See TracChangeset for help on using the changeset viewer.