Native tests run again
This commit is contained in:
@@ -41,8 +41,7 @@ public:
|
||||
|
||||
size_t operator()(uint8_t *buffer, size_t maxLen, size_t index)
|
||||
{
|
||||
Serial.print("index ");
|
||||
Serial.println(index);
|
||||
Serial.printf("%ld index %u\n", millis(), index);
|
||||
|
||||
using namespace webdav_constants;
|
||||
uint8_t *bufferStart = buffer;
|
||||
@@ -57,6 +56,7 @@ public:
|
||||
}
|
||||
|
||||
bool fileFound = false;
|
||||
Serial.printf("%ld (0)\n", millis());
|
||||
while (dir_.next())
|
||||
{
|
||||
if (isFirstFileOfTrainingGroup())
|
||||
@@ -71,10 +71,12 @@ public:
|
||||
//toBuffer(buffer, path_.c_str());
|
||||
toBuffer(buffer, RESPONSE_START);
|
||||
toBuffer(buffer, HREF_START);
|
||||
Serial.printf("%ld (1)\n", millis());
|
||||
const auto fileName = dir_.fileName();
|
||||
const auto fileNameWithoutDir = fileName.substring(fileName.lastIndexOf("/") + 1);
|
||||
String fileBaseName = fileNameWithoutDir.substring(0, fileNameWithoutDir.indexOf('_'));
|
||||
fileBaseName += ".st";
|
||||
Serial.printf("%ld (2)\n", millis());
|
||||
toBuffer(buffer, fileBaseName.c_str());
|
||||
toBuffer(buffer, HREF_END);
|
||||
toBuffer(buffer, PROPSTAT_START);
|
||||
@@ -89,9 +91,11 @@ public:
|
||||
{
|
||||
toBuffer(buffer, CONTENTLEN_START);
|
||||
String fileSizeStr(getFileSize(fileName));
|
||||
toBuffer(buffer, fileSizeStr.c_str());
|
||||
//toBuffer(buffer, fileSizeStr.c_str());
|
||||
toBuffer(buffer, "1");
|
||||
toBuffer(buffer, CONTENTLEN_END);
|
||||
}
|
||||
Serial.printf("%ld (3)\n", millis());
|
||||
|
||||
toBuffer(buffer, PROP_END);
|
||||
toBuffer(buffer, STATUS_OK);
|
||||
@@ -104,10 +108,10 @@ public:
|
||||
finished_ = true;
|
||||
}
|
||||
|
||||
|
||||
size_t bytesWritten = buffer - bufferStart;
|
||||
assert_msg(bytesWritten < maxLen, "Written too much!");
|
||||
//Serial.print("Bytes written ");
|
||||
//Serial.println(bytesWritten);
|
||||
Serial.printf("%ld Bytes written %u\n", millis(), bytesWritten);
|
||||
//Serial.print("Max bytes ");
|
||||
//Serial.println(maxLen);
|
||||
return bytesWritten;
|
||||
|
||||
Reference in New Issue
Block a user