mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 05:37:54 +00:00
3ebb715c5c
...except for the run scripts related to Qt and the NIC router. Issue #4860
83 lines
1.7 KiB
Tcl
83 lines
1.7 KiB
Tcl
if {[expr ![have_include "power_on/qemu"] && ![have_spec linux]]} {
|
|
puts "Test only supports Qemu or Linux.\n";
|
|
exit 0
|
|
}
|
|
|
|
create_boot_directory
|
|
|
|
build {
|
|
core init timer lib/ld lib/libc lib/posix lib/vfs_import
|
|
server/vfs_block
|
|
test/libc_block
|
|
}
|
|
|
|
install_config {
|
|
<config verbose="yes">
|
|
<parent-provides>
|
|
<service name="ROM"/>
|
|
<service name="IRQ"/>
|
|
<service name="IO_MEM"/>
|
|
<service name="IO_PORT"/>
|
|
<service name="PD"/>
|
|
<service name="RM"/>
|
|
<service name="CPU"/>
|
|
<service name="LOG"/>
|
|
</parent-provides>
|
|
<default-route>
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
</default-route>
|
|
<default caps="200"/>
|
|
<start name="timer">
|
|
<resource name="RAM" quantum="1M"/>
|
|
<provides> <service name="Timer"/> </provides>
|
|
</start>
|
|
<start name="test-libc_block">
|
|
<resource name="RAM" quantum="2M"/>
|
|
<config>
|
|
<libc stdout="/dev/log"/>
|
|
<vfs>
|
|
<dir name="dev">
|
|
<log/>
|
|
<block name="blkdev"/>
|
|
</dir>
|
|
</vfs>
|
|
</config>
|
|
</start>
|
|
<start name="vfs_block">
|
|
<resource name="RAM" quantum="68M"/>
|
|
<provides><service name="Block"/></provides>
|
|
<config>
|
|
<vfs>
|
|
<ram/>
|
|
<import>
|
|
<zero name="test.hda" size="64M"/>
|
|
</import>
|
|
</vfs>
|
|
<default-policy file="/test.hda" block_size="512"
|
|
writeable="yes"/>
|
|
</config>
|
|
</start>
|
|
</config>
|
|
}
|
|
|
|
#
|
|
# Boot modules
|
|
#
|
|
|
|
set disk_image "bin/test.hda"
|
|
set cmd "dd if=/dev/zero of=$disk_image bs=1024 count=65536"
|
|
puts "creating disk image: $cmd"
|
|
catch { exec sh -c $cmd }
|
|
|
|
build_boot_image [list {*}[build_artifacts] test.hda]
|
|
|
|
append qemu_args " -nographic "
|
|
|
|
run_genode_until {.*child "test-libc_block" exited with exit value 0.*} 60
|
|
|
|
exec rm -f $disk_image
|
|
|
|
puts "\nTest succeeded\n"
|
|
|
|
# vi: set ft=tcl :
|