[Cdash] How to use 'add_last_sql_error()' calls to find what's wrong

Fabrice kraymer at gmail.com
Wed May 6 14:14:24 UTC 2009


Re,

I was testing the email preference subscription "Email me when *my
checkins*are breaking the dashboard" by doing Experimental builds that
are not
supposed to send emails, so let's forget about the empty query result.
Emails sendings when breaking dashboard work now.
But i had to add a line in the file cdash/sendemail.php to get
GetNumberOfErrors() function to work:

@@ -92,6 +92,7 @@
>    // Build errors and warnings
>    $Build = new Build();
>    $Build->Id = $buildid;
> +  $Build->BuildId = $buildid;
>    $errors['build_errors'] = $Build->GetNumberOfErrors();
>    $errors['build_warnings'] = $Build->GetNumberOfWarnings();
>

Am i missing something?

2009/5/5 Julien Jomier <julien.jomier at kitware.com>

> Hi Fabrice,
>
> The 'add_last_sql_error' function only prints out in the log if the SQL
> query returns an error. Could you check if the updatefile table as an author
> for the given buildid?
>
> You can use add_log('text','function') to write directly into the logs.
>
> Julien
>
> Fabrice wrote:
>
>> Hello all,
>>
>> My CDash version is 1.4.1.
>> I'm trying to find why i don't receive any emails when my checkins are
>> breaking the dashboard.
>> I have added some log statements in the source code and i think i've
>> targeted the problem in 'function lookup_emails_to_send()' :
>>
>>    $authors = pdo_query("SELECT author FROM updatefile WHERE
>>    buildid=".qnum($buildid));
>>    add_last_sql_error("sendmail");
>>
>>
>> The result of the query is empty in my case.
>>
>> I can't help to notice the add_last_sql_error("sendmail") call just after
>> the query. I don't know what it's for as nothing appear in the cdash.log
>> file.
>> Is there some other log file containing all the mysql queries that have
>> failed?
>>
>> Thanks for your help
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Cdash mailing list
>> Cdash at public.kitware.com
>> http://public.kitware.com/cgi-bin/mailman/listinfo/cdash
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cdash/attachments/20090506/1fc586de/attachment-0003.htm>


More information about the CDash mailing list