Skip to content
Snippets Groups Projects
Commit e9ebad4c authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

trying again to remove .svn dir

parent c814baf9
No related branches found
No related tags found
No related merge requests found
body {
margin: 2em;
text-align: center;
}
table {
margin-left: auto;
margin-right: auto;
}
a {
text-decoration: none;
}
a:hover, a:visited {
color: inherit;
}
td {
text-align: center;
}
table{
border-collapse: collapse;
}
td.first_col {
text-align: left;
padding-right: 1em;
}
tr.even_line td {
background-color: #F0F0F0;
}
th {
padding-left: 0.5em;
padding-right: 0.5em;
border-bottom: solid black 1px;
}
td.slim_benchmark_failed {
color: red;
font-weight: bold;
}
td.slim_benchmark_passed {
color: green;
}
td.slim_benchmark_running {
color: orange;
font-weight: bold;
}
<?php
if($_SERVER["argc"]>1)
$server_path=$_SERVER["argv"][1];
else
$server_path=".";
echo <<<END
<html><head><title>GMSH/DG validation</title></head>
<style>
END;
include("benchmarks.css");
echo <<<END
</style>
<body>
<h3><a href="$server_path/index.php">GMSH/DG automatic testing report</a></h3>
<table class="slim_validation_table">
<tr class="odd_line">
<th class="first_col">test name</th>
<th>status</th>
<th>last tested</th>
<th>last passed</th>
<th>first failed</th>
<th>time</th>
<th>diff</th>
</tr>
END;
function read_file($filename){
if(file_exists($filename)){
$fh=fopen($filename,'r');
fscanf($fh,"%s",$r);
fclose($fh);
return $r;
}else{
return "none";
}
}
function print_with_log($rev,$log){
global $server_path;
if(file_exists($log)){
echo " <td><a href=$server_path/$log>$rev</a></td>\n";
}else{
echo " <td>$rev</td>\n";
}
}
$dir=opendir("results");
$all_test=scandir("results");
natcasesort($all_test);
foreach ($all_test as $test) {
if($test!="." && $test!=".."){
$status=read_file("results/".$test."/status",'r');
$last_tested=read_file("results/".$test."/last_tested",'r');
$last_passed=read_file("results/".$test."/last_passed",'r');
$first_failed=read_file("results/".$test."/first_failed",'r');
$time=read_file("results/".$test."/time",'r');
if($i%2==0)
echo"<tr class=\"even_line\">\n";
else
echo"<tr class=\"odd_line\">\n";
if(file_exists("results/".$test."/datafile")){
echo " <td class=\"first_col\"><a href=$server_path/results/$test/datafile>$test</a></td>\n";
}else{
echo " <td class=\"first_col\">$test</td>\n";
}
echo " <td class=\"slim_benchmark_$status\">$status</td>\n";
print_with_log($last_tested,"results/$test/log");
print_with_log($last_passed,"results/$test/log_last_passed");
print_with_log($first_failed,"results/$test/log_first_failed");
echo "<td>".$time."</td>\n";
echo "<td>\n";
if($first_failed!="none" && $last_passed!="none"){
echo "<a href=\"https://geuz.org/trac/gmsh/changeset?old_path=/trunk&old=$last_passed&new_path=/trunk&new=$first_failed\">$last_passed:$first_failed</a>";
}
echo "</td>\n";
echo "</tr>\n";
}
}
echo <<<END
</table>
</body>
</html>
END
?>
#!/bin/bash
while true; do
./test_all.sh
done
# $1 command $2 name $3 rev $4 dir
run_test() {
start_time=`date "+%s"`
ulimit -t 600
echo running "$2"
dir="$4/$2"
mkdir -p $dir
echo "$3" >"$dir/last_tested"
echo "running" > "$dir/status"
if $1 &>"$dir/log" ; then
echo "$3" >"$dir/last_passed"
rm -f $dir/first_failed
rm -f $dir/log_first_failed
cp "$dir/log" "$dir/log_last_passed"
echo "passed" |tee "$dir/status"
else
if [ ! -e "$dir/first_failed" ]; then
echo "$3" > "$dir/first_failed"
cp "$dir/log" "$dir/log_first_failed"
fi
echo "failed" |tee "$dir/status"
let nfailed=$nfailed+1
fi
end_time=`date "+%s"`
echo $(($end_time-$start_time)) > "$dir/time"
}
#!/usr/bin/php5
<?php
function concat($i,$j){
return "$i\n$j";
}
exec("/usr/bin/php5 -q benchmarks.php https://subversion.mema.ucl.ac.be/~slimdata",$result);
$mail_content=array_reduce($result,"concat");
$emails="richard.comblen@uclouvain.be,olivier.lietaer@uclouvain.be,sylvain.bouillon@uclouvain.be,olivier.gourgue@uclouvain.be,sebastien.blaise@uclouvain.be,benjamin.debrye@uclouvain.be,tuomas.karna@uclouvain.be,jonathanlambrechts@gmail.com";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: slim validation manager <richard.comblen@uclouvain.be>' . "\r\n";
mail($emails,"[slim automatic validation]",$mail_content,$headers);
?>
#!/bin/bash
dir_list="../gmsh"
export LC_ALL=C
get_revision(){
rev=-1
for i in $dir_list; do
cd $i
svn up
nrev=`LC_ALL=C svn info |grep Revision|awk '{print $2}'`
if [ $nrev -gt $rev ]; then
rev=$nrev
fi
cd - >/dev/null
done
}
source run_test.sh
if [ -e results/_global/last_tested ]; then
old_rev=`cat results/_global/last_tested`
else
old_rev=-1
fi
get_revision
if [ $rev -gt $old_rev ]; then
start_time_global=`date "+%s"`
nfailed=0
mkdir -p "results/_global"
echo "running" > "results/_global/status"
source ./test_compilation.sh $rev
source ./test_benchmarks.sh $rev
#generate _global entry
if [ $nfailed -gt 0 ];then
run_test '[ 1 -eq 0 ]' "_global" $rev results
# ./send_mail.php
else
# # send an email for first succeeded test
# if [ -e results/_global/first_failed ];then
# ./send_mail.php
# fi
run_test '[ 0 -eq 0 ]' "_global" $rev results
fi
end_time_global=`date "+%s"`
echo $(($end_time_global-$start_time_global)) > "results/_global/time"
#remove old test case's directories
for i in results/*; do
if [ -e $i/last_tested ]
then
lasttested=`cat $i/last_tested`
else
lasttested=-1
fi
if [ ! $lasttested -eq $rev ]; then
rm -rf $i
fi
done
else
sleep 20
fi
#!/bin/bash
# $1 svn revision id (ex 0)
source run_test.sh
result=true;
CDIR=$PWD
cd ../gmsh/Solver/TESTCASES/validation
for i in `find . -name '*.lua' | grep -v '.svn' | sort`; do
NAME=$(basename $i .lua)
echo $NAME
run_test "$CDIR/../build/default/gmsh $i -" "$NAME" "$1" "$CDIR/results"
done
cd $CDIR
#!/bin/bash
#$1 svn revision id
source run_test.sh
mkdir -p ../build
CDIR=$PWD
for i in ../build/*; do
cd $i
NAME=`basename $i`
run_test "make -j3" "compilation_$NAME" "$1" $HOME/validation/results
cd $CDIR
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment