Test system included into Android build

This commit is contained in:
Andrey Kamaev
2011-04-11 14:47:06 +00:00
parent 1a02877ab7
commit b906ad3108
17 changed files with 91 additions and 78 deletions

View File

@@ -183,16 +183,15 @@ CvCapture_OpenNI::CvCapture_OpenNI()
// Write configuration to the temporary file.
// This is a hack, because there is a bug in RunXmlScript().
// TODO: remove hack when bug in RunXmlScript() will be fixed.
char xmlFilename[100];
tmpnam( xmlFilename );
std::ofstream outfile( xmlFilename );
string xmlFilename = tempfile();
std::ofstream outfile( xmlFilename.c_str() );
outfile.write( XMLConfig.c_str(), XMLConfig.length() );
outfile.close();
status = context.RunXmlScriptFromFile( xmlFilename );
status = context.RunXmlScriptFromFile( xmlFilename.c_str() );
// Remove temporary configuration file.
remove( xmlFilename );
remove( xmlFilename.c_str() );
#else
status = context.RunXmlScript( XMLConfig.c_str() );
#endif