Run some smoke tests in our buildkite CI
I'm only adding tests that pass today.
PiperOrigin-RevId: 475492838
diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml
index 2465f28..c40f2bf 100644
--- a/.bazelci/presubmit.yml
+++ b/.bazelci/presubmit.yml
@@ -7,6 +7,14 @@
# TODO(b/234804076): Make the whole repo buildable/testable with //...
# Target below is only a rudimentary smoke test.
- "//rs_bindings_from_cc:rs_bindings_from_cc_impl"
+ - "//rs_bindings_from_cc:importer_test"
+ - "//rs_bindings_from_cc:cc_collect_instantiations_test"
+ - "//rs_bindings_from_cc:collect_instantiations_test"
+ - "//rs_bindings_from_cc:bazel_types_test"
+ - "//rs_bindings_from_cc:cmdline_test"
+ - "//rs_bindings_from_cc:rs_ir_test"
+ - "//cc_template/..."
+ - "//lifetime_analysis/..."
default_linux_task: &default_linux_task
platform: ubuntu2004
shell_commands:
diff --git a/lifetime_analysis/analyze.cc b/lifetime_analysis/analyze.cc
index 14c07e3..723e03e 100644
--- a/lifetime_analysis/analyze.cc
+++ b/lifetime_analysis/analyze.cc
@@ -690,16 +690,6 @@
LifetimeSubstitutions subst;
};
-bool HasRecordTypeFields(const clang::RecordDecl* record) {
- for (const clang::FieldDecl* field : record->fields()) {
- if (field->getType()->isRecordType()) {
- return true;
- }
- }
-
- return false;
-}
-
const CXXConstructorDecl* GetDefaultConstructor(const CXXRecordDecl* record) {
for (const CXXConstructorDecl* ctor : record->ctors()) {
if (ctor->isDefaultConstructor()) {
diff --git a/rs_bindings_from_cc/BUILD b/rs_bindings_from_cc/BUILD
index 86cdcba..9aa337f 100644
--- a/rs_bindings_from_cc/BUILD
+++ b/rs_bindings_from_cc/BUILD
@@ -115,7 +115,7 @@
"@absl//absl/status",
"@absl//absl/status:statusor",
"@absl//absl/strings",
- "@com_google_googletest//:gtest_main_no_heapcheck",
+ "@com_google_googletest//:gtest_main",
],
)
diff --git a/rs_bindings_from_cc/importer_test.cc b/rs_bindings_from_cc/importer_test.cc
index 0ca66d2..595f04b 100644
--- a/rs_bindings_from_cc/importer_test.cc
+++ b/rs_bindings_from_cc/importer_test.cc
@@ -213,9 +213,6 @@
// Matches a MappedType that is void.
MATCHER(IsVoid, "") { return arg.IsVoid(); }
-// Matches a MappedType that is an integer.
-auto IsInt() { return AllOf(CcTypeIs(IsCcInt()), RsTypeIs(IsRsInt())); }
-
// Matches a MappedType that is a pointer to integer.
auto IsIntPtr() {
return AllOf(CcTypeIs(CcPointsTo(IsCcInt())),
@@ -228,12 +225,6 @@
RsTypeIs(RsPointsTo(IsRsInt())));
}
-// Matches a MappedType for cc and rs types with no type arguments.
-auto IsSimpleType(absl::string_view rs_name, absl::string_view cc_name) {
- return AllOf(CcTypeIs(NameIs(cc_name), CcTypeParamsAre()),
- RsTypeIs(NameIs(rs_name), RsTypeParamsAre()));
-}
-
// Matches a Record that has fields matching `matchers`.
template <typename... Args>
auto FieldsAre(const Args&... matchers) {