Remove symlinks time comparison tests from wxFileName test
These tests don't seem to be sound, it's possible for one second or more to pass between the two calls to GetTimes() and it's apparently possible for the access time on the symlink to not change (due to /tmp being mounted with "noatime" option perhaps?), resulting in Travis CI build failures.
This commit is contained in:
parent
54c874d488
commit
ed09b7b6c0
1 changed files with 0 additions and 15 deletions
|
|
@ -827,9 +827,6 @@ void FileNameTestCase::TestSymlinks()
|
|||
|
||||
wxFileName tmpfn(wxFileName::DirName(tmpdir));
|
||||
|
||||
wxDateTime dtAccessTmp, dtModTmp, dtCreateTmp;
|
||||
CPPUNIT_ASSERT(tmpfn.GetTimes(&dtAccessTmp, &dtModTmp, &dtCreateTmp));
|
||||
|
||||
// Create a temporary directory
|
||||
#ifdef __VMS
|
||||
wxString name = tmpdir + ".filenametestXXXXXX]";
|
||||
|
|
@ -917,18 +914,6 @@ void FileNameTestCase::TestSymlinks()
|
|||
linktodir.GetTimes(&dtAccess, &dtMod, &dtCreate)
|
||||
);
|
||||
|
||||
// IsEqualTo() should be true only when dereferencing. Don't test each
|
||||
// individually: accessing to create the link will have updated some
|
||||
bool equal = dtCreate.IsEqualTo(dtCreateTmp) &&
|
||||
dtMod.IsEqualTo(dtModTmp) &&
|
||||
dtAccess.IsEqualTo(dtAccessTmp);
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE
|
||||
(
|
||||
"Comparing directory times" + msg,
|
||||
deref,
|
||||
equal
|
||||
);
|
||||
|
||||
// Test (File|Dir)Exists()
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE
|
||||
(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue