mirror of
https://github.com/Jguer/yay
synced 2024-10-31 13:42:27 +00:00
commit
7644a92c1c
6 changed files with 6 additions and 68 deletions
2
Makefile
2
Makefile
|
@ -4,7 +4,7 @@ PREFIX := /usr
|
|||
DESTDIR :=
|
||||
|
||||
MAJORVERSION := 8
|
||||
MINORVERSION ?= $(shell git rev-list --count master)
|
||||
MINORVERSION ?= 2
|
||||
PATCHVERSION := 0
|
||||
VERSION ?= ${MAJORVERSION}.${MINORVERSION}.${PATCHVERSION}
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ type Configuration struct {
|
|||
UseAsk bool `json:"useask"`
|
||||
}
|
||||
|
||||
var version = "8.1173"
|
||||
var version = "8.2.0"
|
||||
|
||||
// configFileName holds the name of the config file.
|
||||
const configFileName string = "config.json"
|
||||
|
|
|
@ -14,7 +14,8 @@ func expect(t *testing.T, field string, a interface{}, b interface{}, err error)
|
|||
}
|
||||
|
||||
func TestConfig(t *testing.T) {
|
||||
config.PacmanConf = "testdata/pacman.conf"
|
||||
config = &Configuration{}
|
||||
config.PacmanConf = "./testdata/pacman.conf"
|
||||
|
||||
err := initAlpm()
|
||||
if err != nil {
|
||||
|
|
|
@ -434,9 +434,9 @@ nextpkg:
|
|||
|
||||
if len(incompatible) > 0 {
|
||||
fmt.Println()
|
||||
fmt.Print(bold(yellow(arrow))+" The following packages are not compatible with your architecture:")
|
||||
fmt.Print(bold(yellow(arrow)) + " The following packages are not compatible with your architecture:")
|
||||
for pkg := range incompatible {
|
||||
fmt.Print(" "+cyan(basesMap[pkg].String()))
|
||||
fmt.Print(" " + cyan(basesMap[pkg].String()))
|
||||
}
|
||||
|
||||
fmt.Println()
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func benchmarkPrintSearch(search string, b *testing.B) {
|
||||
old := os.Stdout
|
||||
_, w, _ := os.Pipe()
|
||||
os.Stdout = w
|
||||
|
||||
for n := 0; n < b.N; n++ {
|
||||
res, _ := queryRepo(append([]string{}, search))
|
||||
res.printSearch()
|
||||
}
|
||||
os.Stdout = old
|
||||
}
|
||||
|
||||
func BenchmarkPrintSearchSimpleTopDown(b *testing.B) {
|
||||
config.SortMode = TopDown
|
||||
benchmarkPrintSearch("chromium", b)
|
||||
}
|
||||
func BenchmarkPrintSearchComplexTopDown(b *testing.B) {
|
||||
config.SortMode = TopDown
|
||||
benchmarkPrintSearch("linux", b)
|
||||
}
|
||||
|
||||
func BenchmarkPrintSearchSimpleBottomUp(b *testing.B) {
|
||||
config.SortMode = BottomUp
|
||||
benchmarkPrintSearch("chromium", b)
|
||||
}
|
||||
func BenchmarkPrintSearchComplexBottomUp(b *testing.B) {
|
||||
config.SortMode = BottomUp
|
||||
benchmarkPrintSearch("linux", b)
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
package main
|
||||
|
||||
import "testing"
|
||||
|
||||
func benchmarkSearch(search string, b *testing.B) {
|
||||
for n := 0; n < b.N; n++ {
|
||||
queryRepo(append([]string{}, search))
|
||||
}
|
||||
}
|
||||
func BenchmarkSearchSimpleTopDown(b *testing.B) {
|
||||
config.SortMode = TopDown
|
||||
benchmarkSearch("chromium", b)
|
||||
}
|
||||
|
||||
func BenchmarkSearchSimpleBottomUp(b *testing.B) {
|
||||
config.SortMode = BottomUp
|
||||
benchmarkSearch("chromium", b)
|
||||
}
|
||||
|
||||
func BenchmarkSearchComplexTopDown(b *testing.B) {
|
||||
config.SortMode = TopDown
|
||||
benchmarkSearch("linux", b)
|
||||
}
|
||||
func BenchmarkSearchComplexBottomUp(b *testing.B) {
|
||||
config.SortMode = BottomUp
|
||||
benchmarkSearch("linux", b)
|
||||
}
|
Loading…
Reference in a new issue