diff options
-rw-r--r-- | Makefile | 7 | ||||
-rw-r--r-- | internal/gitaly/service/repository/search_files_test.go | 16 |
2 files changed, 5 insertions, 18 deletions
@@ -84,6 +84,7 @@ ifeq (${GIT_BUILD_OPTIONS},) GIT_BUILD_OPTIONS += DEVELOPER=1 # make it easy to debug in case of crashes GIT_BUILD_OPTIONS += CFLAGS='-O0 -g3' + GIT_BUILD_OPTIONS += USE_LIBPCRE2=YesPlease GIT_BUILD_OPTIONS += NO_PERL=YesPlease GIT_BUILD_OPTIONS += NO_EXPAT=YesPlease GIT_BUILD_OPTIONS += NO_TCLTK=YesPlease @@ -333,7 +334,7 @@ no-changes: smoke-test: all rspec ${Q}go test -tags "${GO_BUILD_TAGS}" ./internal/gitaly/rubyserver -.PHONY: +.PHONY: git git: ${GIT_INSTALL_DIR}/bin/git .PHONY: libgit2 @@ -399,7 +400,7 @@ ${GOIMPORTS}: ${BUILD_DIR}/Makefile.sha256 ${BUILD_DIR}/go.mod ${Q}cd ${BUILD_DIR} && go get golang.org/x/tools/cmd/goimports@2538eef75904eff384a2551359968e40c207d9d2 ifeq (${GIT_USE_PREBUILT_BINARIES},) -${GIT_INSTALL_DIR}/bin/git: ${BUILD_DIR}/Makefile.sha256 | ${BUILD_DIR} +${GIT_INSTALL_DIR}/bin/git: ${BUILD_DIR}/Makefile.sha256 ${Q}rm -rf ${GIT_SOURCE_DIR} ${GIT_INSTALL_DIR} ${GIT} clone --depth 1 --branch ${GIT_VERSION} --quiet ${GIT_REPO_URL} ${GIT_SOURCE_DIR} ${Q}rm -rf ${GIT_INSTALL_DIR} @@ -412,7 +413,7 @@ ${GIT_INSTALL_DIR}/bin/git: ${BUILD_DIR}/git_full_bins.tgz tar -C ${GIT_INSTALL_DIR} -xvzf ${BUILD_DIR}/git_full_bins.tgz endif -${GOCOVER_COBERTURA}: ${BUILD_DIR}/Makefile.sha256 | ${BUILD_DIR} +${GOCOVER_COBERTURA}: ${BUILD_DIR}/Makefile.sha256 ${Q}cd ${BUILD_DIR} && go get github.com/t-yuki/gocover-cobertura@${GOCOVER_COBERTURA_VERSION} ${GO_JUNIT_REPORT}: ${BUILD_DIR}/Makefile.sha256 ${BUILD_DIR}/go.mod diff --git a/internal/gitaly/service/repository/search_files_test.go b/internal/gitaly/service/repository/search_files_test.go index cd46e18b0..9f13b141d 100644 --- a/internal/gitaly/service/repository/search_files_test.go +++ b/internal/gitaly/service/repository/search_files_test.go @@ -5,13 +5,11 @@ import ( "fmt" "io" "io/ioutil" - "os/exec" "path" "strings" "testing" "github.com/stretchr/testify/require" - "gitlab.com/gitlab-org/gitaly/internal/command" "gitlab.com/gitlab-org/gitaly/internal/gitaly/config" "gitlab.com/gitlab-org/gitaly/internal/testhelper" "gitlab.com/gitlab-org/gitaly/proto/go/gitalypb" @@ -89,7 +87,7 @@ func TestSearchFilesByContentSuccessful(t *testing.T) { client, conn := newRepositoryClient(t, serverSocketPath) defer conn.Close() - testRepo, testRepoPath, cleanupFn := testhelper.NewTestRepo(t) + testRepo, _, cleanupFn := testhelper.NewTestRepo(t) defer cleanupFn() testCases := []struct { @@ -97,7 +95,6 @@ func TestSearchFilesByContentSuccessful(t *testing.T) { query string ref string output [][]byte - skip func(t *testing.T) }{ { desc: "single file in many_files", @@ -128,22 +125,11 @@ func TestSearchFilesByContentSuccessful(t *testing.T) { query: "(*LIMIT_MATCH=1)foobar", ref: "many_files", output: contentOutputLines, - skip: func(t *testing.T) { - cmd := exec.Command(command.GitPath(), "-C", testRepoPath, "grep", "--perl-regexp", "(*LIMIT_MATCH=1)foobar", "many_files") - err := cmd.Run() - if exitError, ok := err.(*exec.ExitError); ok && exitError.ExitCode() == 128 { - t.Skip("Git does not seem to be compiled with support for PCRE2") - } - }, }, } for _, tc := range testCases { t.Run(tc.desc, func(t *testing.T) { - if tc.skip != nil { - tc.skip(t) - } - request := &gitalypb.SearchFilesByContentRequest{ Repository: testRepo, Query: tc.query, |