test: pass store to test children
This commit is contained in:
parent
08913768fc
commit
4acaab5244
|
@ -38,11 +38,14 @@ let
|
||||||
''run_genode_until {child "init" exited with exit value 0} 120'';
|
''run_genode_until {child "init" exited with exit value 0} 120'';
|
||||||
|
|
||||||
mkTest = { name ? "unamed", testScript ? defaultScript, testConfig
|
mkTest = { name ? "unamed", testScript ? defaultScript, testConfig
|
||||||
, testInputs ? [ ], testEnv ? { }, qemuArgs ? [ ], ... }@t:
|
, testInputs ? [ ], testEnv ? { }, extraPaths ? [ ], qemuArgs ? [ ], ...
|
||||||
|
}@t:
|
||||||
let
|
let
|
||||||
storeTarball = buildPackages.runCommand "store" { } ''
|
storeTarball = buildPackages.runCommand "store" { } ''
|
||||||
mkdir -p $out
|
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);
|
storeManifest = lib.mergeManifests (map addManifest testInputs);
|
||||||
manifest = lib.mergeManifests (map addManifest
|
manifest = lib.mergeManifests (map addManifest
|
||||||
|
|
|
@ -38,11 +38,14 @@ let
|
||||||
''run_genode_until {child "init" exited with exit value 0} 120'';
|
''run_genode_until {child "init" exited with exit value 0} 120'';
|
||||||
|
|
||||||
mkTest = { name ? "unamed", testScript ? defaultScript, testConfig
|
mkTest = { name ? "unamed", testScript ? defaultScript, testConfig
|
||||||
, testInputs ? [ ], testEnv ? { }, qemuArgs ? [ ], ... }@t:
|
, testInputs ? [ ], testEnv ? { }, extraPaths ? [ ], qemuArgs ? [ ], ...
|
||||||
|
}@t:
|
||||||
let
|
let
|
||||||
storeTarball = buildPackages.runCommand "store" { } ''
|
storeTarball = buildPackages.runCommand "store" { } ''
|
||||||
mkdir -p $out
|
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);
|
storeManifest = lib.mergeManifests (map addManifest testInputs);
|
||||||
manifest = lib.mergeManifests (map addManifest
|
manifest = lib.mergeManifests (map addManifest
|
||||||
|
|
|
@ -29,7 +29,10 @@ let Manifest/toRoutes =
|
||||||
}
|
}
|
||||||
, route =
|
, route =
|
||||||
Init.Route.Type.Child
|
Init.Route.Type.Child
|
||||||
{ name = "store_rom", label = Some entry.mapValue }
|
{ name = "store_rom"
|
||||||
|
, label = Some entry.mapValue
|
||||||
|
, diag = None Bool
|
||||||
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
( Prelude.List.concat
|
( Prelude.List.concat
|
||||||
|
@ -37,6 +40,18 @@ let Manifest/toRoutes =
|
||||||
(Prelude.Map.values Text (Prelude.Map.Type Text Text) manifest)
|
(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
|
let wrapHarness
|
||||||
: Children → Manifest/Type → Child.Type
|
: Children → Manifest/Type → Child.Type
|
||||||
= λ(children : Children)
|
= λ(children : Children)
|
||||||
|
@ -58,6 +73,17 @@ let wrapHarness
|
||||||
, Init.ServiceRoute.parent "VM"
|
, Init.ServiceRoute.parent "VM"
|
||||||
, Init.ServiceRoute.child "Timer" "timer"
|
, Init.ServiceRoute.child "Timer" "timer"
|
||||||
, Init.ServiceRoute.child "Rtc" "rtc"
|
, 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
|
# Manifest/toRoutes manifest
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue