OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc4/] [contrib/] [regression/] [GCC_Regression_Tester.wdgt/] [widget.html] - Diff between revs 265 and 519

Only display areas with differences | Details | Blame | View Log

Rev 265 Rev 519
<!-- Get and update the GCC regression tester's web page.
<!-- Get and update the GCC regression tester's web page.
     Copyright (C) 2005, 2007, 2009 Free Software Foundation, Inc.
     Copyright (C) 2005, 2007, 2009 Free Software Foundation, Inc.
 
 
This file is part of GCC.
This file is part of GCC.
 
 
GCC is free software; you can redistribute it and/or modify it under
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
Software Foundation; either version 3, or (at your option) any later
version.
version.
 
 
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.
for more details.
 
 
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3.  If not see
along with GCC; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.  -->
<http://www.gnu.org/licenses/>.  -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd">
        "http://www.w3.org/TR/html4/strict.dtd">
<head>
<head>
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Regression Tester Status</title>
<title>Regression Tester Status</title>
<style type='text/css'>
<style type='text/css'>
body {
body {
        margin: 0px;
        margin: 0px;
        padding: 0px;
        padding: 0px;
}
}
pre {
pre {
        font-family: Monaco;
        font-family: Monaco;
        font-size: 9px;
        font-size: 9px;
        margin: 0px;
        margin: 0px;
        padding: 1px 2px 1px 2px;
        padding: 1px 2px 1px 2px;
        color: black;
        color: black;
        background-color: white;
        background-color: white;
        opacity: 0.8;
        opacity: 0.8;
}
}
</style>
</style>
<script type='text/javascript' defer>
<script type='text/javascript' defer>
// A string representing NUM, with a leading zero if it would be 1 digit long
// A string representing NUM, with a leading zero if it would be 1 digit long
function dig2 (num)
function dig2 (num)
{
{
    var result = num.toString();
    var result = num.toString();
    if (result.length == 1)
    if (result.length == 1)
        return '0' + result;
        return '0' + result;
    else
    else
        return result;
        return result;
}
}
 
 
// Get DATE as a string in standard ISO format in UTC
// Get DATE as a string in standard ISO format in UTC
function getISO (date)
function getISO (date)
{
{
    return (date.getUTCFullYear().toString() + '-'
    return (date.getUTCFullYear().toString() + '-'
            + dig2 (date.getUTCMonth() + 1) + '-'
            + dig2 (date.getUTCMonth() + 1) + '-'
            + dig2 (date.getUTCDate()) + 'T'
            + dig2 (date.getUTCDate()) + 'T'
            + dig2 (date.getUTCHours()) + ':'
            + dig2 (date.getUTCHours()) + ':'
            + dig2 (date.getUTCMinutes()) + 'Z');
            + dig2 (date.getUTCMinutes()) + 'Z');
}
}
 
 
// STR is a bunch of lines of the form '<key>: <date>' where <date> is in
// STR is a bunch of lines of the form '<key>: <date>' where <date> is in
// standard ISO UTC format.  Return a Date object corresponding to KEY, or null
// standard ISO UTC format.  Return a Date object corresponding to KEY, or null
// if none is found.
// if none is found.
function fromISO (str, key)
function fromISO (str, key)
{
{
    var rx = new RegExp (key + ": (\\d+)-(\\d+)-(\\d+)T(\\d+):(\\d+):(\\d+)Z");
    var rx = new RegExp (key + ": (\\d+)-(\\d+)-(\\d+)T(\\d+):(\\d+):(\\d+)Z");
    var match = rx.exec (str);
    var match = rx.exec (str);
    if (match == null || match.length != 7)
    if (match == null || match.length != 7)
        return null;
        return null;
    var date = new Date(0);
    var date = new Date(0);
    date.setUTCFullYear (match[1], match[2] - 1, match[3]);
    date.setUTCFullYear (match[1], match[2] - 1, match[3]);
    date.setUTCHours (match[4], match[5], match[6], 0);
    date.setUTCHours (match[4], match[5], match[6], 0);
    return date;
    return date;
}
}
 
 
// Update the data
// Update the data
function updateContents () {
function updateContents () {
    var url = 'http://gcc.gnu.org/regtest/HEAD/status.txt';
    var url = 'http://gcc.gnu.org/regtest/HEAD/status.txt';
    if (document.URL && document.URL.substring (0,5) == 'http:') {
    if (document.URL && document.URL.substring (0,5) == 'http:') {
        url = document.URL.replace ('widget.html','status.txt');
        url = document.URL.replace ('widget.html','status.txt');
    }
    }
    var xml_request = new XMLHttpRequest();
    var xml_request = new XMLHttpRequest();
 
 
    xml_request.onload = function(e)
    xml_request.onload = function(e)
        {
        {
            gotContents(e, xml_request);
            gotContents(e, xml_request);
        }
        }
    xml_request.open("GET", url);
    xml_request.open("GET", url);
    xml_request.setRequestHeader("Cache-Control", "max-age=30");
    xml_request.setRequestHeader("Cache-Control", "max-age=30");
    xml_request.send(null);
    xml_request.send(null);
}
}
 
 
function gotContents (event, request) {
function gotContents (event, request) {
    if (request.status != 200)
    if (request.status != 200)
        return;
        return;
 
 
    if (! request.responseText)
    if (! request.responseText)
        return;
        return;
 
 
    var txt = request.responseText;
    var txt = request.responseText;
    var today = new Date();
    var today = new Date();
    var date_r = fromISO (txt, "Date");
    var date_r = fromISO (txt, "Date");
    var completed_r = fromISO (txt, "Test-Completed");
    var completed_r = fromISO (txt, "Test-Completed");
    var now_test_r = fromISO (txt, "Now-Testing");
    var now_test_r = fromISO (txt, "Now-Testing");
    var eta = "";
    var eta = "";
 
 
    if (date_r != null && completed_r != null && now_test_r != null)
    if (date_r != null && completed_r != null && now_test_r != null)
        {
        {
            var eta_r = new Date (now_test_r.getTime()
            var eta_r = new Date (now_test_r.getTime()
                                  + completed_r.getTime() - date_r.getTime());
                                  + completed_r.getTime() - date_r.getTime());
            eta = "ETA: " + getISO (eta_r) + '\n';
            eta = "ETA: " + getISO (eta_r) + '\n';
        }
        }
 
 
    var val = txt + "Now: " + getISO (today) + '\n' + eta;
    var val = txt + "Now: " + getISO (today) + '\n' + eta;
    var contEl = document.getElementById ("contents");
    var contEl = document.getElementById ("contents");
    contEl.removeChild(contEl.firstChild);
    contEl.removeChild(contEl.firstChild);
    contEl.appendChild (document.createTextNode (val));
    contEl.appendChild (document.createTextNode (val));
}
}
 
 
var mainTimer = null;
var mainTimer = null;
 
 
function myOnShow ()
function myOnShow ()
{
{
    if (! mainTimer) {
    if (! mainTimer) {
        mainTimer = setInterval (updateContents, 60000);
        mainTimer = setInterval (updateContents, 60000);
    }
    }
    updateContents();
    updateContents();
}
}
 
 
function myOnHide ()
function myOnHide ()
{
{
    if (mainTimer) {
    if (mainTimer) {
        clearInterval (mainTimer);
        clearInterval (mainTimer);
        mainTimer = null;
        mainTimer = null;
    }
    }
}
}
 
 
function myOnLoad ()
function myOnLoad ()
{
{
    if ( window.widget ) {
    if ( window.widget ) {
        widget.onshow = myOnShow;
        widget.onshow = myOnShow;
        widget.onhide = myOnHide;
        widget.onhide = myOnHide;
    }
    }
    myOnShow();
    myOnShow();
}
}
</script>
</script>
</head>
</head>
 
 
<body onLoad='myOnLoad();'>
<body onLoad='myOnLoad();'>
<pre id="contents">Loading...</pre>
<pre id="contents">Loading...</pre>
</body>
</body>
</html>
</html>
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.