Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
0165ab83
Commit
0165ab83
authored
Dec 08, 2014
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test MAVLinkProtocol::deleteTempLogFiles
parent
166ed9fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
MavlinkLogTest.cc
src/qgcunittest/MavlinkLogTest.cc
+11
-1
MavlinkLogTest.h
src/qgcunittest/MavlinkLogTest.h
+1
-0
No files found.
src/qgcunittest/MavlinkLogTest.cc
View file @
0165ab83
...
...
@@ -125,7 +125,7 @@ void MavlinkLogTest::_bootLogDetectionSave_test(void)
void
MavlinkLogTest
::
_bootLogDetectionZeroLength_test
(
void
)
{
// Create a fake e
e
mpty mavlink log
// Create a fake empty mavlink log
_createTempLogFile
(
true
);
// Zero length log files should not generate any additional UI pop-ups. It should just be deleted silently.
...
...
@@ -170,3 +170,13 @@ void MavlinkLogTest::_connectLog_test(void)
QTest
::
qWait
(
1000
);
// Need to allow signals to move between threads to shutdown MainWindow
}
void
MavlinkLogTest
::
_deleteTempLogFiles_test
(
void
)
{
// Verify that the MAVLinkProtocol::deleteTempLogFiles api works correctly
_createTempLogFile
(
false
);
MAVLinkProtocol
::
deleteTempLogFiles
();
QDir
tmpDir
(
QStandardPaths
::
writableLocation
(
QStandardPaths
::
TempLocation
));
QStringList
logFiles
(
tmpDir
.
entryList
(
QStringList
(
QString
(
"*.%1"
).
arg
(
_logFileExtension
)),
QDir
::
Files
));
QCOMPARE
(
logFiles
.
count
(),
0
);
}
src/qgcunittest/MavlinkLogTest.h
View file @
0165ab83
...
...
@@ -46,6 +46,7 @@ private slots:
void
_bootLogDetectionSave_test
(
void
);
void
_bootLogDetectionZeroLength_test
(
void
);
void
_connectLog_test
(
void
);
void
_deleteTempLogFiles_test
(
void
);
private:
void
_createTempLogFile
(
bool
zeroLength
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment