[go: nahoru, domu]

[rust] Fix un-rebuilt test wrappers.

Rust unit test wrappers were not always being rebuilt when the list of
test executables changed.

This CL also distinguishes the target to build autocxx tests from the
target which runs them. This follows the pattern of build_rust_tests vs
rust_build_tests.

Change-Id: Ic5170e7e9e2ffd51d7a711e11b1fb5c38d7f1a6a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3600993
Reviewed-by: Ɓukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: Erik Staab <estaab@chromium.org>
Commit-Queue: Adrian Taylor <adetaylor@chromium.org>
Cr-Commit-Position: refs/heads/main@{#995205}
diff --git a/BUILD.gn b/BUILD.gn
index ed83324..bf5ae4c 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -863,7 +863,7 @@
   deps = [ "//build/rust/tests" ]
 }
 
-group("autocxx_tests") {
+group("rust_autocxx_tests") {
   testonly = true
   deps = [ "//third_party/rust/autocxx/chromium_integration/tests" ]
 }
diff --git a/build/rust/rust_unit_tests_group.gni b/build/rust/rust_unit_tests_group.gni
index 0d67c7e..486b1ea5 100644
--- a/build/rust/rust_unit_tests_group.gni
+++ b/build/rust/rust_unit_tests_group.gni
@@ -65,6 +65,7 @@
 
     testonly = true
     script = "//testing/scripts/rust/generate_bash_script.py"
+    inputs = [ _metadata_filepath ]
     outputs = [ _script_filepath ]
 
     data = [ _script_filepath ]
diff --git a/testing/buildbot/chromium.rust.json b/testing/buildbot/chromium.rust.json
index aea0fa8..06ee193 100644
--- a/testing/buildbot/chromium.rust.json
+++ b/testing/buildbot/chromium.rust.json
@@ -5,7 +5,7 @@
     "additional_compile_targets": [
       "mojo_rust",
       "rust_build_tests",
-      "autocxx_tests"
+      "rust_autocxx_tests"
     ],
     "gtest_tests": [
       {
@@ -84,7 +84,7 @@
     "additional_compile_targets": [
       "mojo_rust",
       "rust_build_tests",
-      "autocxx_tests"
+      "rust_autocxx_tests"
     ],
     "gtest_tests": [
       {
@@ -164,7 +164,7 @@
       "mojo_rust",
       "mojo_rust_tests",
       "rust_build_tests",
-      "autocxx_tests"
+      "rust_autocxx_tests"
     ],
     "gtest_tests": [
       {
@@ -268,7 +268,7 @@
       "mojo_rust",
       "mojo_rust_tests",
       "rust_build_tests",
-      "autocxx_tests"
+      "rust_autocxx_tests"
     ],
     "gtest_tests": [
       {
@@ -372,7 +372,7 @@
       "mojo_rust",
       "mojo_rust_tests",
       "rust_build_tests",
-      "autocxx_tests"
+      "rust_autocxx_tests"
     ],
     "gtest_tests": [
       {
diff --git a/testing/buildbot/gn_isolate_map.pyl b/testing/buildbot/gn_isolate_map.pyl
index 3ecbc536..8233f4e 100644
--- a/testing/buildbot/gn_isolate_map.pyl
+++ b/testing/buildbot/gn_isolate_map.pyl
@@ -1597,6 +1597,10 @@
     "label": "//build/rust/tests",
     "type": "additional_compile_target",
   },
+  "rust_autocxx_tests": {
+    "label": "//third_party/rust/autocxx/chromium_integration/tests",
+    "type": "additional_compile_target",
+  },
   "rust_gtest_interop_unittests": {
     "label": "//testing/rust_gtest_interop:rust_gtest_interop_unittests",
     "type": "console_test_launcher",
diff --git a/testing/buildbot/waterfalls.pyl b/testing/buildbot/waterfalls.pyl
index eb6ba5f..42f25d0 100644
--- a/testing/buildbot/waterfalls.pyl
+++ b/testing/buildbot/waterfalls.pyl
@@ -5636,7 +5636,7 @@
         'additional_compile_targets': [
           'mojo_rust',
           'rust_build_tests',
-          'autocxx_tests',
+          'rust_autocxx_tests',
         ],
         'mixins': [ 'marshmallow' ],
         'test_suites': {
@@ -5650,7 +5650,7 @@
         'additional_compile_targets': [
           'mojo_rust',
           'rust_build_tests',
-          'autocxx_tests',
+          'rust_autocxx_tests',
         ],
         'mixins': [ 'marshmallow' ],
         'test_suites': {
@@ -5665,7 +5665,7 @@
           'mojo_rust',
           'mojo_rust_tests',
           'rust_build_tests',
-          'autocxx_tests',
+          'rust_autocxx_tests',
         ],
         'test_suites': {
           'gtest_tests': 'rust_gtests',
@@ -5677,7 +5677,7 @@
           'mojo_rust',
           'mojo_rust_tests',
           'rust_build_tests',
-          'autocxx_tests',
+          'rust_autocxx_tests',
         ],
         'test_suites': {
           'gtest_tests': 'rust_gtests',
@@ -5689,7 +5689,7 @@
           'mojo_rust',
           'mojo_rust_tests',
           'rust_build_tests',
-          'autocxx_tests',
+          'rust_autocxx_tests',
         ],
         'test_suites': {
           'gtest_tests': 'rust_gtests',