canonical / core18

The core18 base snap
14 stars 26 forks source link

[RFC] hooks: add support for `.test` files and add some initial tests #110

Closed mvo5 closed 5 years ago

mvo5 commented 5 years ago

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.

mvo5 commented 5 years ago

@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 :)