"; $dir = $_GET["check"]; $nbli = exec("ps aux | grep rtest.sh | grep -v grep | grep -v 'vi rtest.sh' | grep \"$dir\" | wc -l"); //$nbli = exec("ps aux | grep rtest.sh | grep $dir | wc -l"); if ($nbli === "0"){ echo "Process is NOT RUNNING
"; } else{ echo "Process is RUNNING
"; } // Afficher l'isntall du package //echo $all_results_dir.$dir."/install_pkg.Rout"; if (file_exists($all_results_dir.$dir."/install_pkg.Rout")){ if (file_exists($all_results_dir.$dir."/install_pkg_ok")){ $version = file_get_contents($all_results_dir.$dir."/pkg.version"); $status = "ok, version $version"; $color = "#4EE877"; } else if(file_exists($all_results_dir.$dir."/install_pkg_problem")){ $status = "problem"; $color = "red"; } else{ $status = "running"; $color = "yellow"; } echo "$package_to_test INSTALL PROCESS"; echo "$status"; echo ""; } // Afficher l'update //echo $all_results_dir.$dir."/update.Rout"; if (file_exists($all_results_dir.$dir."/update.Rout")){ if (file_exists($all_results_dir.$dir."/update_ok")){ $status = "ok"; $color = "#4EE877"; } else if(file_exists($all_results_dir.$dir."/update_problem")){ $status = "problem"; $color = "red"; } else{ $status = "running"; $color = "yellow"; } echo "UPDATE PROCESS"; echo "$status"; echo ""; } // INSTALL foreach(scandir($all_results_dir.$dir) as $elem){ // si c'est un package tar if (strpos($elem,"_install.Rout") != False){ $package = explode("_",$elem); $package_name = $package[0]; // si CHECKOK if (file_exists($all_results_dir.$dir."/".$package_name."_install_ok")){ $status = "ok"; $color = "#4EE877"; } // si CHECKPROBLEM else if(file_exists($all_results_dir.$dir."/".$package_name."_install_problem")){ $status = "problem"; $color = "red"; } else{ $status = "running"; $color = "yellow"; } $log = file_get_contents($all_results_dir.$dir."/".$package_name."_install.Rout"); echo "INSTALL $package_name"; echo "$status"; echo ""; } } // CHECK foreach(scandir($all_results_dir.$dir) as $elem){ // si c'est un package tar if (strpos($elem,".tar.gz") != False){ $package = explode("_",str_replace(".tar.gz","",$elem)); $package_name = $package[0]; $package_version = $package[1]; // si CHECKOK if (file_exists($all_results_dir.$dir."/".$package_name.".CHECKOK")){ $status = "ok"; $color = "#4EE877"; } // si CHECKPROBLEM else if(file_exists($all_results_dir.$dir."/".$package_name.".CHECKPROBLEM")){ $status = "problem"; $color = "red"; } else{ $status = "running"; $color = "yellow"; } $log = file_get_contents($all_results_dir.$dir."/".$package_name.".Rcheck/00check.log"); echo "CHECK $package_name V $package_version"; echo "$status"; echo ""; } } echo ""; } else{ # on montre les tests dispos foreach(scandir($all_results_dir) as $elem){ // si c'est un dossier de check if (strpos("a".$elem,"check_") != False){ echo "$elem
"; } } } ?>