Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: kevindiu <kevin_diu@yahoo.com.hk>
  • Loading branch information
kevindiu committed Jun 21, 2023
1 parent d740c8a commit 5efc35c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Makefile.d/test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ gotests/gen: \
gotests/gen-test \
test/remove-empty \
gotests/patch \
gotests/comment-unimplemented \
comment-unimpl-test \
format/go/test

.PHONY: gotests/gen-test
Expand Down Expand Up @@ -279,13 +279,12 @@ gotests/patch-placeholder:
echo "// $(TEST_NOT_IMPL_PLACEHOLDER)" >>"$$f"; \
done

.PHONY: gotests/comment-unimplemented
## apply patches to the placeholder of the generated go test files
# sed -r -i -e '/CREATE FUNCTION plpgsql_call_handler/I,+2 s/^/-- /'
gotests/comment-unimplemented:
.PHONY: gotests/comment-unimpl-test
## comment out unimplemented tests
gotests/comment-unimpl-test:
@$(call green, "apply placeholder patches to go test files...")
for f in $(GO_ALL_TEST_SOURCES) ; do \
if [ ! -f "$$f" ] ; then continue; fi; \
sed -r -i -e '/\/\/ $(TEST_NOT_IMPL_PLACEHOLDER)/,+999999 s/^/\/\/ /' $$f; \
sed -r -i -e '/\/\/ $(TEST_NOT_IMPL_PLACEHOLDER)/,+9999999 s/^/\/\/ /' $$f; \
sed -i 's/\/\/ \/\/ $(TEST_NOT_IMPL_PLACEHOLDER)/\/\/ $(TEST_NOT_IMPL_PLACEHOLDER)/g' $$f; \
done

0 comments on commit 5efc35c

Please sign in to comment.