Commit a1fcd965 authored by Sebastien Robin's avatar Sebastien Robin

added script used for the reporting of unit test


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4082 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8b469c14
#!/bin/bash
DIRECTORY='/home/seb/zope/Products'
export USER=seb
rm -f $DIRECTORY/../tests/zLOG.log
rm -f $DIRECTORY/test_output
touch $DIRECTORY/test_output
rm -f $DIRECTORY/test_full_output
touch $DIRECTORY/test_full_output
$DIRECTORY/update_cvs
# missing : Portal Preference, ERP5Catalog, order , testERP5Categories
$DIRECTORY/ERP5Type/tests/runUnitTest.py testCMFActivity >> $DIRECTORY/test_full_output 2>&1
$DIRECTORY/ERP5Type/tests/runUnitTest.py testAlarm >> $DIRECTORY/test_full_output 2>&1
$DIRECTORY/ERP5Type/tests/runUnitTest.py testAccountingRules >> $DIRECTORY/test_full_output 2>&1
$DIRECTORY/ERP5Type/tests/runUnitTest.py testResource >> $DIRECTORY/test_full_output 2>&1
$DIRECTORY/ERP5Type/tests/runUnitTest.py testInteractionWorkflow >> $DIRECTORY/test_full_output 2>&1
#$DIRECTORY/ERP5Type/tests/runUnitTest.py testImmobilisation >> $DIRECTORY/test_full_output 2>&1
$DIRECTORY/ERP5Type/tests/runUnitTest.py testERP5BankingCashTransfer >> $DIRECTORY/test_full_output 2>&1
$DIRECTORY/ERP5Type/tests/runUnitTest.py testDomainTool >> $DIRECTORY/test_full_output 2>&1
$DIRECTORY/ERP5Type/tests/runUnitTest.py testERP5Category >> $DIRECTORY/test_full_output 2>&1
$DIRECTORY/ERP5Type/tests/runUnitTest.py testOrder >> $DIRECTORY/test_full_output 2>&1
$DIRECTORY/ERP5Type/tests/runUnitTest.py testPackingList >> $DIRECTORY/test_full_output 2>&1
$DIRECTORY/ERP5Type/tests/runUnitTest.py testTransformation >> $DIRECTORY/test_full_output 2>&1
$DIRECTORY/ERP5Type/tests/runUnitTest.py testProductionOrder >> $DIRECTORY/test_full_output 2>&1
$DIRECTORY/ERP5Type/tests/runUnitTest.py testInventory >> $DIRECTORY/test_full_output 2>&1
$DIRECTORY/ERP5Type/tests/runUnitTest.py testERP5HR >> $DIRECTORY/test_full_output 2>&1
$DIRECTORY/ERP5Type/tests/runUnitTest.py testBase >> $DIRECTORY/test_full_output 2>&1
$DIRECTORY/ERP5Type/tests/runUnitTest.py testBusinessTemplate >> $DIRECTORY/test_full_output 2>&1
$DIRECTORY/ERP5Type/tests/runUnitTest.py testERP5Type >> $DIRECTORY/test_full_output 2>&1
$DIRECTORY/ERP5Type/tests/runUnitTest.py testXMLMatrix >> $DIRECTORY/test_full_output 2>&1
$DIRECTORY/ERP5Type/tests/runUnitTest.py testConstraint >> $DIRECTORY/test_full_output 2>&1
$DIRECTORY/ERP5Type/tests/runUnitTest.py testCMFCategory >> $DIRECTORY/test_full_output 2>&1
$DIRECTORY/ERP5Type/tests/runUnitTest.py testERP5Catalog >> $DIRECTORY/test_full_output 2>&1
$DIRECTORY/ERP5Type/tests/runUnitTest.py testPreferences >> $DIRECTORY/test_full_output 2>&1
$DIRECTORY/ERP5Type/tests/runUnitTest.py testERP5SyncML >> $DIRECTORY/test_full_output 2>&1
cat $DIRECTORY/test_full_output | grep '\(^OK\|^FAILED\|^Ran\)' >> $DIRECTORY/test_output
$DIRECTORY/sendMailToList
#!/usr/bin/python
import smtplib
from datetime import date
from email.MIMEText import MIMEText
from email.MIMEBase import MIMEBase
# Here are the email pacakge modules we'll need
from email.MIMEImage import MIMEImage
from email.MIMEMultipart import MIMEMultipart
COMMASPACE = ', '
test_msg = file('/home/seb/zope/Products/test_output','r').read()
test_msg = "Date : %s\n\n" % date.today().isoformat() + test_msg
#msg.set_payload(test_msg)
msg = MIMEMultipart()
#msg['content-type']=test_msg
msg['Subject'] = 'ERP5 Unit Test'
from_mail = "seb@nexedi.com"
msg['From'] = from_mail
to_mail = "erp5-report@nexedi.com"
msg['To'] = to_mail
#msg.preamble = 'ERP5 Unit Test'
# Guarantees the message ends in a newline
msg.preamble = 'ERP5 Unit Test'
msg.epilogue = ''
file_content = file('/home/seb/zope/Products/test_full_output','r').read()
mime_text = MIMEText(test_msg)
mime_text.add_header('Content-Disposition', 'attachment', filename='test_output')
msg.attach(mime_text)
mime_text = MIMEText(file_content)
mime_text.add_header('Content-Disposition', 'attachment', filename='test_full_output')
msg.attach(mime_text)
# Send the email via our own SMTP server.
s = smtplib.SMTP()
s.connect()
s.sendmail(from_mail, to_mail, msg.as_string())
s.close()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment