[Libreoffice-commits] core.git: sal/qa
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Fri Feb 12 16:02:19 UTC 2021
sal/qa/osl/file/osl_File_Const.h | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit 8ef533148bac3126294b7f1988c146b02ecee7bf
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Fri Feb 12 15:12:57 2021 +0100
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Fri Feb 12 17:01:39 2021 +0100
Make sure to resolve symlinks in temp path in path tests
This is a blind attempt to fix a part of a failure reported on IRC:
/lode/dev/core/sal/qa/osl/file/osl_File.cxx:486: Assertion
Test name: osl_FileBase::getAbsoluteFileURL::getAbsoluteFileURL_001_1
equality assertion failed
- Expected: file:///var/folders/tj/jl7sh26124n4b94tm541m6xr0000gn/T//relative/file1
- Actual : file:///private/var/folders/tj/jl7sh26124n4b94tm541m6xr0000gn/T/relative/file1
- Assumption is wrong: ResultURL is not equal to expected URL
That "private/" in Expected might be because user's /var is a
symlink
to /private/var.
Change-Id: Ia5b95621dffdae7e0193aca4c3d12c86ed28dceb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110785
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Tested-by: Jenkins
diff --git a/sal/qa/osl/file/osl_File_Const.h b/sal/qa/osl/file/osl_File_Const.h
index 5828fbec6694..beee8d6d62d5 100644
--- a/sal/qa/osl/file/osl_File_Const.h
+++ b/sal/qa/osl/file/osl_File_Const.h
@@ -34,6 +34,9 @@ static OUString getTempDirectoryURL_()
OUString aDir;
CPPUNIT_ASSERT_EQUAL_MESSAGE("couldn't get system temp URL",
osl::FileBase::E_None, osl::FileBase::getTempDirURL(aDir));
+ // This resolves symlinks in the temp path if any
+ CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None,
+ osl::FileBase::getAbsoluteFileURL(aDir, aDir, aDir));
return aDir;
}
More information about the Libreoffice-commits
mailing list