if (isset($cmd)) {
session_start();
session_register('sess');
}
$htmlhead='
OpenOffice.org Smoke Tests Smoke Tests to validate OpenOffice.org builds ';
print($htmlhead);
function printtests() {
global $test,$groups;
foreach($groups as $group) {
print('Gruppo '.$group.' ');
for ($i=0,$nel=$test[$group]['nel'];$i<$nel;$i++) {
$title=$test[$group][$i];
print("$group $title Ok fallito non eseguito ");
}
}
}
function printlog() {
global $REMOTE_ADDR,$sess;
$message=sprintf("%s %-15s %-10s %-10s %-15s %-20s ",date('d/m/y H:i:s'),$REMOTE_ADDR,$sess['platform'],$sess['version'],$sess['name'],$sess['email']);
$nel=0;
foreach ($sess['groups'] as $group) {
if ($nel)
$message.=',';
$message.=$group;
$nel++;
}
$message.="\n";
error_log($message,3,'../logs/smoketests.log');
}
function createtests() {
global $test;
$nel=0;
$test['install'][$nel++]='install01';
$test['install'][$nel++]='install02';
$test['install']['nel']=$nel;
$nel=0;
$test['graphic'][$nel++]='gra_bmp01';
$test['graphic'][$nel++]='gra_dxf01';
$test['graphic'][$nel++]='gra_emf01';
$test['graphic'][$nel++]='gra_eps01';
$test['graphic'][$nel++]='gra_gif01';
$test['graphic'][$nel++]='gra_htm01';
$test['graphic'][$nel++]='gra_jpg01';
$test['graphic'][$nel++]='gra_met01';
$test['graphic'][$nel++]='gra_pbm01';
$test['graphic'][$nel++]='gra_pcd01';
$test['graphic'][$nel++]='gra_pct01';
$test['graphic'][$nel++]='gra_pcx01';
$test['graphic'][$nel++]='gra_pgm01';
$test['graphic'][$nel++]='gra_png01';
$test['graphic'][$nel++]='gra_ppm01';
$test['graphic'][$nel++]='gra_psd01';
$test['graphic'][$nel++]='gra_ras01';
$test['graphic'][$nel++]='gra_rtf01';
$test['graphic'][$nel++]='gra_sda01';
$test['graphic'][$nel++]='gra_sdc01';
$test['graphic'][$nel++]='gra_sdd01';
$test['graphic'][$nel++]='gra_sdw01';
$test['graphic'][$nel++]='gra_sgf01';
$test['graphic'][$nel++]='gra_sgv01';
$test['graphic'][$nel++]='gra_smf01';
$test['graphic'][$nel++]='gra_svm01';
$test['graphic'][$nel++]='gra_sxc01';
$test['graphic'][$nel++]='gra_sxd01';
$test['graphic'][$nel++]='gra_sxi01';
$test['graphic'][$nel++]='gra_sxm01';
$test['graphic'][$nel++]='gra_sxw01';
$test['graphic'][$nel++]='gra_tga01';
$test['graphic'][$nel++]='gra_tif01';
$test['graphic'][$nel++]='gra_txt01';
$test['graphic'][$nel++]='gra_wmf01';
$test['graphic'][$nel++]='gra_xbm01';
$test['graphic'][$nel++]='gra_xls01';
$test['graphic'][$nel++]='gra_xpm01';
$test['graphic'][$nel++]='jva_clk01';
$test['graphic']['nel']=$nel;
$nel=0;
$test['file'][$nel++]='aut_agn02';
$test['file'][$nel++]='aut_con02';
$test['file'][$nel++]='aut_euro2';
$test['file'][$nel++]='aut_fax02';
$test['file'][$nel++]='aut_form02';
$test['file'][$nel++]='aut_let02';
$test['file'][$nel++]='aut_mem02';
$test['file'][$nel++]='aut_pre02';
$test['file'][$nel++]='aut_web02';
$test['file'][$nel++]='file_bus02';
$test['file'][$nel++]='file_drw02';
$test['file'][$nel++]='file_for02';
$test['file'][$nel++]='file_htm02';
$test['file'][$nel++]='file_lab02';
$test['file'][$nel++]='file_mas02';
$test['file'][$nel++]='file_pre02';
$test['file'][$nel++]='file_spr02';
$test['file'][$nel++]='file_tmp02';
$test['file'][$nel++]='file_txt02';
$test['file'][$nel++]='sav_Enco';
$test['file'][$nel++]='sav_MS60';
$test['file'][$nel++]='sav_MS95';
$test['file'][$nel++]='sav_MS97';
$test['file'][$nel++]='sav_OO60';
$test['file'][$nel++]='sav_OO6T';
$test['file'][$nel++]='sav_RTF';
$test['file'][$nel++]='sav_SW30';
$test['file'][$nel++]='sav_SW3T';
$test['file'][$nel++]='sav_SW40';
$test['file'][$nel++]='sav_SW4T';
$test['file'][$nel++]='sav_SW50';
$test['file'][$nel++]='sav_SW5T';
$test['file'][$nel++]='sav_Text';
$test['file'][$nel++]='sav_WebP';
$test['file'][$nel++]='sen_htm02';
$test['file'][$nel++]='sen_mail02';
$test['file'][$nel++]='sen_mas02';
$test['file']['nel']=$nel;
$nel=0;
$test['insert'][$nel++]='ins_env03';
$test['insert'][$nel++]='ins_file03';
$test['insert'][$nel++]='ins_fld03';
$test['insert'][$nel++]='ins_flfr03';
$test['insert'][$nel++]='ins_frm03';
$test['insert'][$nel++]='ins_ftn03';
$test['insert'][$nel++]='ins_ftr03';
$test['insert'][$nel++]='ins_gra03';
$test['insert'][$nel++]='ins_hdr03';
$test['insert'][$nel++]='ins_htm03';
$test['insert'][$nel++]='ins_hzl03';
$test['insert'][$nel++]='ins_indx03';
$test['insert'][$nel++]='ins_mbk03';
$test['insert'][$nel++]='ins_note03';
$test['insert'][$nel++]='ins_obj03';
$test['insert'][$nel++]='ins_sch03';
$test['insert'][$nel++]='ins_sec03';
$test['insert'][$nel++]='ins_tbl03';
$test['insert'][$nel++]='ins_xref03';
$test['insert']['nel']=$nel;
$nel=0;
$test['edit'][$nel++]='cmp_doc04';
$test['edit'][$nel++]='cut_pas04';
$test['edit'][$nel++]='edt_nav04';
$test['edit'][$nel++]='ext_cp_pas04';
$test['edit'][$nel++]='find_rep04';
$test['edit']['nel']=$nel;
$nel=0;
$test['view'][$nel++]='vew_bars04';
$test['view'][$nel++]='vew_boun04';
$test['view'][$nel++]='vew_data04';
$test['view'][$nel++]='vew_fscr04';
$test['view'][$nel++]='vew_zoom04';
$test['view']['nel']=$nel;
$nel=0;
$test['format'][$nel++]='for_autf05';
$test['format'][$nel++]='for_cchr05';
$test['format'][$nel++]='for_chr05';
$test['format'][$nel++]='for_col05';
$test['format'][$nel++]='for_nubl05';
$test['format'][$nel++]='for_par05';
$test['format'][$nel++]='for_pg05';
$test['format'][$nel++]='for_sty05';
$test['format']['nel']=$nel;
$nel=0;
$test['tools'][$nel++]='aut_for06';
$test['tools'][$nel++]='bib_data06';
$test['tools'][$nel++]='config_06';
$test['tools'][$nel++]='footnote_06';
$test['tools'][$nel++]='gallery_06';
$test['tools'][$nel++]='lin_num06';
$test['tools'][$nel++]='options_06';
$test['tools'][$nel++]='out_num06';
$test['tools'][$nel++]='spl_chk06';
$test['tools']['nel']=$nel;
$nel=0;
$test['print'][$nel++]='gen_prt07';
$test['print']['nel']=$nel;
$nel=0;
$test['help'][$nel++]='help_01';
$test['help'][$nel++]='help_02';
$test['help'][$nel++]='help_03';
$test['help'][$nel++]='help_04';
$test['help'][$nel++]='help_05';
$test['help'][$nel++]='help_06';
$test['help'][$nel++]='help_07';
$test['help'][$nel++]='help_08';
$test['help']['nel']=$nel;
}
function printreport() {
global $test,$sess,$result,$bugdescr,$body;
foreach($sess['groups'] as $group) {
$nel=$test[$group]['nel'];
$body=$body.'Gruppo '.$group.' ';
$body=$body.'Ok: ';
for ($i=0;$i<$nel;$i++) {
$title=$test[$group][$i];
if (isset($result[$title]) && $result[$title]=='passed')
$body=$body."$title ";
}
$body=$body.' ';
$body=$body.'Falliti: ';
$nfailed=0;
for ($i=0;$i<$nel;$i++) {
$title=$test[$group][$i];
if (isset($result[$title]) && $result[$title]=='failed') {
if ($nfailed==0) {
$body=$body.'';
}
$body=$body.''.$title.' ';
if (isset($bugdescr[$title]) && $bugdescr[$title]!='')
$body=$body.$bugdescr[$title];
else
$body=$body.'Nessun commento';
$body=$body.' ';
$nfailed++;
}
}
if ($nfailed)
$body=$body.'
';
$body=$body.' ';
$body=$body.'Non eseguiti: ';
for ($i=0;$i<$nel;$i++) {
$title=$test[$group][$i];
if (isset($result[$title]) && $result[$title]=='not done')
$body=$body."$title ";
}
$body=$body.' ';
}
}
if (isset($cmd) && $cmd=='Invia Info' && isset($email) && isset($groups) && isset($version)) {
// create a php session
$sess['name']=$name;
$sess['email']=$email;
$sess['platform']=$platform;
$sess['version']=$version;
$sess['groups']=$groups;
printlog();
print('');
} else if (isset($cmd) && $cmd=='Invia Form') {
// Invia form a chi di dovere
print('');
} else if (isset($cmd) && $cmd=='Invia report al responsabile') {
// now send email
mail('iw3grx@ir3ip.net','OpenOffice.org tests report',$htmlhead.$sess['header'].$sess['body'].$sess['footer'].'',"Content-Type: text/html");
mail('davide.dozza@yacme.com','OpenOffice.org tests report',$htmlhead.$sess['header'].$sess['body'].$sess['footer'].'