1
0
Fork 0

Adding upstream version 2.5.1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-05-19 00:20:02 +02:00
parent c71cb8b61d
commit 982828099e
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
783 changed files with 150650 additions and 0 deletions

6
scripts/build_children.sh Executable file
View file

@ -0,0 +1,6 @@
#!/bin/sh
# Get last child project build number
BUILD_NUM=$(curl -s 'https://api.travis-ci.org/repos/blevesearch/beer-search/builds' | grep -o '^\[{"id":[0-9]*,' | grep -o '[0-9]' | tr -d '\n')
# Restart last child project build
curl -X POST https://api.travis-ci.org/builds/$BUILD_NUM/restart --header "Authorization: token "$AUTH_TOKEN

View file

@ -0,0 +1,62 @@
// Copyright © 2016 Couchbase, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build ignore
// +build ignore
package main
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
)
func main() {
modeline := ""
blocks := map[string]int{}
scanner := bufio.NewScanner(os.Stdin)
for scanner.Scan() {
line := scanner.Text()
if !strings.HasPrefix(line, "mode:") {
lastSpace := strings.LastIndex(line, " ")
prefix := line[0:lastSpace]
suffix := line[lastSpace+1:]
count, err := strconv.Atoi(suffix)
if err != nil {
fmt.Printf("error parsing count: %v", err)
continue
}
existingCount, exists := blocks[prefix]
if exists {
blocks[prefix] = existingCount + count
} else {
blocks[prefix] = count
}
} else if modeline == "" {
modeline = line
}
}
if err := scanner.Err(); err != nil {
fmt.Fprintln(os.Stderr, "reading standard input:", err)
}
fmt.Println(modeline)
for k, v := range blocks {
fmt.Printf("%s %d\n", k, v)
}
}

View file

@ -0,0 +1,29 @@
old build script
# remove old icu
sudo apt-get -y remove libicu48
# install snappy
sudo apt-get -y install libsnappy-dev
# install newer icu
curl -o /tmp/icu4c-53_1-RHEL6-x64.tgz http://download.icu-project.org/files/icu4c/53.1/icu4c-53_1-RHEL6-x64.tgz
sudo tar zxvf /tmp/icu4c-53_1-RHEL6-x64.tgz -C /
# install leveldb
curl -O https://leveldb.googlecode.com/files/leveldb-1.15.0.tar.gz
tar zxvf leveldb-1.15.0.tar.gz
cd leveldb-1.15.0
make
sudo cp --preserve=links libleveldb.* /usr/local/lib
sudo cp -r include/leveldb /usr/local/include/
sudo ldconfig
cd ..
#install cld2
cd analysis/token_filters/cld2
svn checkout http://cld2.googlecode.com/svn/trunk/ cld2-read-only
cd cld2-read-only/internal/
./compile_libs.sh
sudo cp *.so /usr/local/lib
sudo ldconfig
cd ../../../../..

View file

@ -0,0 +1,52 @@
#!/bin/bash
echo "mode: count" > acc.out
for Dir in . $(find ./* -maxdepth 10 -type d | grep -v vendor);
do
if ls $Dir/*.go &> /dev/null;
then
returnval=`go test -coverprofile=profile.out -covermode=count $Dir`
echo ${returnval}
if [[ ${returnval} != *FAIL* ]]
then
if [ -f profile.out ]
then
cat profile.out | grep -v "mode: count" >> acc.out
fi
else
exit 1
fi
fi
done
# collect integration test coverage
echo "mode: count" > integration-acc.out
INTPACKS=`go list ./... | grep -v vendor | grep -v utils | grep -v 'store/test' | grep -v docs | xargs | sed 's/ /,/g'`
returnval=`go test -coverpkg=$INTPACKS -coverprofile=profile.out -covermode=count ./test`
if [[ ${returnval} != *FAIL* ]]
then
if [ -f profile.out ]
then
cat profile.out | grep -v "mode: count" >> integration-acc.out
fi
else
exit 1
fi
cat acc.out integration-acc.out | go run scripts/merge-coverprofile.go > merged.out
if [ -n "$COVERALLS" ]
then
export GIT_BRANCH=$TRAVIS_BRANCH
goveralls -service drone.io -coverprofile=merged.out -repotoken $COVERALLS
fi
if [ -n "$COVERHTML" ]
then
go tool cover -html=merged.out
fi
rm -rf ./profile.out
rm -rf ./acc.out
rm -rf ./integration-acc.out
rm -rf ./merged.out