create_boot_directory

import_from_depot \
	genodelabs/src/[base_src] \
	genodelabs/src/init \
	genodelabs/src/log_tee \

build "test/log"

install_config {
	<config>
		<default caps="128"/>
		<parent-provides>
			<service name="CPU"/>
			<service name="LOG"/>
			<service name="PD"/>
			<service name="RM"/>
			<service name="ROM"/>
		</parent-provides>
		<default-route>
			<any-service> <parent/> </any-service>
		</default-route>

		<start name="log_tee">
			<resource name="RAM" quantum="2M"/>
			<provides> <service name="LOG"/> </provides>
		</start>

		<start name="test-log">
			<resource name="RAM" quantum="2M"/>
			<route>
				<any-service> <child name="log_tee"/> <parent/> </any-service>
			</route>
		</start>
	</config>
}

build_boot_image "test-log"

append qemu_args "-nographic "

run_genode_until {\[test-log\] Test done.} 10
