diff options
author | Joe Onorato <joeo@android.com> | 2009-05-06 12:55:46 -0400 |
---|---|---|
committer | Joe Onorato <joeo@android.com> | 2009-05-08 09:33:19 -0700 |
commit | c825d3ebd6ca66e65e63fdc76f032e08aa2a8e22 (patch) | |
tree | dd9eca8ae68aaab8ed8d692ccf425a76541e9972 | |
parent | 1e09a72a75f5e6236acffe84f2758dd042b1c8c0 (diff) | |
download | frameworks_base-c825d3ebd6ca66e65e63fdc76f032e08aa2a8e22.zip frameworks_base-c825d3ebd6ca66e65e63fdc76f032e08aa2a8e22.tar.gz frameworks_base-c825d3ebd6ca66e65e63fdc76f032e08aa2a8e22.tar.bz2 |
fix the sim build. disables the tests for now.
-rw-r--r-- | include/utils/backup_helpers.h | 2 | ||||
-rw-r--r-- | libs/utils/file_backup_helper.cpp | 4 | ||||
-rw-r--r-- | tests/backup/backup_helper_test.cpp | 13 |
3 files changed, 14 insertions, 5 deletions
diff --git a/include/utils/backup_helpers.h b/include/utils/backup_helpers.h index f70444d..61bee340 100644 --- a/include/utils/backup_helpers.h +++ b/include/utils/backup_helpers.h @@ -4,7 +4,7 @@ int back_up_files(int oldSnapshotFD, int newSnapshotFD, int oldDataStream, char const* fileBase, char const* const* files, int fileCount); -#define TEST_BACKUP_HELPERS 1 +#define TEST_BACKUP_HELPERS 0 #if TEST_BACKUP_HELPERS int backup_helper_test_empty(); diff --git a/libs/utils/file_backup_helper.cpp b/libs/utils/file_backup_helper.cpp index 16cbb6e..111f88d 100644 --- a/libs/utils/file_backup_helper.cpp +++ b/libs/utils/file_backup_helper.cpp @@ -13,6 +13,7 @@ #include <stdio.h> #include <stdlib.h> #include <unistd.h> +#include <utime.h> #include <fcntl.h> #include <zlib.h> @@ -224,7 +225,8 @@ back_up_files(int oldSnapshotFD, int newSnapshotFD, int oldDataStream, } s.modTime_sec = st.st_mtime; - s.modTime_nsec = st.st_mtime_nsec; + s.modTime_nsec = 0; // workaround sim breakage + //s.modTime_nsec = st.st_mtime_nsec; s.size = st.st_size; s.crc32 = compute_crc32(realFilename); diff --git a/tests/backup/backup_helper_test.cpp b/tests/backup/backup_helper_test.cpp index a661729..6da16b4 100644 --- a/tests/backup/backup_helper_test.cpp +++ b/tests/backup/backup_helper_test.cpp @@ -3,9 +3,7 @@ #include <stdio.h> #include <string.h> -#if !(TEST_BACKUP_HELPERS) -#error These tests require TEST_BACKUP_HELPERS to be defined. -#endif +#if TEST_BACKUP_HELPERS // ============================================================ // ============================================================ @@ -95,3 +93,12 @@ main(int argc, const char** argv) } } } + +#else +int +main(int argc, char** argv) +{ + printf ("test_backup_helper built without the tests\n"); + return 0; +} +#endif |