Commit Graph

6 Commits

Author SHA1 Message Date
Johannes Marbach
91529b736e main: Mock file system and add getFile tests
This uses afero to proxy all file system accesses and then injects an
in-memory file system in order to test the getFile function.
2021-12-30 14:40:46 +01:00
Minecrell
15e99c3658 getModulesDep: disallow regex submatches (MR 12)
At the moment modules in modules.dep are matched even on a submatch
e.g. looking up "msm" ends up matching "snd-soc-msm8916-digital.ko"
instead of "msm.ko". To fix this, disallow submatches using ^ and $.
2021-09-20 15:14:05 -07:00
Clayton Craft
829009250c tests: add getModuleDep testing 2021-09-13 14:36:52 -07:00
Clayton Craft
4538e7d46b Fix copyright text in Go source files
Apparently the space after is important or Go will consider the
copyright comments as package documentation.

See: #6
2021-09-03 22:42:30 -07:00
Clayton Craft
155a7bc17f stripExts: don't use a cutset when removing extension
I misread what strings.Trim does, the 2nd param is a _cut set_, so this
was removing any occurance any characters in the 2nd param. Since the
file extension is always a suffix, this uses TrimSuffix.

Fixes a bug where 'virtio_blk.ko' was being trimmed to 'virtio_bl'
2021-09-01 11:03:38 -07:00
Clayton Craft
64195a5f83 initial commit 2021-08-09 15:23:39 -07:00