David Rogers | 2d19502 | 2020-07-16 14:07:47 -0700 | [diff] [blame] | 1 | # Copyright 2020 The Pigweed Authors |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| 4 | # use this file except in compliance with the License. You may obtain a copy of |
| 5 | # the License at |
| 6 | # |
| 7 | # https://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 12 | # License for the specific language governing permissions and limitations under |
| 13 | # the License. |
| 14 | |
David Rogers | 2d19502 | 2020-07-16 14:07:47 -0700 | [diff] [blame] | 15 | import("//build_overrides/pigweed.gni") |
| 16 | |
| 17 | import("$dir_pw_build/target_types.gni") |
| 18 | import("$dir_pw_docgen/docs.gni") |
| 19 | import("$dir_pw_unit_test/test.gni") |
Wyatt Hepler | d49f8fe | 2020-10-15 10:13:47 -0700 | [diff] [blame] | 20 | |
David Rogers | 2d19502 | 2020-07-16 14:07:47 -0700 | [diff] [blame] | 21 | config("default_config") { |
| 22 | include_dirs = [ "public" ] |
| 23 | } |
| 24 | |
| 25 | pw_source_set("pw_blob_store") { |
| 26 | public_configs = [ ":default_config" ] |
| 27 | public = [ "public/pw_blob_store/blob_store.h" ] |
David Rogers | 9692257 | 2020-08-04 10:24:57 -0700 | [diff] [blame] | 28 | sources = [ "blob_store.cc" ] |
David Rogers | 2d19502 | 2020-07-16 14:07:47 -0700 | [diff] [blame] | 29 | public_deps = [ |
| 30 | dir_pw_kvs, |
| 31 | dir_pw_status, |
| 32 | dir_pw_stream, |
| 33 | ] |
David Rogers | 9692257 | 2020-08-04 10:24:57 -0700 | [diff] [blame] | 34 | deps = [ |
| 35 | dir_pw_assert, |
| 36 | dir_pw_checksum, |
| 37 | dir_pw_log, |
| 38 | ] |
David Rogers | 2d19502 | 2020-07-16 14:07:47 -0700 | [diff] [blame] | 39 | } |
| 40 | |
| 41 | pw_test_group("tests") { |
David Rogers | 5aa32ab | 2020-09-08 14:39:24 -0700 | [diff] [blame] | 42 | tests = [ |
| 43 | ":blob_store_test", |
| 44 | ":blob_store_deferred_write_test", |
David Rogers | 1039584 | 2020-09-16 15:39:35 -0700 | [diff] [blame] | 45 | ":blob_store_chunk_write_test", |
David Rogers | 5aa32ab | 2020-09-08 14:39:24 -0700 | [diff] [blame] | 46 | ] |
David Rogers | 2d19502 | 2020-07-16 14:07:47 -0700 | [diff] [blame] | 47 | } |
| 48 | |
| 49 | pw_test("blob_store_test") { |
David Rogers | 9692257 | 2020-08-04 10:24:57 -0700 | [diff] [blame] | 50 | deps = [ |
| 51 | ":pw_blob_store", |
| 52 | "$dir_pw_kvs:crc16", |
| 53 | "$dir_pw_kvs:fake_flash", |
| 54 | "$dir_pw_kvs:fake_flash_test_key_value_store", |
| 55 | dir_pw_log, |
| 56 | dir_pw_random, |
| 57 | ] |
| 58 | sources = [ "blob_store_test.cc" ] |
David Rogers | 2d19502 | 2020-07-16 14:07:47 -0700 | [diff] [blame] | 59 | } |
| 60 | |
David Rogers | 1039584 | 2020-09-16 15:39:35 -0700 | [diff] [blame] | 61 | pw_test("blob_store_chunk_write_test") { |
| 62 | deps = [ |
| 63 | ":pw_blob_store", |
| 64 | "$dir_pw_kvs:crc16", |
| 65 | "$dir_pw_kvs:fake_flash", |
| 66 | "$dir_pw_kvs:fake_flash_test_key_value_store", |
| 67 | dir_pw_log, |
| 68 | dir_pw_random, |
| 69 | ] |
| 70 | sources = [ "blob_store_chunk_write_test.cc" ] |
| 71 | } |
| 72 | |
David Rogers | 5aa32ab | 2020-09-08 14:39:24 -0700 | [diff] [blame] | 73 | pw_test("blob_store_deferred_write_test") { |
| 74 | deps = [ |
| 75 | ":pw_blob_store", |
| 76 | "$dir_pw_kvs:crc16", |
| 77 | "$dir_pw_kvs:fake_flash", |
| 78 | "$dir_pw_kvs:fake_flash_test_key_value_store", |
| 79 | dir_pw_log, |
| 80 | dir_pw_random, |
| 81 | ] |
| 82 | sources = [ "blob_store_deferred_write_test.cc" ] |
| 83 | } |
| 84 | |
David Rogers | 2d19502 | 2020-07-16 14:07:47 -0700 | [diff] [blame] | 85 | pw_doc_group("docs") { |
| 86 | sources = [ "docs.rst" ] |
| 87 | } |