Skip to content

Commit

Permalink
fixed output
Browse files Browse the repository at this point in the history
  • Loading branch information
aijunbai committed Feb 25, 2016
1 parent 4fff9a2 commit d58e4a6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
24 changes: 14 additions & 10 deletions scripts/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,22 +443,26 @@ def gen_score_map(self):
if options.discuz:
game_data.run(lines, discuz)
elif options.html:
print "<head> "
print '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'
print "<title>Test Results</title> "
print "</head>"
print "<body>"
print """
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="60">
<title>Test Results</title>
</head>
<body>
"""
if options.temp:
print "<h1>Test Results<font color=Red> (Can be killed any time!)</font></h1>"
else:
print "<h1>Test Results</h1>"
print "<hr>"
game_data.run(lines, html)
print "<hr>"
print '<img src="result.d/curve.png" alt="Winning Rate" style="width:304px;height:190px;">'
print "<hr>"
print '<img src="result.d/map.png" alt="Score Map" style="width:304px;height:190px;">'
print "</body>"
print """
<hr>
<img src="result.d/curve.png" alt="Winning Rate" style="width:608px;height:380px;">
<img src="result.d/map.png" alt="Score Map" style="width:608px;height:380px;">
</body>
"""
elif options.no_color:
game_data.run(lines, no_color)
else:
Expand Down
4 changes: 3 additions & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ match() {
FULL_OPTIONS="$FULL_OPTIONS -server::team_l_start=\"./start_left $LEFT_CLIENT $HOST $PORT $COACH_PORT $OLCOACH_PORT $TRAINING\""
fi

echo run_server $FULL_OPTIONS
run_server $FULL_OPTIONS &>$RESULT
fi

sleep 1
generate_html
done
}
Expand All @@ -170,6 +170,7 @@ generate_html() {
./result.sh --html >$HTML
fi

./analyze.sh 2>/dev/null
echo -e "<hr>" >>$HTML
echo -e "<p><small>"`whoami`" @ "`date`"</small></p>" >>$HTML
rm -f $HTML_GENERATING_LOCK
Expand Down Expand Up @@ -219,6 +220,7 @@ autotest() {
local PORT=`expr $DEFAULT_PORT + $i \* 1000`
match $HOST $PORT &
i=`expr $i + 1`
sleep 1
done
}

Expand Down

0 comments on commit d58e4a6

Please sign in to comment.