Use select to decide the test is hermetic or not
diff --git a/BUILD b/BUILD
index 30b410a..d997dc2 100644
--- a/BUILD
+++ b/BUILD
@@ -38,6 +38,11 @@
     values = {"define": "grpc_no_ares=true"},
 )
 
+config_setting(
+    name = "remote_execution",
+    values = {"define": "GRPC_HERMETIC_TESTS=1"},
+)
+
 # This should be updated along with build.yaml
 g_stands_for = "generous"