Ejemplo n.º 1
0
 def setUp(self):
     super(BuildFarmTests, self).setUp()
     self.buildfarm = BuildFarm(self.path)
     self.write_compilers(["cc"])
     self.write_hosts({"myhost": "Fedora",
                       "charis": "Debian"})
     self.write_trees({"trivial": {"scm": "git", "repo": "git://foo", "branch": "master"},
                       "other": {"scm": "git", "repo": "other.git", "branch": "HEAD"}})
     self.buildfarm.commit()
     self.x = BuildFarm(self.path)
Ejemplo n.º 2
0
 def setUp(self):
     super(BuildResultStoreTests, self).setUp()
     self.buildfarm = BuildFarm(self.path)
     self.write_compilers(["cc", "gcc"])
     self.write_hosts({"charis": "Some machine",
                       "myhost": "Another host"})
     self.x = self.buildfarm.builds
Ejemplo n.º 3
0
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

from buildfarm import (
    BuildFarm,
    hostdb,
)
import commands
import os
import smtplib
import sys
import time
from email.MIMEText import MIMEText

buildfarm = BuildFarm()


def update_rsyncd_secrets():
    temp_rsyncd_secrets = os.path.join(os.path.dirname(__file__),
                                       "../rsyncd.secrets.new")
    f = open(temp_rsyncd_secrets, "w")
    f.writelines(buildfarm.hostdb.create_rsync_secrets())
    f.close()

    os.rename(temp_rsyncd_secrets, "../rsyncd.secrets")


dry_run = False

print "Samba Build farm management tool"
Ejemplo n.º 4
0
import smtplib

parser = optparse.OptionParser("import-and-analyse [options]")
parser.add_option(
    "--dry-run",
    help=
    "Will cause the script to send output to stdout instead of to sendmail.",
    action="store_true")
parser.add_option("--verbose", help="Be verbose", action="count")

(opts, args) = parser.parse_args()

resource.setrlimit(resource.RLIMIT_RSS, (300000, 300000))
resource.setrlimit(resource.RLIMIT_DATA, (300000, 300000))

buildfarm = BuildFarm(timeout=40.0)

smtp = smtplib.SMTP()
smtp.connect()


def check_and_send_mails(cur, old):

    if cur.tree is "waf":
        # no point sending emails, as the email addresses are invalid
        return

    if cur.tree is "samba_3_waf":
        # no emails for this until it stabilises a bit
        return