genode/repos/libports/run/expat.run
Norman Feske 03d7208386 Turn posix lib into shared library
By building the posix library as shared object with an ABI, we
effectively decouple posix-using programs from the library
implementation (which happens to depend on several os-level APIs such as
the VFS).
2017-05-31 13:16:02 +02:00

83 lines
1.5 KiB
Tcl

#
# \brief Test for using the expat library
# \author Christian Prochaska
# \date 2012-06-12
#
#
# Build
#
build { core init drivers/timer test/expat }
create_boot_directory
#
# Generate config
#
install_config {
<config>
<parent-provides>
<service name="ROM"/>
<service name="RAM"/>
<service name="PD"/>
<service name="RM"/>
<service name="CPU"/>
<service name="LOG"/>
<service name="IO_PORT"/>
<service name="IRQ"/>
</parent-provides>
<default-route>
<any-service> <parent/> <any-child/> </any-service>
</default-route>
<start name="timer">
<resource name="RAM" quantum="1M"/>
<provides> <service name="Timer"/> </provides>
</start>
<start name="test-expat">
<resource name="RAM" quantum="2M"/>
<config>
<vfs>
<inline name="config"><config>
<test_tag test_attribute="test_value" />
</config>
</inline>
<dir name="dev"> <log/> </dir>
</vfs>
<libc stdout="/dev/log"/>
</config>
</start>
</config>
}
#
# Boot modules
#
build_boot_image {
core init timer
ld.lib.so libc.lib.so expat.lib.so posix.lib.so
test-expat
}
#
# Execute test case
#
append qemu_args " -nographic -m 64"
run_genode_until {.*child "test-expat" exited with exit value 0.*} 5
grep_output {\[init -> test-expat\] }
compare_output_to {
[init -> test-expat] start of element: config
[init -> test-expat] start of element: test_tag
[init -> test-expat] attribute: name='test_attribute', value='test_value'
[init -> test-expat] end of element: test_tag
[init -> test-expat] end of element: config
}
# vi: set ft=tcl :