Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

I'd like to write some automated test scripts that can check the state of the device as its running. I think I can do the control using the Grinder perl API and do the feedback by rerouting DBGPRINTF Logger output to a socket.

However, I don't think this will work when running emulator-only tests. Is it possible to log the emulator, as if it was an actual test device? Is there a way to capture the DBGPRINTF statements directly (i.e. tell windows or the emulator to send them to a socket)?

Also, is there a way to get other messages to the Logger besides using DBGPRINTF? Can I have the Logger report all messages sent to the application?

-Aaron

Also, is it possible to send a message to the Logger from the device without using DBGPRINTF? The helper source code to the logger DLL parser makes you think so...
-Aaron

Also, is it possible to send a message to the Logger from the device without using DBGPRINTF? The helper source code to the logger DLL parser makes you think so...
-Aaron

aisaksen wrote:I'd like to write some automated test scripts that can check the state of the device as its running. I think I can do the control using the Grinder perl API and do the feedback by rerouting DBGPRINTF Logger output to a socket.
However, I don't think this will work when running emulator-only tests. Is it possible to log the emulator, as if it was an actual test device? Is there a way to capture the DBGPRINTF statements directly (i.e. tell windows or the emulator to send them to a socket)?
Also, is there a way to get other messages to the Logger besides using DBGPRINTF? Can I have the Logger report all messages sent to the application?
-Aaron
Hi,
I am also trying to write automated perl scripts to test the app stages. I have used Grider and Logger API for this control. I have taken help from sampple scripts came with brew sdk. But it seems that there is an infinite loop and sometimes the log file is writing garbage and sometimes it does not write anything in the log files. The logger never ended.
The code :
...// some other functions.
print "Setting Log Mask\n";
if(BREWPerlIF::SetLogMask("0x000000000000000000000007FFF8")) {
printf "LogMask Setting successful\n" ;
else {
die "Could not Set LogMask\n";

#Setting logfile options
#===========================
printf "Setting Options\n";
my $filename = "C:\\BREW\\The Grinder\\logs\\BrewPerlIF_".$$; ## Add the process id extension to it.
if (BREWPerlIF::SetOptions_fileOnly($filename) == 0)
{
die "Could not set options successfully\n";
}
BREWPerlIF::SetFileSizeLimit(1000); # Limit: 1K
BREWPerlIF::SetNumOfFilesNeeded(1); # i.e total size: 1K
# Start logging
#=================
printf "Starting the logging: Log filename- $filename\n";
if( BREWPerlIF::StartLogger() == 0)
{
die "Could not start the logger\n";

else
{
printf("Video Playing!.\n");
}
//Here is the infinite loop... it keeps on printing "." in command prompt forever and nothing written in the log file.
while(BREWPerlIF::GetTotalFilesWritten() < 2 )
{
print ".";
sleep(1);

print "\n";
print "logging ended\n";
Please check the "RED" comment. Any help?
Thanks.

aisaksen wrote:I'd like to write some automated test scripts that can check the state of the device as its running. I think I can do the control using the Grinder perl API and do the feedback by rerouting DBGPRINTF Logger output to a socket.
However, I don't think this will work when running emulator-only tests. Is it possible to log the emulator, as if it was an actual test device? Is there a way to capture the DBGPRINTF statements directly (i.e. tell windows or the emulator to send them to a socket)?
Also, is there a way to get other messages to the Logger besides using DBGPRINTF? Can I have the Logger report all messages sent to the application?
-Aaron
Hi,
I am also trying to write automated perl scripts to test the app stages. I have used Grider and Logger API for this control. I have taken help from sampple scripts came with brew sdk. But it seems that there is an infinite loop and sometimes the log file is writing garbage and sometimes it does not write anything in the log files. The logger never ended.
The code :
...// some other functions.
print "Setting Log Mask\n";
if(BREWPerlIF::SetLogMask("0x000000000000000000000007FFF8")) {
printf "LogMask Setting successful\n" ;
else {
die "Could not Set LogMask\n";

#Setting logfile options
#===========================
printf "Setting Options\n";
my $filename = "C:\\BREW\\The Grinder\\logs\\BrewPerlIF_".$$; ## Add the process id extension to it.
if (BREWPerlIF::SetOptions_fileOnly($filename) == 0)
{
die "Could not set options successfully\n";
}
BREWPerlIF::SetFileSizeLimit(1000); # Limit: 1K
BREWPerlIF::SetNumOfFilesNeeded(1); # i.e total size: 1K
# Start logging
#=================
printf "Starting the logging: Log filename- $filename\n";
if( BREWPerlIF::StartLogger() == 0)
{
die "Could not start the logger\n";

else
{
printf("Video Playing!.\n");
}
//Here is the infinite loop... it keeps on printing "." in command prompt forever and nothing written in the log file.
while(BREWPerlIF::GetTotalFilesWritten() < 2 )
{
print ".";
sleep(1);

print "\n";
print "logging ended\n";
Please check the "RED" comment. Any help?
Thanks.

I have solved my own problem :D

I have solved my own problem :D