Skip to content

Commit

Permalink
Wrap all nlfaultinjection logic with build flag chip_with_nlfaultinje…
Browse files Browse the repository at this point in the history
…ction (#22004)
  • Loading branch information
yufengwangca authored and pull[bot] committed Aug 21, 2023
1 parent 80e1cb5 commit 2271928
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/inet/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ static_library("inet") {
"InetArgParser.h",
"InetError.cpp",
"InetError.h",
"InetFaultInjection.h",
"InetInterface.cpp",
"InetInterface.h",
"InetLayer.h",
Expand Down Expand Up @@ -132,7 +131,10 @@ static_library("inet") {
}

if (chip_with_nlfaultinjection) {
sources += [ "InetFaultInjection.cpp" ]
sources += [
"InetFaultInjection.cpp",
"InetFaultInjection.h",
]
public_deps += [ "${nlfaultinjection_root}:nlfaultinjection" ]
}

Expand Down
9 changes: 7 additions & 2 deletions src/inet/tests/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ static_library("helpers") {
"TestInetCommonOptions.h",
"TestInetCommonPosix.cpp",
"TestInetLayerCommon.cpp",
"TestSetupFaultInjection.h",
"TestSetupFaultInjectionPosix.cpp",
"TestSetupSignalling.h",
"TestSetupSignallingPosix.cpp",
]
Expand All @@ -45,6 +43,13 @@ static_library("helpers") {
sources += [ "TestInetLayer.cpp" ]
}

if (chip_with_nlfaultinjection) {
sources += [
"TestSetupFaultInjection.h",
"TestSetupFaultInjectionPosix.cpp",
]
}

cflags = [ "-Wconversion" ]

public_deps = [
Expand Down
6 changes: 4 additions & 2 deletions src/system/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ static_library("system") {
"SystemError.cpp",
"SystemError.h",
"SystemEvent.h",
"SystemFaultInjection.h",
"SystemLayer.cpp",
"SystemLayer.h",
"SystemLayerImpl.h",
Expand Down Expand Up @@ -219,7 +218,10 @@ static_library("system") {
}

if (chip_with_nlfaultinjection) {
sources += [ "SystemFaultInjection.cpp" ]
sources += [
"SystemFaultInjection.cpp",
"SystemFaultInjection.h",
]
public_deps += [ "${nlfaultinjection_root}:nlfaultinjection" ]
}
}

0 comments on commit 2271928

Please sign in to comment.