Skip to content

Commit

Permalink
pw_function: Run fit::function tests from Fuchsia
Browse files Browse the repository at this point in the history
Change-Id: I7c0ff3c80b4e1f5abe2d0f8c0673318281b78d01
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/109790
Reviewed-by: Alexei Frolov <[email protected]>
Pigweed-Auto-Submit: Wyatt Hepler <[email protected]>
Reviewed-by: Rob Mohr <[email protected]>
Commit-Queue: Wyatt Hepler <[email protected]>
  • Loading branch information
255 authored and CQ Bot Account committed Sep 9, 2022
1 parent 93820b0 commit 40e12be
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pw_function/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ pw_doc_group("docs") {
}

pw_test_group("tests") {
tests = [ ":function_test" ]
tests = [
":function_test",
"$dir_pw_third_party/fuchsia:function_tests",
]
}

pw_test("function_test") {
Expand Down
12 changes: 12 additions & 0 deletions third_party/fuchsia/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import("//build_overrides/pigweed.gni")
import("$dir_pw_build/python.gni")
import("$dir_pw_build/target_types.gni")
import("$dir_pw_docgen/docs.gni")
import("$dir_pw_unit_test/test.gni")

pw_doc_group("docs") {
sources = [ "docs.rst" ]
Expand Down Expand Up @@ -46,6 +47,17 @@ pw_source_set("fit") {
]
}

pw_test("function_tests") {
sources = [ "repo/sdk/lib/fit/test/function_tests.cc" ]
deps = [ ":fit" ]

# Define EXPECT_NULL(), which Pigweed's test framework does not have
defines = [ "EXPECT_NULL(arg)=EXPECT_EQ((arg), nullptr)" ]

# This test does not build with strict warnings, so disable them.
remove_configs = [ "$dir_pw_build:strict_warnings" ]
}

pw_source_set("stdcompat") {
public_configs = [ ":stdcompat_public_include_path" ]
public = [
Expand Down

0 comments on commit 40e12be

Please sign in to comment.