aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsomov <somov@yandex-team.com>2023-12-13 06:53:31 +0300
committersomov <somov@yandex-team.com>2023-12-13 07:27:36 +0300
commit4196ba35117330d4f0ad63aafcf61ef347a39c5a (patch)
treef9b9c9bdfb41985d8df2505caf0965657e8f13d1
parent5b48aabc614c6d407f885f3b228dc484ad4c5ba9 (diff)
downloadydb-4196ba35117330d4f0ad63aafcf61ef347a39c5a.tar.gz
Add GO_MOCKGEN_CONTRIB_FROM macro to generate mockgens from contribs
-rw-r--r--build/conf/go.conf9
1 files changed, 8 insertions, 1 deletions
diff --git a/build/conf/go.conf b/build/conf/go.conf
index 55ff2a463e..18d3430584 100644
--- a/build/conf/go.conf
+++ b/build/conf/go.conf
@@ -984,6 +984,13 @@ module GO_TEST: GO_PROGRAM {
# tag:go-specific
macro GO_MOCKGEN_FROM(Path) {
SET(MOCKGEN_FROM ${Path})
+ SET(MOCKGEN_MODULE ${GO_ARCADIA_PROJECT_PREFIX}${Path})
+}
+
+# tag:go-specific
+macro GO_MOCKGEN_CONTRIB_FROM(Path) {
+ SET(MOCKGEN_FROM ${GO_CONTRIB_PROJECT_PREFIX}/${Path})
+ SET(MOCKGEN_MODULE ${Path})
}
# tag:go-specific
@@ -1002,7 +1009,7 @@ macro GO_MOCKGEN_REFLECT() {
PEERDIR(vendor/go.uber.org/mock/mockgen/model)
PEERDIR(${MOCKGEN_FROM})
- RUN_PROGRAM(vendor/go.uber.org/mock/mockgen -prog_only ${GO_ARCADIA_PROJECT_PREFIX}${MOCKGEN_FROM} $MOCKGEN_TYPES STDOUT main.go)
+ RUN_PROGRAM(vendor/go.uber.org/mock/mockgen -prog_only $MOCKGEN_MODULE $MOCKGEN_TYPES STDOUT main.go)
}
# tag:internal