However, I can't seem to make the snap work in a xenial amd64 VM.
I tried the original snap with:
$ sudo snap install --devmode ./snappy-tests_0.1_amd64.snap
$ snappy-tests -check.f homeInterfaceSuite
...
... Error reading config: open integration-tests/data/output/testconfig.json: no such file or directory
I then created a new snap with:
$ sudo apt-get install snapcraft
$ sudo unsquashfs /var/lib/snapd/snaps/snappy-tests_100001.snap
$ sudo vi ./squashfs-root/command-snappy-tests.wrapper
adjust to be:
export GOPATH=$SNAP_USER_DATA/go
mkdir "$GOPATH"
$ adjust ./squashfs-root/snap.yaml
adjust version to be: 0.1+jdstrand1
$ sudo snap install --devmode ./snappy-tests_0.1+jdstrand1_amd64.snap
sudo systemctl stop snappy-autopilot.timer
sudo: no tty present and no askpass program specified
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x53b74f]
I'm not sure what to do at this point. It seems like adjusting the GOPATH and creating the dir in your snap will resolve the first issue, but then run into the next issues.
Paul, can you provide precise steps on how to reproduce?
In my first attempt I didn't use --devmode.
However, I can't seem to make the snap work in a xenial amd64 VM.
I tried the original snap with: tests_0. 1_amd64. snap tests/data/ output/ testconfig. json: no such file or directory
$ sudo snap install --devmode ./snappy-
$ snappy-tests -check.f homeInterfaceSuite
...
... Error reading config: open integration-
I then created a new snap with: snapd/snaps/ snappy- tests_100001. snap root/command- snappy- tests.wrapper $SNAP_USER_ DATA/go root/snap. yaml tests_0. 1+jdstrand1_ amd64.snap autopilot. timer
$ sudo apt-get install snapcraft
$ sudo unsquashfs /var/lib/
$ sudo vi ./squashfs-
adjust to be:
export GOPATH=
mkdir "$GOPATH"
$ adjust ./squashfs-
adjust version to be: 0.1+jdstrand1
$ sudo snap install --devmode ./snappy-
sudo systemctl stop snappy-
sudo: no tty present and no askpass program specified
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x53b74f]
goroutine 1 [running]: go-1.6/ src/runtime/ panic.go: 464 +0x3e6 check%2ev1. (*methodType) .PC(0x0, 0x5544e6) plars/work/ snappy/ snappy- tests/parts/ snappy- tests/go/ src/gopkg. in/check. v1/check. go:60 +0x4f check%2ev1. (*C).logCaller( 0xc8200e61e0, 0x3) plars/work/ snappy/ snappy- tests/parts/ snappy- tests/go/ src/gopkg. in/check. v1/check. go:284 +0xa1 check%2ev1. (*C).internalCh eck(0xc8200e61e 0, 0x9f39b8, 0x6, 0x9cda80, 0xc8201970c0, 0x7feac3fb2568, 0xc820026028, 0xc82004fd88, 0x0, 0x1, ...) plars/work/ snappy/ snappy- tests/parts/ snappy- tests/go/ src/gopkg. in/check. v1/helpers. go:216 +0xeaf check%2ev1. (*C).Assert( 0xc8200e61e0, 0x9cda80, 0xc8201970c0, 0x7feac3fb2568, 0xc820026028, 0xc82004fd88, 0x1, 0x1) plars/work/ snappy/ snappy- tests/parts/ snappy- tests/go/ src/gopkg. in/check. v1/helpers. go:173 +0x8c com/ubuntu- core/snappy/ integration- tests/testutils /cli.ExecComman d(0xc8200e61e0, 0xc820013b40, 0x4, 0x4, 0x0, 0x0) plars/work/ snappy/ snappy- tests/parts/ snappy- tests/go/ src/github. com/ubuntu- core/snappy/ integration- tests/testutils /cli/cli. go:42 +0x306 integration- tests/tests. init.1( ) plars/work/ snappy/ snappy- tests/parts/ snappy- tests/go/ src/snappy/ integration- tests/tests/ base_test. go:55 +0x16d integration- tests/tests. init() plars/work/ snappy/ snappy- tests/parts/ snappy- tests/go/ src/snappy/ integration- tests/tests/ writablePaths_ test.go: 107 +0x10c4 integration- tests/tests/ _test/_ testmain. go:56 +0x4a
panic(0x94a020, 0xc8200100e0)
/usr/lib/
gopkg.in/
/home/
gopkg.in/
/home/
gopkg.in/
/home/
gopkg.in/
/home/
github.
/home/
snappy/
/home/
snappy/
/home/
main.init()
snappy/
I then tried to build it myself: /github. com/plars/ snappy- tests.git tests_0. 1_amd64. snap autopilot. timer
$ sudo apt-get install git snapcraft
$ export GOPATH=$HOME/work
$ mkdir $GOPATH
$ export PATH=$PATH:$GOPATH
$ git clone https:/
$ cd snappy-tests
$ snapcraft
(this may fail; if it does, keep trying until it succeeds per IRC)
...
$ sudo snap install --devmode ./snappy-
$ snappy-tests -check.f homeInterfaceSuite
sudo systemctl stop snappy-
sudo: no tty present and no askpass program specified
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x531c3f]
goroutine 1 [running]: go-1.6/ src/runtime/ panic.go: 464 +0x3e6 check%2ev1. (*methodType) .PC(0x0, 0x52ab16) jamie/snappy- tests/parts/ snappy- tests/go/ src/gopkg. in/check. v1/check. go:60 +0x4f check%2ev1. (*C).logCaller( 0xc8200da000, 0x3) jamie/snappy- tests/parts/ snappy- tests/go/ src/gopkg. in/check. v1/check. go:284 +0xa1 check%2ev1. (*C).internalCh eck(0xc8200da00 0, 0x9cf2e0, 0x6, 0x9a9800, 0xc8201a0c00, 0x7f7be51ec590, 0xc820024028, 0xc82004dd70, 0x0, 0x1, ...) jamie/snappy- tests/parts/ snappy- tests/go/ src/gopkg. in/check. v1/helpers. go:216 +0xeaf check%2ev1. (*C).Assert( 0xc8200da000, 0x9a9800, 0xc8201a0c00, 0x7f7be51ec590, 0xc820024028, 0xc82004dd70, 0x1, 0x1) jamie/snappy- tests/parts/ snappy- tests/go/ src/gopkg. in/check. v1/helpers. go:173 +0x8c com/ubuntu- core/snappy/ integration- tests/testutils /cli.ExecComman d(0xc8200da000, 0xc820013840, 0x4, 0x4, 0x0, 0x0) jamie/snappy- tests/parts/ snappy- tests/go/ src/github. com/ubuntu- core/snappy/ integration- tests/testutils /cli/cli. go:42 +0x306 integration- tests/tests. init.1( ) jamie/snappy- tests/parts/ snappy- tests/go/ src/snappy/ integration- tests/tests/ base_test. go:56 +0x16d integration- tests/tests. init() jamie/snappy- tests/parts/ snappy- tests/go/ src/snappy/ integration- tests/tests/ writablePaths_ test.go: 107 +0xce8 integration- tests/tests/ _test/_ testmain. go:56 +0x4a
panic(0x928e60, 0xc8200100f0)
/usr/lib/
gopkg.in/
/home/
gopkg.in/
/home/
gopkg.in/
/home/
gopkg.in/
/home/
github.
/home/
snappy/
/home/
snappy/
/home/
main.init()
snappy/
I'm not sure what to do at this point. It seems like adjusting the GOPATH and creating the dir in your snap will resolve the first issue, but then run into the next issues.
Paul, can you provide precise steps on how to reproduce?