History log of /system/core/base/file_test.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b6e314aa8664b766222d676a24f6390ff1f3f2c5 30-Jan-2016 Yabin Cui <yabinc@google.com> base: add API to remove file if it exists.

It is a function needed in different places like uncrypt, simpleperf.

Bug: 26883096
Change-Id: I26f4f30e8367867a88272625f00858569fc8e950
/system/core/base/file_test.cpp
4f71319df011d796a60a43fc1bc68e16fbf7d321 05-Dec-2015 Elliott Hughes <enh@google.com> Track rename of base/ to android-base/.

Change-Id: Idf9444fece4aa89c93e15640de59a91f6e758ccf
/system/core/base/file_test.cpp
cbf26b76c7715969610b75048719f8cec676b656 04-Aug-2015 Spencer Low <CompareAndSwap@gmail.com> win32: adb_test/libbase_test fixes

- My recent change with -DUNICODE=1 required changing
GetProfilesDirectory() to GetProfilesDirectoryA() for the ANSI version
of the API.

- enh's edit to my previous change deleted a test that used
/proc/version, but I think another test was missed. Merge that test into
another.

Change-Id: Ic748549848e7be922bcbf218d5b0c3fca2a90704
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
/system/core/base/file_test.cpp
cf168a82e99e97e3ad95e37b7065f6b8e7f7390b 25-May-2015 Spencer Low <CompareAndSwap@gmail.com> adb_test/libbase_test: win32: get some tests working

adb_test:

* Fix adb_utils directory_exists test for Windows. The test actually
fails because directory_exists() is not aware of junctions or symlinks,
but I'm not really sure if that is a bad thing (since these are rare on
Windows to begin with).

* Fix crash during transport tests due to mutex not being initialized.

* io tests fail for various reasons (see adb_io_test.cpp for more info).

libbase_test:

* Get it building on Win32 by implementing mkstemp() and mkdtemp().

* Run StringPrintf %z test on Windows because it passes because we build
with __USE_MINGW_ANSI_STDIO which implements %z.

* I didn't fixup the logging tests: some logging tests fail because when
abort() is called on Windows, by default it pops up UI asking whether a
crash dump should be sent to Microsoft. To some degree this makes sense,
as I think LOG(FATAL) does crash dumping in Chromium. This should be
revisited in the future.

Change-Id: Iaa2433e5294ff162e0b2aa9fe6e4ec09a6893f7a
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
/system/core/base/file_test.cpp
47d67c96ec991ef1690b4c07188335cbc4bfa2aa 06-May-2015 Alex Vallée <avallee@chromium.org> Write mkdirs in more idiomatic C++ style.

~ Rewrote mkdirs to be in C++ style.
~ Replaced adb_dir{start,stop} with std::string params and (r)find.
+ Added test for mkdirs.

Also make base/test_utils.h public and support temporary directories
as well as files.

Change-Id: I6fcbdc5e0099f3359d3aac6b00c436f250ca1329
/system/core/base/file_test.cpp
56b37345d99f2cd85720f6b1aa1934fa3bfe29a6 01-May-2015 Colin Cross <ccross@android.com> Fix comparison between signed and unsigned error on darwin

mode_t is a uint16_t on darwin, which causes
sb.st_mode & ~S_IFMT
to produce an int when the uint16_t is promoted for the operator.
Cast to unsigned int before comparing against 0660U.

Change-Id: Ib1439c08d9e2b297eeeba701891508d269c19a3d
/system/core/base/file_test.cpp
0c4b3a319d2bc3dbc917e869af34e24788e6fc48 29-Apr-2015 Dan Albert <danalbert@google.com> Get libbase tests working on Windows.

Tests using files from /proc still fail on Windows (obviously), but
all tests are passing when run in Wine.

Change-Id: Ie4c3ba65b642202f8fcaec73332a53bee6115fba
/system/core/base/file_test.cpp
850188fc040e8b1f345359f795165c7925617506 30-Apr-2015 Dan Albert <danalbert@google.com> Print strerror instead of errno in tests.

Change-Id: Ibfab1b7cd439fdb5ae19855cc700613c00d4aff8
/system/core/base/file_test.cpp
56085edbf8c74a3a123f08e44be6e8f294deb465 25-Apr-2015 Elliott Hughes <enh@google.com> Add ReadFully and WriteFully to libbase.

Change-Id: I6b7aa2a93398e7acdd1d74c71d9abed08a72b3c4
/system/core/base/file_test.cpp
58310b49fc8a7a713b922319a849a419858db79e 14-Mar-2015 Dan Albert <danalbert@google.com> Add google3 style logging to libbase.

ART already had a flavor of this, but it was specialized for their use
case a bit.

Note that the logging.* tests are currently disabled for the device
because there is no good way to capture the output of liblog. We can
make something that will execute logcat and then then scan the output,
but that's messy. Since we know it at least works on the host, we can
add better device tests later.

Change-Id: I47acd87a3312c0a5285b03f9c8dadef0c669f06a
/system/core/base/file_test.cpp
c007bc3856a4cf86b8f610eb045f26a9dedc2894 16-Mar-2015 Dan Albert <danalbert@google.com> Revert "Revert "Create libbase.""

This reverts commit a7870d88167f619e758b5bcd15b410d16da7c16b.
/system/core/base/file_test.cpp
a7870d88167f619e758b5bcd15b410d16da7c16b 16-Mar-2015 Nicolas Geoffray <ngeoffray@google.com> Revert "Create libbase."

Breaks internal master.

This reverts commit 98ff77204cef9bb8f0f27420833233622060a09e.

Change-Id: I18dc6021cb43efff8aa88486c2d980dc2b8eedba
/system/core/base/file_test.cpp
98ff77204cef9bb8f0f27420833233622060a09e 14-Mar-2015 Dan Albert <danalbert@google.com> Create libbase.

Move StringPrintf and the string based file I/O from libutils to
libbase.

Change-Id: I0297a6063874b9d92100e0dd5123fddfbda932fe
/system/core/base/file_test.cpp