summaryrefslogtreecommitdiffstats
path: root/tests/auto/qfile
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright headersAkseli Salovaara2015-03-313-39/+39
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I7e3e96183e073877b46bc8071b2ccae19e69426b Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Updated year in copyright headerKai Koehne2014-03-263-3/+3
| | | | | | | | | | | | | | | | | | find . -path '*/3rdparty/*' -prune -o -type f -print | xargs -L1 sed -i -E 's/Copyright(.*) 2013 Digia/Copyright\1 2014 Digia/g' Manually patched files: demos/spectrum/3rdparty/fftreal/fftreal_wrapper.h demos/spectrum/3rdparty/fftreal/fftreal_wrapper.cpp src/3rdparty/s60/eiksoftkeyimage.h tools/qdoc3/test/qt-project.qdocconf tests/auto/qsharedpointer/nontracked.h tests/auto/qsharedpointer/nontracked.cpp Change-Id: I3f9074923b4d6bd4666258ab04f01476cc6e901c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-133-3/+3
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-293-72/+72
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* test: Mark tst_QFile::writeLargeDataBlock() unstable failure as XFAILSergio Ahumada2012-09-241-1/+11
| | | | | | | | | | The test has one unstable failure on Windows, so mark this with QEXPECT_FAIL Task-number: QTBUG-26906 Change-Id: I2f6c63ddefecacd224d93f83e6951e961a02a051 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> (cherry picked from qtbase/531b96f42ef225f6f680f6049ab718b0f6729a3d) Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Update contact information in license headers.Sergio Ahumada2012-08-013-6/+6
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Fix tst_qfile with shadow buildsThiago Macieira2012-06-181-1/+1
| | | | | | | | Teach it to find this file in the SRCDIR. Change-Id: I64e3926f10304efc15faa28b2b98569400802c59 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* Fix tst_qfile opening of stdin/out/err: don't assumeThiago Macieira2012-06-181-30/+40
| | | | | | | | | | | | The standard streams can be redirected to a file, so don't assume anything, but try to get the actual size and position from the OS and from the C library (stdout is usually buffered, so the result of lseek might be different from ftell). (cherry-picked from qtbase commit ba7f664a7fbb5612126e5144e58240ab05968259) Change-Id: Ice4a0aa21726671928f56a13cc07cc0e4b52091d Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QFile-test: Test for redirected handles in standard streams test.Friedemann Kleint2012-06-131-7/+18
| | | | | | | | | | | This is similar to 2509a5b5a49ea52948b434578ff29e7f9ba60b40 in Qt 5 (qtbase). In 4.8, stdout also seems to be affected, whereas in Qt 5, the problem occurred for stdin. Task-number: QTQAINFRA-428 Change-Id: Ia644923bdb76d0ac3c218c843fefcf280ee729cb Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix QFile test for Qt 4.8.Friedemann Kleint2012-06-092-15/+67
| | | | | | | | | | | | | | | | | - Locate the stdinprocess from the application path. - cd to SRCDIR such that the relative paths always work. - Introduce a NO_NETWORK_TEST defines making it possible to run the tests without network infrastructure. Task-number: QTQAINFRA-428 Change-Id: Ib2514a4da0f9814f83ae1d7931614fd159968b0c Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Optimise QFile::seek that doesn't move the file pointerShane Kearns2012-03-131-0/+55
| | | | | | | | | If the seek position matches the current file position, then avoid doing an implicit flush that could be expensive. Change-Id: I019858ffb36fe832b9aee8da0a7803cafc8f7f75 Reviewed-by: Jaakko Helanti <ext-jaakko.helanti@nokia.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* tests: Mark unstable tests as insignificant on WindowsSergio Ahumada2012-02-141-1/+1
| | | | | | | | | | | | | | | | | Marked the following tests insignificant due to failures, these need to be fixed later and then re-enabled: tst_qdeclarativeerror tst_lupdate tst_qfile tst_qlibrary tst_qtcpserver tst_qxmlquery Task-number: QTQAINFRA-428 Change-Id: I648f86b3ec7767f83767af8981a6ce2aed65722b Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Re-enabled tst_LargeFileJo Asplin2012-02-142-1/+3
| | | | | | | | | | | | tst_LargeFile currently seems to pass in a stable way in CI It does have an issue on 64-bit Linux (see QTBUG-21175), so that test function is still disabled (QEXPECT_FAIL'ed) on that platform. Change-Id: I818046f84f2db5eb2155ae1f51f69581029bfaee Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com> (cherry picked from commit b5ef53df457d784da7221a8244963462a686458d)
* test: fix tst_QFile::rename() autotestSergio Ahumada2012-02-031-1/+1
| | | | | | | | | This test was incorrectly assuming that a file named "Makefile" exists. Change-Id: I318b12f67e0476d6f08d1fc86194ca96f2bdb373 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> (cherry picked from commit 227cb8c0b91f9e88e53432b3936cd1fc4f90e9f7) Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-113-3/+3
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* tests: allow unstable tests to be marked with CONFIG+=insignificant_testSergio Ahumada2011-12-282-0/+3
| | | | | | | | | | Marking a test with CONFIG+=insignificant_test will cause the exit code of the test to be discarded during `make check'. This is intended to be used for tests which are valuable to run, but are known to be unstable and are not feasible to immediately fix. Change-Id: Id7b2407d0a13c8de19a58badb78fa7c018c9b50a Reviewed-by: Jo Asplin
* Merge remote-tracking branch 'qt/4.8'Jyri Tahtela2011-05-181-7/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/examples/wheel.qdoc src/gui/util/qflickgesture.cpp src/gui/util/qflickgesture_p.h src/gui/util/qscroller.cpp src/gui/util/qscroller.h src/gui/util/qscroller_p.h src/gui/util/qscrollerproperties.cpp src/gui/util/qscrollerproperties.h tests/auto/qscroller/tst_qscroller.cpp
| * Merge remote branch 'origin/4.8' into qa-review-masterRohan McGovern2011-05-161-3/+8
| |\ | | | | | | | | | | | | | | | Conflicts: tests/auto/qaccessibility/tst_qaccessibility.cpp tests/auto/qsslsocket/tst_qsslsocket.cpp
| * | Remove Q_ASSERT's from large file autotest.Jason McDonald2011-05-051-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | These assertions were made obsolete by the previous change to this test. Change-Id: I3156b273a727f753a6c093c8fc7453b694c777ee Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern
| * | Fix logic error in large file autotestJason McDonald2011-04-211-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function generating data blocks was filling the block to 16 bytes short of the blockSize, then appending three 8 byte values, causing the block to grow 8 bytes beyond blockSize and then truncating it back to blockSize. This commit makes the code fill the block to 24 bytes short of the blockSize, so that the block will always end up at the correct size and truncation is not needed. Change-Id: I9fe6e6d6cf7bc445513b53e0a910d205c4c8002f Reviewed-by: Rohan McGovern
| * | Update copyright year to 2011.Jason McDonald2011-01-113-3/+3
| | | | | | | | | | | | Reviewed-by: Trust Me
* | | Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-133-51/+51
| |/ |/| | | | | | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* | Fix qfile autotest hanging in CI systemShane Kearns2011-04-191-3/+8
| | | | | | | | | | | | | | | | | | | | | | The test machine is configured to pop up dialogs in case of CRT assertion failures. The CRT has a debug assert whenever an invalid file handle is used, while the test is expecting to get the EBADF return code. Due to some behaviour change in windows 7 (maybe SP1), we need to call _CrtSetReportMode in addition to setting an error handler. Reviewed-By: mread
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-173-3/+3
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webkit/imageanalyzer/imageanalyzer.h examples/webkit/imageanalyzer/mainwindow.h mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h src/corelib/io/qfsfileengine_iterator_unix.cpp src/corelib/io/qfsfileengine_iterator_win.cpp src/corelib/kernel/qcoreapplication.cpp src/network/access/qnetworkaccessdatabackend.cpp src/plugins/bearer/connman/qconnmanservice_linux.cpp src/plugins/platforms/openvglite/qwindowsurface_vglite.h src/s60installs/bwins/QtCoreu.def src/s60installs/eabi/QtCoreu.def src/s60installs/s60installs.pro tools/assistant/tools/assistant/helpviewer_qwv.h tools/qdoc3/test/qt-html-templates.qdocconf
| * Update copyright year to 2011.Jason McDonald2011-01-113-3/+3
| | | | | | | | Reviewed-by: Trust Me
* | Fix link error on MacOSShane Kearns2011-01-041-3/+3
| |
* | Fix qfile test crash with glibcShane Kearns2010-12-221-6/+9
| | | | | | | | | | | | | | | | | | | | The test was using a FILE* after closing it (which was a pointer to deleted memory). glibc detects and asserts on this. If the test failed, then file could be closed twice too, so I fixed that at the same time. (would have caused a double free) Reviewed-by: joao
* | Fix qfile test errorsShane Kearns2010-12-211-3/+39
| | | | | | | | | | | | | | | | | | Fix compile error for non symbian targets Fix MSVCRT assertion failure Test file.handle() returns the right thing before and after file is closed. Reviewed-by: joao
* | Add autotests for AutoCloseHandle / DontCloseHandle and RFile adoptionShane Kearns2010-12-202-10/+141
| | | | | | | | | | | | | | | | | | | | Extended the existing tests which open a file from a handle to use symbian RFile as well (when testing on symbian). Added a new test to check the file handle is open/closed after closing a QFile, based on whether the file was opened with AutoCloseHandle or not. Reviewed-by: mread
* | Fix spelling in commentsJoão Abecasis2010-12-051-2/+2
| |
* | Fix tst_QFile::caseSensitivity test on MacJoão Abecasis2010-11-301-1/+1
| | | | | | | | | | Mac's default file system is case-preserving, but case-insensitive, otherwise.
* | Fix typo in QFile testJoão Abecasis2010-11-301-1/+1
| | | | | | | | | | If file system isn't case sensitive, open succeeds as should reading, with the read data matching testData.
* | Add symbian platform security and case sensitivity test casesShane Kearns2010-11-301-0/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On symbian, check that opening files in protected locations either succeeds or fails cleanly as expected by the capabilities the test is compiled with. This acts as a regression test for opening files in /resource, and also checks the other locations behave as expected. On all platforms, check file created with a mixed case filename can be accessed by it's aliases that differ only in case (or not) depending on the OS case sensitivity. For Windows/Symbian, file should be accessible by altered case aliases For other OS, it should not (other OS supported by Qt are unix like) Reviewed-by: mread
* | Fix link() autotest on WindowsPrasanth Ullattil2010-11-261-1/+1
| | | | | | | | | | | | This was missed from the previous commit. Reviewed-by: Joao
* | Flagging some more tests as parallelizableJoão Abecasis2010-11-252-0/+3
| | | | | | | | | | | | | | These tests have no GUI nor do they depend on network, so let's see what breaks if they're parallelized :-) Reviewed-by: Olivier Goffart
* | Fix QFile::link unit testJoão Abecasis2010-11-251-4/+10
| | | | | | | | | | | | | | Absolute path for the link target can contain "../" elements and so needs to be cleaned. Really depends on the definition for SRCDIR. Reviewed-by: Prasanth Ullattil
* | Merge remote branch 'qt/master' into file-engine-refactorJoão Abecasis2010-11-231-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/declarative/minehunt/minehunt.pro src/corelib/io/io.pri src/corelib/io/qfsfileengine.cpp src/corelib/io/qfsfileengine_unix.cpp src/corelib/io/qfsfileengine_win.cpp src/s60installs/bwins/QtCoreu.def src/s60installs/bwins/QtDeclarativeu.def src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtCoreu.def src/s60installs/eabi/QtDeclarativeu.def src/s60installs/eabi/QtGuiu.def tests/auto/qapplication/test/test.pro tests/auto/qaudioinput/qaudioinput.pro tests/auto/qaudiooutput/qaudiooutput.pro tests/auto/qchar/qchar.pro tests/auto/qdiriterator/qdiriterator.pro tests/auto/qsound/qsound.pro
| * | Align .pro with qmake: s/\.sources/.files/.Miikka Heikkinen2010-10-081-2/+2
| |/ | | | | | | | | | | | | | | | | | | Complement previous commit by aligning Qt itself to use .files consistently for DEPLOYMENT as well as INSTALLS. This excludes changes to webkit. Task-number: QTBUG-3216 Reviewed-by: axis
* | Fix QFile autotest for out-of-source buildsJoão Abecasis2010-11-221-2/+2
| |
* | Test coverage: test more of QFile APIShane Kearns2010-11-171-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | Adding tests for these functions: symLinkTarget / readLink (static & non static) permissions (static) constructors which take a QObject parent After this, all function of QFile API are tested except encoding/decoding functions and some QT3_SUPPORT inlines in the header. Reviewed-by: joao
* | Test coverage: test QFile::resizeShane Kearns2010-11-161-0/+26
| | | | | | | | Reviewed-By: joao
* | Re-enable emulated QFile::map on symbianShane Kearns2010-10-291-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Memory mapping of RFile handles is not supported in current symbian OS versions. However the "open C" libraries provide an emulated mmap() implementation which was used by QFile::map in Qt 4.6 release. To avoid breaking applications which rely on this function, QFile::map will now open the file with open C as well in order to use that handle to call mmap(). When symbian implements a file mapping API, we can switch the implementation to use that for RFile handles. Reviewed-By: joao
* | Autotest for seeking beyond end of file and then writingShane Kearns2010-10-191-0/+31
| | | | | | | | | | | | | | | | | | | | | | File engine refactor caused a regression in the TIFF image codec, as QFile::seek() previously worked like lseek() / fseek() in posix. But on symbian the native RFile::Seek api clamps to the end of the file if you attempt to seek beyond there. This test checks seek behaviour in the appropriate place, the QFile auto test. Reviewed-By: joao
* | Fix deployment for examples and testsShane Kearns2010-10-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | Due to the change from default deployment in symbian from being hardcoded in qmake to being in default_deployment.prf the .pro files needed to be changed. Specifically, "DEPLOYMENT = foo" needs to be "DEPLOYMENT += foo" otherwise the default deployment lines are not added and the test won't install. Reviewed-By: Miikka Heikkinen
* | Change handle related tests in tst_qfile for symbianShane Kearns2010-09-151-2/+9
| | | | | | | | | | | | | | Getting a posix file handle from a natively opened QFile isn't supported so that part of the test is skipped. Reviewed-By: joao
* | Disable symlink and memory mapped files tests on symbianShane Kearns2010-09-151-0/+22
|/ | | | Reviewed-By: joao
* Fix duplicate binary names issues in Symbian autotestsMiikka Heikkinen2010-08-061-1/+1
| | | | | | | | | | In Symbian each binary name must be unique as all binaries are stored in the same directory on the device. Some autotests created helper binaries that had same names on different tests, which caused build and installation issues when building entire autotest project tree. Reviewed-by: Shane Kearns
* Various fixes to autotests when using the symbian/linux-armcc mkspec.axis2010-06-291-1/+1
|
* escape backslashesOswald Buddenhagen2010-05-261-4/+4
| | | | this makes windows-style path specs *ugly*. that's intentional. :-P
* Skip tst_LargeFile::mapOffsetOverflow on MacJoão Abecasis2010-05-041-0/+4
| | | | | | | | | | On this platform mmap'ing beyond EOF may succeed, even beyond filesystem capabilities, but generate Bus Errors on access. Skipping this failing test and accepting the underlying undefined behavior is the right thing to do, until QFile offers proper guarantees. Reviewed-by: Thiago Macieira