2
0
Fork 0

test: pass store to test children

This commit is contained in:
Emery Hemingway 2020-05-29 22:04:22 +05:30
parent 08913768fc
commit 4acaab5244
3 changed files with 37 additions and 5 deletions

View File

@ -38,11 +38,14 @@ let
''run_genode_until {child "init" exited with exit value 0} 120'';
mkTest = { name ? "unamed", testScript ? defaultScript, testConfig
, testInputs ? [ ], testEnv ? { }, qemuArgs ? [ ], ... }@t:
, testInputs ? [ ], testEnv ? { }, extraPaths ? [ ], qemuArgs ? [ ], ...
}@t:
let
storeTarball = buildPackages.runCommand "store" { } ''
mkdir -p $out
tar cf "$out/store.tar" --absolute-names ${toString testInputs}
tar cf "$out/store.tar" --absolute-names ${toString testInputs} ${
toString extraPaths
}
'';
storeManifest = lib.mergeManifests (map addManifest testInputs);
manifest = lib.mergeManifests (map addManifest

View File

@ -38,11 +38,14 @@ let
''run_genode_until {child "init" exited with exit value 0} 120'';
mkTest = { name ? "unamed", testScript ? defaultScript, testConfig
, testInputs ? [ ], testEnv ? { }, qemuArgs ? [ ], ... }@t:
, testInputs ? [ ], testEnv ? { }, extraPaths ? [ ], qemuArgs ? [ ], ...
}@t:
let
storeTarball = buildPackages.runCommand "store" { } ''
mkdir -p $out
tar cf "$out/store.tar" --absolute-names ${toString testInputs}
tar cf "$out/store.tar" --absolute-names ${toString testInputs} ${
toString extraPaths
}
'';
storeManifest = lib.mergeManifests (map addManifest testInputs);
manifest = lib.mergeManifests (map addManifest

View File

@ -29,7 +29,10 @@ let Manifest/toRoutes =
}
, route =
Init.Route.Type.Child
{ name = "store_rom", label = Some entry.mapValue }
{ name = "store_rom"
, label = Some entry.mapValue
, diag = None Bool
}
}
)
( Prelude.List.concat
@ -37,6 +40,18 @@ let Manifest/toRoutes =
(Prelude.Map.values Text (Prelude.Map.Type Text Text) manifest)
)
let parentROMs =
Prelude.List.map
Text
Init.ServiceRoute.Type
( λ(label : Text)
→ { service =
{ name = "ROM", label = Init.LabelSelector.Type.Last label }
, route =
Init.Route.Type.Parent { label = Some label, diag = None Bool }
}
)
let wrapHarness
: Children → Manifest/Type → Child.Type
= λ(children : Children)
@ -58,7 +73,18 @@ let wrapHarness
, Init.ServiceRoute.parent "VM"
, Init.ServiceRoute.child "Timer" "timer"
, Init.ServiceRoute.child "Rtc" "rtc"
, Init.ServiceRoute.child "File_system" "store_fs"
]
# parentROMs
[ "ld.lib.so"
, "init"
, "platform_info"
, "core_log"
, "kernel_log"
, "vfs"
, "libvfs.so"
, "cached_fs_rom"
]
# Manifest/toRoutes manifest
}