File: 0002-Revert-commit-688cb6ef-to-avoid-new-dependency.patch

package info (click to toggle)
mtail 3.2.1-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 7,364 kB
  • sloc: yacc: 617; makefile: 226; sh: 112; lisp: 77; awk: 17
file content (55 lines) | stat: -rw-r--r-- 1,314 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
From: Martina Ferrari <tina@tina.pm>
Date: Sun, 18 May 2025 13:54:48 +0100
Subject: Revert commit 688cb6ef to avoid new dependency

Forwarded: not-needed
---
 internal/mtail/exec_integration_test.go | 24 ++++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/internal/mtail/exec_integration_test.go b/internal/mtail/exec_integration_test.go
index e81e657..4e9b190 100644
--- a/internal/mtail/exec_integration_test.go
+++ b/internal/mtail/exec_integration_test.go
@@ -5,21 +5,37 @@ package mtail_test
 
 import (
 	"context"
+	"errors"
 	"fmt"
 	"os/exec"
+	"path/filepath"
 	"syscall"
 	"testing"
 	"time"
 
-	"github.com/bazelbuild/rules_go/go/tools/bazel"
+	"github.com/golang/glog"
 	"github.com/jaqx0r/mtail/internal/testutil"
 )
 
+var mtailPath string
+
+func init() {
+	path, err := exec.LookPath(filepath.Join("..", "..", "mtail"))
+	if errors.Is(err, exec.ErrDot) {
+		err = nil
+	}
+	if err != nil {
+		glog.Infof("exec_integration_test init(): %v", err)
+	}
+	mtailPath = path
+}
+
 func TestExecMtail(t *testing.T) {
-	mtailPath, ok := bazel.FindBinary("cmd/mtail", "mtail")
-	if !ok {
-		t.Fatal("`mtail` not found in runfiles")
+	if mtailPath == "" {
+		t.Log("mtail binary not found, skipping")
+		t.Skip()
 	}
+
 	cs := []string{
 		"-progs",
 		"../../examples",