The current hooks do not have a good testing story. To fix this
this PR adds support for "hook/foo.test" files that will be run
at the end of the prime phase during the snap build.
It also adds two initial tests and converts the existing ABI test.
If this looks reasonable we can write tests for the remaining hooks
to ensure we do not regress again.
@sil2100 Thank you! I moved the test files out now, the original "design" was inspired by go (which mixes source and test in a very similar way) but as foundations own this I'm fine accommodating your preferences :)
The current hooks do not have a good testing story. To fix this this PR adds support for "hook/foo.test" files that will be run at the end of the prime phase during the snap build.
It also adds two initial tests and converts the existing ABI test. If this looks reasonable we can write tests for the remaining hooks to ensure we do not regress again.