Skip to content

Commit

Permalink
*: remove checks for TRAVIS env variable (#3568)
Browse files Browse the repository at this point in the history
We had a few checks left over for the TRAVIS variable that detected if
we were running under the TravisCI build system.
This variable hasn't been set since 2020.
  • Loading branch information
aarzilli committed Nov 16, 2023
1 parent 938cb6e commit a8ee87e
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 29 deletions.
19 changes: 1 addition & 18 deletions _scripts/make.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ This option can only be specified if testset is basic or a single package.`)

func checkCert() bool {
// If we're on OSX make sure the proper CERT env var is set.
if os.Getenv("TRAVIS") == "true" || runtime.GOOS != "darwin" || os.Getenv("CERT") != "" {
if runtime.GOOS != "darwin" || os.Getenv("CERT") != "" {
return true
}

Expand Down Expand Up @@ -328,9 +328,6 @@ func testFlags() []string {
}
if NOTimeout {
testFlags = append(testFlags, "-timeout", "0")
} else if os.Getenv("TRAVIS") == "true" {
// Make test timeout shorter than Travis' own timeout so that Go can report which test hangs.
testFlags = append(testFlags, "-timeout", "9m")
}
if len(os.Getenv("TEAMCITY_VERSION")) > 0 {
testFlags = append(testFlags, "-json")
Expand All @@ -344,20 +341,6 @@ func testFlags() []string {
func testCmd(cmd *cobra.Command, args []string) {
checkCertCmd(nil, nil)

if os.Getenv("TRAVIS") == "true" && runtime.GOOS == "darwin" {
fmt.Println("Building with native backend")
execute("go", "build", "-tags=macnative", buildFlags(), DelveMainPackagePath)

fmt.Println("\nBuilding without native backend")
execute("go", "build", buildFlags(), DelveMainPackagePath)

fmt.Println("\nTesting")
os.Setenv("PROCTEST", "lldb")
env := []string{}
executeq(env, "sudo", "-E", "go", "test", testFlags(), allPackages())
return
}

if TestSet == "" && TestBackend == "" && TestBuildMode == "" {
if TestRegex != "" {
fmt.Printf("Can not use --test-run without --test-set\n")
Expand Down
3 changes: 0 additions & 3 deletions cmd/dlv/dlv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,6 @@ func diffMaybe(t *testing.T, filename string, generated []byte) {
// TestGeneratedDoc tests that the autogenerated documentation has been
// updated.
func TestGeneratedDoc(t *testing.T) {
if strings.ToLower(os.Getenv("TRAVIS")) == "true" && runtime.GOOS == "windows" {
t.Skip("skipping test on Windows in CI")
}
if runtime.GOOS == "windows" && runtime.GOARCH == "arm64" {
//TODO(qmuntal): investigate further when the Windows ARM64 backend is more stable.
t.Skip("skipping test on Windows in CI")
Expand Down
5 changes: 0 additions & 5 deletions pkg/proc/proc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3054,11 +3054,6 @@ func TestIssue877(t *testing.T) {
if runtime.GOOS != "darwin" && testBackend == "lldb" {
return
}
if os.Getenv("TRAVIS") == "true" && runtime.GOOS == "darwin" {
// Something changed on Travis side that makes the Go compiler fail if
// DYLD_LIBRARY_PATH is set.
t.Skip("broken")
}
const envval = "/usr/local/lib"
t.Setenv("DYLD_LIBRARY_PATH", envval)
withTestProcess("issue877", t, func(p *proc.Target, grp *proc.TargetGroup, fixture protest.Fixture) {
Expand Down
3 changes: 0 additions & 3 deletions pkg/proc/test/support.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,6 @@ func MustSupportFunctionCalls(t *testing.T, testBackend string) {
t.Skip("this backend does not support function calls")
}

if runtime.GOOS == "darwin" && os.Getenv("TRAVIS") == "true" && runtime.GOARCH == "amd64" {
t.Skip("function call injection tests are failing on macOS on Travis-CI (see #1802)")
}
if runtime.GOARCH == "386" {
t.Skip(fmt.Errorf("%s does not support FunctionCall for now", runtime.GOARCH))
}
Expand Down

0 comments on commit a8ee87e

Please sign in to comment.