diff --git a/sandboxed_api/BUILD.bazel b/sandboxed_api/BUILD.bazel index c93271e..8dc47f2 100644 --- a/sandboxed_api/BUILD.bazel +++ b/sandboxed_api/BUILD.bazel @@ -202,10 +202,10 @@ cc_test( deps = [ ":sapi", ":testing", - "//sandboxed_api/examples/stringop/lib:stringop-sapi", - "//sandboxed_api/examples/stringop/lib:stringop_params_cc_proto", - "//sandboxed_api/examples/sum/lib:sum-sapi", - "//sandboxed_api/examples/sum/lib:sum-sapi_embed", + "//sandboxed_api/examples/stringop:stringop-sapi", + "//sandboxed_api/examples/stringop:stringop_params_cc_proto", + "//sandboxed_api/examples/sum:sum-sapi", + "//sandboxed_api/examples/sum:sum-sapi_embed", "//sandboxed_api/util:status_matchers", "@com_google_absl//absl/memory", "@com_google_absl//absl/status", diff --git a/sandboxed_api/examples/stringop/BUILD.bazel b/sandboxed_api/examples/stringop/BUILD.bazel index 8018089..59b730c 100644 --- a/sandboxed_api/examples/stringop/BUILD.bazel +++ b/sandboxed_api/examples/stringop/BUILD.bazel @@ -15,19 +15,61 @@ # Description: Example using dynamic length structures for Sandboxed API load("//sandboxed_api/bazel:build_defs.bzl", "sapi_platform_copts") +load("//sandboxed_api/bazel:proto.bzl", "sapi_proto_library") +load("//sandboxed_api/bazel:sapi.bzl", "sapi_library") licenses(["notice"]) +sapi_proto_library( + name = "stringop_params_proto", + srcs = ["stringop_params.proto"], + visibility = ["//visibility:public"], +) + +cc_library( + name = "stringop", + srcs = ["stringop.cc"], + copts = sapi_platform_copts(), + visibility = ["//visibility:public"], + deps = [ + ":stringop_params_cc_proto", + "//sandboxed_api:lenval_core", + "@com_google_absl//absl/base:core_headers", + ], + alwayslink = 1, # All functions are linked into dependent binaries +) + +sapi_library( + name = "stringop-sapi", + srcs = [], + hdrs = ["sandbox.h"], + functions = [ + "duplicate_string", + "reverse_string", + "pb_duplicate_string", + "pb_reverse_string", + "nop", + "violate", + "get_raw_c_string", + ], + input_files = ["stringop.cc"], + lib = ":stringop", + lib_name = "Stringop", + namespace = "", + visibility = ["//visibility:public"], + deps = [":stringop_params_cc_proto"], +) + cc_test( name = "main_stringop", srcs = ["main_stringop.cc"], copts = sapi_platform_copts(), tags = ["local"], deps = [ + ":stringop-sapi", + ":stringop_params_cc_proto", "//sandboxed_api:sapi", "//sandboxed_api:vars", - "//sandboxed_api/examples/stringop/lib:stringop-sapi", - "//sandboxed_api/examples/stringop/lib:stringop_params_cc_proto", "//sandboxed_api/util:flags", "//sandboxed_api/util:status", "//sandboxed_api/util:status_matchers", diff --git a/sandboxed_api/examples/stringop/CMakeLists.txt b/sandboxed_api/examples/stringop/CMakeLists.txt index f89622f..ffd642a 100644 --- a/sandboxed_api/examples/stringop/CMakeLists.txt +++ b/sandboxed_api/examples/stringop/CMakeLists.txt @@ -12,7 +12,58 @@ # See the License for the specific language governing permissions and # limitations under the License. -add_subdirectory(lib) +# sandboxed_api/examples/stringop/lib:stringop_params_proto +sapi_protobuf_generate_cpp( + _sapi_stringop_params_pb_cc _sapi_stringop_params_pb_h + stringop_params.proto +) +# Object library to avoid having to use -Wl,--whole-archive. This simulates +# Bazel's alwayslink=1. +add_library(sapi_stringop_params_proto OBJECT + ${_sapi_stringop_params_pb_cc} + ${_sapi_stringop_params_pb_h} +) +add_library(sapi::stringop_params_proto ALIAS sapi_stringop_params_proto) +target_include_directories(sapi_stringop_params_proto PUBLIC + ${Protobuf_INCLUDE_DIRS} +) + +# sandboxed_api/examples/stringop/lib:stringop +add_library(sapi_stringop STATIC + stringop.cc +) +add_library(sapi::stringop ALIAS sapi_stringop) +add_dependencies(sapi_stringop + sapi::stringop_params_proto +) +target_link_libraries(sapi_stringop + PRIVATE $ + sapi::base + absl::core_headers + sapi::lenval_core + PUBLIC protobuf::libprotobuf +) + +# sandboxed_api/examples/stringop/lib:stringop-sapi +add_sapi_library(stringop-sapi + SOURCES sandbox.h + FUNCTIONS duplicate_string + reverse_string + pb_duplicate_string + pb_reverse_string + nop + violate + get_raw_c_string + INPUTS stringop.cc + LIBRARY sapi_stringop + LIBRARY_NAME Stringop + NAMESPACE "" +) +add_library(sapi::stringop_sapi ALIAS stringop-sapi) +target_link_libraries(stringop-sapi PRIVATE + $ + sapi::base +) if(SAPI_ENABLE_TESTS) # sandboxed_api/examples/stringop:main_stringop diff --git a/sandboxed_api/examples/stringop/lib/BUILD.bazel b/sandboxed_api/examples/stringop/lib/BUILD.bazel deleted file mode 100644 index 614015c..0000000 --- a/sandboxed_api/examples/stringop/lib/BUILD.bazel +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 2019 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -load("//sandboxed_api/bazel:build_defs.bzl", "sapi_platform_copts") -load("//sandboxed_api/bazel:proto.bzl", "sapi_proto_library") -load("//sandboxed_api/bazel:sapi.bzl", "sapi_library") - -licenses(["notice"]) - -sapi_proto_library( - name = "stringop_params_proto", - srcs = ["stringop_params.proto"], - visibility = ["//visibility:public"], -) - -cc_library( - name = "stringop", - srcs = ["stringop.cc"], - copts = sapi_platform_copts(), - visibility = ["//visibility:public"], - deps = [ - ":stringop_params_cc_proto", - "//sandboxed_api:lenval_core", - "@com_google_absl//absl/base:core_headers", - ], - alwayslink = 1, # All functions are linked into dependent binaries -) - -sapi_library( - name = "stringop-sapi", - srcs = [], - hdrs = ["sandbox.h"], - functions = [ - "duplicate_string", - "reverse_string", - "pb_duplicate_string", - "pb_reverse_string", - "nop", - "violate", - "get_raw_c_string", - ], - input_files = [ - "stringop.cc", - ], - lib = ":stringop", - lib_name = "Stringop", - namespace = "", - visibility = ["//visibility:public"], - deps = [":stringop_params_cc_proto"], -) diff --git a/sandboxed_api/examples/stringop/lib/CMakeLists.txt b/sandboxed_api/examples/stringop/lib/CMakeLists.txt deleted file mode 100644 index af04614..0000000 --- a/sandboxed_api/examples/stringop/lib/CMakeLists.txt +++ /dev/null @@ -1,66 +0,0 @@ -# Copyright 2019 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# sandboxed_api/examples/stringop/lib:stringop_params_proto -sapi_protobuf_generate_cpp( - _sapi_stringop_params_pb_cc _sapi_stringop_params_pb_h - stringop_params.proto -) -# Object library to avoid having to use -Wl,--whole-archive. This simulates -# Bazel's alwayslink=1. -add_library(sapi_stringop_params_proto OBJECT - ${_sapi_stringop_params_pb_cc} - ${_sapi_stringop_params_pb_h} -) -add_library(sapi::stringop_params_proto ALIAS sapi_stringop_params_proto) -target_include_directories(sapi_stringop_params_proto PUBLIC - ${Protobuf_INCLUDE_DIRS} -) - -# sandboxed_api/examples/stringop/lib:stringop -add_library(sapi_stringop STATIC - stringop.cc -) -add_library(sapi::stringop ALIAS sapi_stringop) -add_dependencies(sapi_stringop - sapi::stringop_params_proto -) -target_link_libraries(sapi_stringop - PRIVATE $ - sapi::base - absl::core_headers - sapi::lenval_core - PUBLIC protobuf::libprotobuf -) - -# sandboxed_api/examples/stringop/lib:stringop-sapi -add_sapi_library(stringop-sapi - SOURCES sandbox.h - FUNCTIONS duplicate_string - reverse_string - pb_duplicate_string - pb_reverse_string - nop - violate - get_raw_c_string - INPUTS stringop.cc - LIBRARY sapi_stringop - LIBRARY_NAME Stringop - NAMESPACE "" -) -add_library(sapi::stringop_sapi ALIAS stringop-sapi) -target_link_libraries(stringop-sapi PRIVATE - $ - sapi::base -) diff --git a/sandboxed_api/examples/stringop/main_stringop.cc b/sandboxed_api/examples/stringop/main_stringop.cc index 6970afa..ebbcc63 100644 --- a/sandboxed_api/examples/stringop/main_stringop.cc +++ b/sandboxed_api/examples/stringop/main_stringop.cc @@ -23,9 +23,9 @@ #include "absl/memory/memory.h" #include "absl/status/status.h" #include "absl/time/time.h" -#include "sandboxed_api/examples/stringop/lib/sandbox.h" -#include "sandboxed_api/examples/stringop/lib/stringop-sapi.sapi.h" -#include "sandboxed_api/examples/stringop/lib/stringop_params.pb.h" +#include "sandboxed_api/examples/stringop/sandbox.h" +#include "sandboxed_api/examples/stringop/stringop-sapi.sapi.h" +#include "sandboxed_api/examples/stringop/stringop_params.pb.h" #include "sandboxed_api/transaction.h" #include "sandboxed_api/util/status_macros.h" #include "sandboxed_api/util/status_matchers.h" diff --git a/sandboxed_api/examples/stringop/lib/sandbox.h b/sandboxed_api/examples/stringop/sandbox.h similarity index 85% rename from sandboxed_api/examples/stringop/lib/sandbox.h rename to sandboxed_api/examples/stringop/sandbox.h index 9479fe1..4a35ad7 100644 --- a/sandboxed_api/examples/stringop/lib/sandbox.h +++ b/sandboxed_api/examples/stringop/sandbox.h @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SANDBOXED_API_EXAMPLES_STRINGOP_LIB_SANDBOX_H_ -#define SANDBOXED_API_EXAMPLES_STRINGOP_LIB_SANDBOX_H_ +#ifndef SANDBOXED_API_EXAMPLES_STRINGOP_SANDBOX_H_ +#define SANDBOXED_API_EXAMPLES_STRINGOP_SANDBOX_H_ #include #include -#include "sandboxed_api/examples/stringop/lib/stringop-sapi.sapi.h" +#include "sandboxed_api/examples/stringop/stringop-sapi.sapi.h" #include "sandboxed_api/sandbox2/policy.h" #include "sandboxed_api/sandbox2/policybuilder.h" @@ -50,4 +50,4 @@ class StringopSapiSandbox : public StringopSandbox { } }; -#endif // SANDBOXED_API_EXAMPLES_STRINGOP_LIB_SANDBOX_H_ +#endif // SANDBOXED_API_EXAMPLES_STRINGOP_SANDBOX_H_ diff --git a/sandboxed_api/examples/stringop/lib/stringop.cc b/sandboxed_api/examples/stringop/stringop.cc similarity index 97% rename from sandboxed_api/examples/stringop/lib/stringop.cc rename to sandboxed_api/examples/stringop/stringop.cc index decac6e..1f40af9 100644 --- a/sandboxed_api/examples/stringop/lib/stringop.cc +++ b/sandboxed_api/examples/stringop/stringop.cc @@ -19,7 +19,7 @@ #include "absl/base/attributes.h" #include "absl/base/optimization.h" -#include "sandboxed_api/examples/stringop/lib/stringop_params.pb.h" +#include "sandboxed_api/examples/stringop/stringop_params.pb.h" #include "sandboxed_api/lenval_core.h" // Protobuf examples. diff --git a/sandboxed_api/examples/stringop/lib/stringop_params.proto b/sandboxed_api/examples/stringop/stringop_params.proto similarity index 100% rename from sandboxed_api/examples/stringop/lib/stringop_params.proto rename to sandboxed_api/examples/stringop/stringop_params.proto diff --git a/sandboxed_api/examples/sum/BUILD.bazel b/sandboxed_api/examples/sum/BUILD.bazel index 95ea4b4..8396b4b 100644 --- a/sandboxed_api/examples/sum/BUILD.bazel +++ b/sandboxed_api/examples/sum/BUILD.bazel @@ -13,19 +13,74 @@ # limitations under the License. load("//sandboxed_api/bazel:build_defs.bzl", "sapi_platform_copts") +load("//sandboxed_api/bazel:proto.bzl", "sapi_proto_library") +load("//sandboxed_api/bazel:sapi.bzl", "sapi_library") licenses(["notice"]) +sapi_proto_library( + name = "sum_params_proto", + srcs = ["sum_params.proto"], + visibility = ["//visibility:public"], + alwayslink = 1, +) + +cc_library( + name = "sum", + srcs = [ + "sum.c", + "sum_cpp.cc", + ], + copts = sapi_platform_copts(), + visibility = ["//visibility:public"], + deps = [ + ":sum_params_cc_proto", + "@com_google_glog//:glog", + ], + alwayslink = 1, # All functions are linked into depending binaries +) + +sapi_library( + name = "sum-sapi", + srcs = [], + hdrs = ["sandbox.h"], + functions = [ + "sum", + "sums", + "addf", + "sub", + "mul", + "divs", + "muld", + "crash", + "violate", + "sumarr", + "testptr", + "read_int", + "sleep_for_sec", + "sumproto", + ], + input_files = [ + "sum.c", + "sum_cpp.cc", + ], + lib = ":sum", + lib_name = "Sum", + namespace = "", + visibility = ["//visibility:public"], + deps = [":sum_params_cc_proto"], +) + # A quick'n'dirty testing binary cc_binary( name = "main_sum", srcs = ["main_sum.cc"], copts = sapi_platform_copts(), deps = [ + ":sum-sapi", + ":sum_params_cc_proto", "//sandboxed_api:sapi", "//sandboxed_api:vars", - "//sandboxed_api/examples/sum/lib:sum-sapi", - "//sandboxed_api/examples/sum/lib:sum_params_cc_proto", "//sandboxed_api/util:flags", "@com_google_absl//absl/memory", "@com_google_absl//absl/status", diff --git a/sandboxed_api/examples/sum/CMakeLists.txt b/sandboxed_api/examples/sum/CMakeLists.txt index f537004..25182f2 100644 --- a/sandboxed_api/examples/sum/CMakeLists.txt +++ b/sandboxed_api/examples/sum/CMakeLists.txt @@ -12,7 +12,65 @@ # See the License for the specific language governing permissions and # limitations under the License. -add_subdirectory(lib) +# sandboxed_api/examples/sum/lib:sum_params_proto +sapi_protobuf_generate_cpp(_sapi_sum_params_pb_cc _sapi_sum_params_pb_h + sum_params.proto +) +# Object library to avoid having to use -Wl,--whole-archive. This simulates +# Bazel's alwayslink=1. +add_library(sapi_sum_params_proto OBJECT + ${_sapi_sum_params_pb_cc} + ${_sapi_sum_params_pb_h} +) +add_library(sapi::sum_params_proto ALIAS sapi_sum_params_proto) +target_include_directories(sapi_sum_params_proto PUBLIC + ${Protobuf_INCLUDE_DIRS} +) + +# sandboxed_api/examples/sum/lib:sum +add_library(sapi_sum STATIC + sum.c + sum_cpp.cc +) +add_library(sapi::sum ALIAS sapi_sum) +add_dependencies(sapi_sum + sapi::sum_params_proto +) +target_link_libraries(sapi_sum + PRIVATE $ + glog::glog + sapi::base + PUBLIC protobuf::libprotobuf +) + +# sandboxed_api/examples/sum/lib:sum-sapi +add_sapi_library(sum-sapi + SOURCES sandbox.h + FUNCTIONS sum + sums + addf + sub + mul + divs + muld + crash + violate + sumarr + testptr + read_int + sleep_for_sec + sumproto + INPUTS sum.c + sum_cpp.cc + LIBRARY sapi_sum + LIBRARY_NAME Sum + NAMESPACE "" +) +add_library(sapi::sum_sapi ALIAS sum-sapi) +target_link_libraries(sum-sapi PRIVATE + $ + sapi::base +) # sandboxed_api/examples/sum:main_sum add_executable(sapi_main_sum diff --git a/sandboxed_api/examples/sum/lib/BUILD.bazel b/sandboxed_api/examples/sum/lib/BUILD.bazel deleted file mode 100644 index 6946880..0000000 --- a/sandboxed_api/examples/sum/lib/BUILD.bazel +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright 2019 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -load("//sandboxed_api/bazel:build_defs.bzl", "sapi_platform_copts") -load("//sandboxed_api/bazel:proto.bzl", "sapi_proto_library") -load("//sandboxed_api/bazel:sapi.bzl", "sapi_library") - -licenses(["notice"]) - -sapi_proto_library( - name = "sum_params_proto", - srcs = ["sum_params.proto"], - visibility = ["//visibility:public"], - alwayslink = 1, -) - -cc_library( - name = "sum", - srcs = [ - "sum.c", - "sum_cpp.cc", - ], - copts = sapi_platform_copts(), - visibility = ["//visibility:public"], - deps = [ - ":sum_params_cc_proto", - "@com_google_glog//:glog", - ], - alwayslink = 1, # All functions are linked into depending binaries -) - -sapi_library( - name = "sum-sapi", - srcs = [], - hdrs = ["sandbox.h"], - functions = [ - "sum", - "sums", - "addf", - "sub", - "mul", - "divs", - "muld", - "crash", - "violate", - "sumarr", - "testptr", - "read_int", - "sleep_for_sec", - "sumproto", - ], - input_files = [ - "sum.c", - "sum_cpp.cc", - ], - lib = ":sum", - lib_name = "Sum", - namespace = "", - visibility = ["//visibility:public"], - deps = [":sum_params_cc_proto"], -) diff --git a/sandboxed_api/examples/sum/lib/CMakeLists.txt b/sandboxed_api/examples/sum/lib/CMakeLists.txt deleted file mode 100644 index 49665eb..0000000 --- a/sandboxed_api/examples/sum/lib/CMakeLists.txt +++ /dev/null @@ -1,73 +0,0 @@ -# Copyright 2019 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# sandboxed_api/examples/sum/lib:sum_params_proto -sapi_protobuf_generate_cpp(_sapi_sum_params_pb_cc _sapi_sum_params_pb_h - sum_params.proto -) -# Object library to avoid having to use -Wl,--whole-archive. This simulates -# Bazel's alwayslink=1. -add_library(sapi_sum_params_proto OBJECT - ${_sapi_sum_params_pb_cc} - ${_sapi_sum_params_pb_h} -) -add_library(sapi::sum_params_proto ALIAS sapi_sum_params_proto) -target_include_directories(sapi_sum_params_proto PUBLIC - ${Protobuf_INCLUDE_DIRS} -) - -# sandboxed_api/examples/sum/lib:sum -add_library(sapi_sum STATIC - sum.c - sum_cpp.cc -) -add_library(sapi::sum ALIAS sapi_sum) -add_dependencies(sapi_sum - sapi::sum_params_proto -) -target_link_libraries(sapi_sum - PRIVATE $ - glog::glog - sapi::base - PUBLIC protobuf::libprotobuf -) - -# sandboxed_api/examples/sum/lib:sum-sapi -add_sapi_library(sum-sapi - SOURCES sandbox.h - FUNCTIONS sum - sums - addf - sub - mul - divs - muld - crash - violate - sumarr - testptr - read_int - sleep_for_sec - sumproto - INPUTS sum.c - sum_cpp.cc - LIBRARY sapi_sum - LIBRARY_NAME Sum - NAMESPACE "" -) -add_library(sapi::sum_sapi ALIAS sum-sapi) -target_link_libraries(sum-sapi PRIVATE - $ - sapi::base -) diff --git a/sandboxed_api/examples/sum/main_sum.cc b/sandboxed_api/examples/sum/main_sum.cc index 9cd2ceb..523f0eb 100644 --- a/sandboxed_api/examples/sum/main_sum.cc +++ b/sandboxed_api/examples/sum/main_sum.cc @@ -21,9 +21,9 @@ #include "absl/memory/memory.h" #include "absl/status/status.h" #include "absl/strings/str_cat.h" -#include "sandboxed_api/examples/sum/lib/sandbox.h" -#include "sandboxed_api/examples/sum/lib/sum-sapi.sapi.h" -#include "sandboxed_api/examples/sum/lib/sum_params.pb.h" +#include "sandboxed_api/examples/sum/sandbox.h" +#include "sandboxed_api/examples/sum/sum-sapi.sapi.h" +#include "sandboxed_api/examples/sum/sum_params.pb.h" #include "sandboxed_api/transaction.h" #include "sandboxed_api/vars.h" diff --git a/sandboxed_api/examples/sum/lib/sandbox.h b/sandboxed_api/examples/sum/sandbox.h similarity index 90% rename from sandboxed_api/examples/sum/lib/sandbox.h rename to sandboxed_api/examples/sum/sandbox.h index 0b30050..921e4a9 100644 --- a/sandboxed_api/examples/sum/lib/sandbox.h +++ b/sandboxed_api/examples/sum/sandbox.h @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SANDBOXED_API_EXAMPLES_SUM_LIB_SANDBOX_H_ -#define SANDBOXED_API_EXAMPLES_SUM_LIB_SANDBOX_H_ +#ifndef SANDBOXED_API_EXAMPLES_SUM_SANDBOX_H_ +#define SANDBOXED_API_EXAMPLES_SUM_SANDBOX_H_ #include #include -#include "sandboxed_api/examples/sum/lib/sum-sapi.sapi.h" +#include "sandboxed_api/examples/sum/sum-sapi.sapi.h" #include "sandboxed_api/sandbox2/policy.h" #include "sandboxed_api/sandbox2/policybuilder.h" diff --git a/sandboxed_api/examples/sum/lib/sum.c b/sandboxed_api/examples/sum/sum.c similarity index 100% rename from sandboxed_api/examples/sum/lib/sum.c rename to sandboxed_api/examples/sum/sum.c diff --git a/sandboxed_api/examples/sum/lib/sum_cpp.cc b/sandboxed_api/examples/sum/sum_cpp.cc similarity index 93% rename from sandboxed_api/examples/sum/lib/sum_cpp.cc rename to sandboxed_api/examples/sum/sum_cpp.cc index f08b70e..1bc0a93 100644 --- a/sandboxed_api/examples/sum/lib/sum_cpp.cc +++ b/sandboxed_api/examples/sum/sum_cpp.cc @@ -13,7 +13,7 @@ // limitations under the License. #include -#include "sandboxed_api/examples/sum/lib/sum_params.pb.h" +#include "sandboxed_api/examples/sum/sum_params.pb.h" extern "C" int sumproto(const sumsapi::SumParamsProto* params) { LOG(INFO) << "Param is " << params->DebugString(); diff --git a/sandboxed_api/examples/sum/lib/sum_params.proto b/sandboxed_api/examples/sum/sum_params.proto similarity index 100% rename from sandboxed_api/examples/sum/lib/sum_params.proto rename to sandboxed_api/examples/sum/sum_params.proto diff --git a/sandboxed_api/sapi_test.cc b/sandboxed_api/sapi_test.cc index d8a42eb..052b11d 100644 --- a/sandboxed_api/sapi_test.cc +++ b/sandboxed_api/sapi_test.cc @@ -19,12 +19,11 @@ #include "gtest/gtest.h" #include "absl/memory/memory.h" #include "absl/status/status.h" -#include "sandboxed_api/examples/stringop/lib/sandbox.h" -#include "sandboxed_api/examples/stringop/lib/stringop-sapi.sapi.h" -#include "sandboxed_api/examples/stringop/lib/stringop_params.pb.h" -#include "sandboxed_api/examples/sum/lib/sandbox.h" -#include "sandboxed_api/examples/sum/lib/sum-sapi.sapi.h" -#include "sandboxed_api/examples/sum/lib/sum-sapi_embed.h" +#include "sandboxed_api/examples/stringop/sandbox.h" +#include "sandboxed_api/examples/stringop/stringop-sapi.sapi.h" +#include "sandboxed_api/examples/stringop/stringop_params.pb.h" +#include "sandboxed_api/examples/sum/sandbox.h" +#include "sandboxed_api/examples/sum/sum-sapi.sapi.h" #include "sandboxed_api/testing.h" #include "sandboxed_api/transaction.h" #include "sandboxed_api/util/status_matchers.h"