Do not support loading modules from "deviceinfo_modules_initfs" (MR 38)
This variable will dissappear from the deviceinfo at some point: https://gitlab.com/postmarketOS/pmaports/-/merge_requests/4169 so after it does, it would not make much sense to keep its use around
This commit is contained in:
committed by
Clayton Craft
parent
d77e1cd11d
commit
2b467eb77f
@@ -19,7 +19,6 @@ type DeviceInfo struct {
|
||||
InitfsCompression string
|
||||
InitfsExtraCompression string
|
||||
MesaDriver string
|
||||
ModulesInitfs string
|
||||
UbootBoardname string
|
||||
}
|
||||
|
||||
|
@@ -12,7 +12,7 @@ import (
|
||||
|
||||
// Test ReadDeviceinfo and the logic of reading from multiple files
|
||||
func TestReadDeviceinfo(t *testing.T) {
|
||||
modules_expected := "panfrost foo bar bazz"
|
||||
compression_expected := "gz -9"
|
||||
mesa_expected := "msm"
|
||||
|
||||
var devinfo DeviceInfo
|
||||
@@ -28,8 +28,8 @@ func TestReadDeviceinfo(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Errorf("received an unexpected err: %s", err)
|
||||
}
|
||||
if devinfo.ModulesInitfs != modules_expected {
|
||||
t.Errorf("expected %q, got: %q", modules_expected, devinfo.ModulesInitfs)
|
||||
if devinfo.InitfsCompression != compression_expected {
|
||||
t.Errorf("expected %q, got: %q", compression_expected, devinfo.InitfsCompression)
|
||||
}
|
||||
if devinfo.MesaDriver != mesa_expected {
|
||||
t.Errorf("expected %q, got: %q", mesa_expected, devinfo.MesaDriver)
|
||||
@@ -44,9 +44,9 @@ func TestNameToField(t *testing.T) {
|
||||
}{
|
||||
{"deviceinfo_dtb", "Dtb"},
|
||||
{"dtb", "Dtb"},
|
||||
{"deviceinfo_modules_initfs", "ModulesInitfs"},
|
||||
{"deviceinfo_initfs_compression", "InitfsCompression"},
|
||||
{"modules_initfs", "ModulesInitfs"},
|
||||
{"deviceinfo_modules_initfs___", "ModulesInitfs"},
|
||||
{"deviceinfo_initfs_compression___", "InitfsCompression"},
|
||||
{"deviceinfo_initfs_extra_compression", "InitfsExtraCompression"},
|
||||
}
|
||||
|
||||
@@ -67,12 +67,11 @@ func TestUnmarshal(t *testing.T) {
|
||||
in string
|
||||
expected string
|
||||
}{
|
||||
{"ModulesInitfs", "deviceinfo_modules_initfs=\"panfrost foo bar bazz\"\n", "panfrost foo bar bazz"},
|
||||
{"ModulesInitfs", "deviceinfo_modules_initfs=\"panfrost foo bar bazz\"", "panfrost foo bar bazz"},
|
||||
{"InitfsCompression", "deviceinfo_initfs_compression=\"gzip:-9\"\n", "gzip:-9"},
|
||||
// line with multiple '='
|
||||
{"InitfsCompression", "deviceinfo_initfs_compression=zstd:--foo=1 -T0 --bar=bazz", "zstd:--foo=1 -T0 --bar=bazz"},
|
||||
// empty option
|
||||
{"ModulesInitfs", "deviceinfo_modules_initfs=\"\"\n", ""},
|
||||
{"InitfsCompression", "deviceinfo_initfs_compression=\"\"\n", ""},
|
||||
// line with comment at the end
|
||||
{"MesaDriver", "deviceinfo_mesa_driver=\"panfrost\" # this is a nice driver", "panfrost"},
|
||||
{"", "# this is a comment!\n", ""},
|
||||
|
@@ -1,2 +1,2 @@
|
||||
deviceinfo_modules_initfs="panfrost foo bar bazz"
|
||||
deviceinfo_initfs_compression="gz -9"
|
||||
deviceinfo_mesa_driver="panfrost"
|
||||
|
Reference in New Issue
Block a user