These are chat archives for derekparker/delve

30th
Mar 2016
Sam Vilain
@samv
Mar 30 2016 18:25
Hey, I couldn’t find instructions about how to convert ‘go test’ to a dlv command
Alessandro Arzilli
@aarzilli
Mar 30 2016 18:25
dlv test
Sam Vilain
@samv
Mar 30 2016 18:26
I get could not launch process: could not fork/exec
Also it doesn’t seem to accept -run to run a single test
Alessandro Arzilli
@aarzilli
Mar 30 2016 18:27
OS X? you didn't sign dlv correctly
Sam Vilain
@samv
Mar 30 2016 18:28
I followed the instructions, and according to ‘codesign’ it’s already signed
eg
$ CERT=dlv-cert make install
go install -ldflags="-s -X main.Build=53af850bdc8e2db73ea64d02255e4ae4d1b97343" github.com/derekparker/delve/cmd/dlv
codesign -s "dlv-cert" /Users/samv/bin/dlv
/Users/samv/bin/dlv: is already signed
make: *** [install] Error 1
Alessandro Arzilli
@aarzilli
Mar 30 2016 18:31
make a new hello world program inside an empty directory and run dlv debug there, if you get the same error then the problem is with the certificate
or with taskgated
Sam Vilain
@samv
Mar 30 2016 18:33
Oh actually there was one instruction I couldn’t follow; In keychains select “System”, and you should find your new certificate. Use the context menu for the certificate, select “Get Info”, open the “Trust” item, and set “Code Signing” to “Always Trust”.
Alessandro Arzilli
@aarzilli
Mar 30 2016 18:33
I didn't get it right the first time either
Sam Vilain
@samv
Mar 30 2016 18:33
I didn’t see a “Trust” item
There were a few steps that the instructions said to skip over with a lot of checkboxes
Sam Vilain
@samv
Mar 30 2016 18:40
I still don’t get that Trust option.
Alessandro Arzilli
@aarzilli
Mar 30 2016 18:41
Sam Vilain
@samv
Mar 30 2016 18:51
got it. derekparker/delve#480
Alessandro Arzilli
@aarzilli
Mar 30 2016 18:51
thanks!
Sam Vilain
@samv
Mar 30 2016 18:52
np, thanks for reminding me about that video :)
Alessandro Arzilli
@aarzilli
Mar 30 2016 18:52
regardin -run I think you can pass it either like this: dlv test -- -run … or like this: dlv test -- -test.run …
I have never tried I'm not sure it works, if it doesn't open an issue
Sam Vilain
@samv
Mar 30 2016 18:55
OK thanks for that. It at least doesn’t reject the command, but it doesn’t seem to be running the test; instead the main program is debugged when I type “c” at the first prompt
Alessandro Arzilli
@aarzilli
Mar 30 2016 18:55
what do you mean?
Sam Vilain
@samv
Mar 30 2016 18:58
It appeared to not be running my tests but instead starting the main program which doesn’t terminate. However, on further inspection, ‘go test’ is also doing this, and it’s actually because an initializer was blocked on start-up.
sweet, it now works. I also had to change eg ‘-v -run’ to ‘-test.v -test.run’
Alessandro Arzilli
@aarzilli
Mar 30 2016 19:05
you can interrupt a running program with ^C and find out what it's doing using goroutines and stack