コード例 #1
0
 def build_needed(self, version, build, buildpath):
     """
     Return True if the tests have never been run against the current changeset of 'build'
     Return False otherwise
     """
     if self.platform == 'darwin':
         buildpath = os.path.join(buildpath, 'Contents', 'MacOS')
     # Find new changeset
     new_changeset = utils.get_changeset(buildpath)
     if not (version, build) in self.changeset:
         self.changeset[(version, build)] = -1
     if self.changeset[(version, build)] != new_changeset:
         self.changeset[(version, build)] = new_changeset
         return True
     return False
コード例 #2
0
 def build_needed(self, section, build, buildpath):
     """
     Return True if the tests have never been run against the current changeset of 'build'
     Return False otherwise
     """
     if self.platform == 'darwin':
         buildpath = os.path.join(buildpath, 'Contents', 'MacOS')
     # Find new changeset
     new_changeset = utils.get_changeset(buildpath)
     if not (section, build) in self.changeset:
         self.changeset[(section, build)] = -1
     if self.changeset[(section, build)] != new_changeset:
         self.changeset[(section, build)] = new_changeset
         return True
     return False
コード例 #3
0
ファイル: fb_run.py プロジェクト: iamPHD/Firebug-Test-Runner
                logfile.write(
                    msg)  # Print out crash message with offending test
                self.log.warn("Possible crash detected - test run aborted")

        # Give last two lines of file a chance to write and send log file to fb_logs
        sleep(1)
        filename = logfile.name
        logfile.close()

        # Send log file to couchdb
        self.log.info("Sending log file to couchdb at '" + self.couchURI + "'")
        try:
            fb_logs.main([
                "--log", filename, "--database", self.databasename, "--couch",
                self.couchURI, "--changeset",
                utils.get_changeset(self.appdir), "--section", self.section
            ])
        except Exception:
            self.log.error("Log file not sent to couchdb at server: '" +
                           self.couchURI + "' and database: '" +
                           self.databasename)
            self.log.error(traceback.format_exc())

        # Cleanup
        mozRunner.stop()
        self.log.debug("Exiting - Status successful")
        self.cleanup()


# Called from the command line
def cli(argv=sys.argv[1:]):
コード例 #4
0
ファイル: fb_run.py プロジェクト: ahal/Firebug-Test-Runner
                logfile.close()
                logfile = open(filename, 'a')
                msg = "FIREBUG TEST-UNEXPECTED-FAIL | " + line + " | Possible Firefox crash detected\n"
                logfile.write(msg)       # Print out crash message with offending test
                self.log.warn("Possible crash detected - test run aborted")

        # Give last two lines of file a chance to write and send log file to fb_logs
        sleep(1)
        filename = logfile.name
        logfile.close()

        # Send log file to couchdb
        self.log.info("Sending log file to couchdb at '" + self.couchURI + "'")
        try:
            fb_logs.main(["--log", filename, "--database", self.databasename, "--couch", self.couchURI,
                             "--changeset", utils.get_changeset(self.appdir), "--section", self.section])
        except Exception:
            self.log.error("Log file not sent to couchdb at server: '" + self.couchURI + "' and database: '" + self.databasename)
            self.log.error(traceback.format_exc())

        # Cleanup
        mozRunner.stop()
        self.log.debug("Exiting - Status successful")
        self.cleanup()


# Called from the command line
def cli(argv=sys.argv[1:]):
    parser = OptionParser("usage: %prog [options]")
    parser.add_option("--appname", dest="binary",
                      help="Firefox binary path")
コード例 #5
0
                logfile.close()
                logfile = open(filename, 'a')
                msg = "FIREBUG TEST-UNEXPECTED-FAIL | " + line + " | Possible Firefox crash detected\n"
                logfile.write(msg)       # Print out crash message with offending test
                self.log.warn("Possible crash detected - test run aborted")

        # Give last two lines of file a chance to write and send log file to fb_logs  
        sleep(1)
        filename = logfile.name
        logfile.close()

        # Send log file to couchdb    
        self.log.info("Sending log file to couchdb at '" + self.couchURI + "'")
        try:
            fb_logs.main(["--log", filename, "--database", self.databasename, "--couch", self.couchURI,
                             "--changeset", utils.get_changeset(self.appdir)])
        except Exception, e:
            self.log.error("Log file not sent to couchdb at server: '" + self.couchURI + "' and database: '" + self.databasename + "': " + str(e))
        
        # Cleanup
        mozRunner.stop()
        self.log.debug("Exiting - Status successful")
        self.cleanup()


# Called from the command line
def cli(argv=sys.argv[1:]):
    parser = OptionParser("usage: %prog [options]")
    parser.add_option("--appname", dest="binary",
                      help="Firefox binary path")