2011-12-22 15:19:25 +00:00
|
|
|
#
|
|
|
|
# \brief Test for running python
|
|
|
|
# \author Norman Feske
|
|
|
|
# \date 2011-11-22
|
|
|
|
#
|
|
|
|
|
|
|
|
if {![have_spec x86]} {
|
|
|
|
puts "Run script is only supported on x86"; exit 0 }
|
|
|
|
|
|
|
|
#
|
|
|
|
# Build
|
|
|
|
#
|
|
|
|
|
|
|
|
build {
|
|
|
|
core init
|
|
|
|
test/python
|
|
|
|
}
|
|
|
|
|
|
|
|
create_boot_directory
|
|
|
|
|
|
|
|
#
|
|
|
|
# Generate config
|
|
|
|
#
|
|
|
|
|
|
|
|
set config {
|
|
|
|
<config verbose="yes">
|
|
|
|
<parent-provides>
|
|
|
|
<service name="ROM"/>
|
|
|
|
<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>
|
2017-05-07 20:36:11 +00:00
|
|
|
<default caps="100"/>
|
2011-12-22 15:19:25 +00:00
|
|
|
<start name="test-python">
|
2012-05-29 12:55:22 +00:00
|
|
|
<resource name="RAM" quantum="3M"/>
|
2011-12-22 15:19:25 +00:00
|
|
|
<config>
|
2017-03-20 11:04:55 +00:00
|
|
|
<vfs>
|
|
|
|
<dir name="dev"> <log/> </dir>
|
|
|
|
<inline name="hello.py">
|
2014-04-14 09:57:22 +00:00
|
|
|
print " \r\n\r";
|
|
|
|
print " -============================-";
|
|
|
|
print " || ||";
|
|
|
|
print " || Python Core 2.6.4 ||";
|
|
|
|
print " || ||";
|
|
|
|
print " || Genode 11.11 ||";
|
|
|
|
print " || ||";
|
|
|
|
print " -============================-";
|
|
|
|
print " \r";
|
2014-07-02 07:00:57 +00:00
|
|
|
print " 2011 by Genode Labs www.genode-labs.com";
|
2014-04-14 09:57:22 +00:00
|
|
|
print " \r\n\r";
|
2017-03-20 11:04:55 +00:00
|
|
|
</inline>
|
|
|
|
</vfs>
|
|
|
|
<libc stdout="/dev/log" stderr="/dev/log"/>
|
2017-05-29 12:52:24 +00:00
|
|
|
<arg value="hello.py"/>
|
2011-12-22 15:19:25 +00:00
|
|
|
</config>
|
|
|
|
</start>
|
|
|
|
</config>
|
|
|
|
}
|
|
|
|
|
|
|
|
install_config $config
|
|
|
|
|
|
|
|
#
|
|
|
|
# Boot modules
|
|
|
|
#
|
|
|
|
|
|
|
|
# generic modules
|
|
|
|
set boot_modules {
|
|
|
|
core init
|
2017-05-14 19:55:57 +00:00
|
|
|
ld.lib.so libc.lib.so libm.lib.so python.lib.so posix.lib.so
|
2011-12-22 15:19:25 +00:00
|
|
|
test-python
|
|
|
|
}
|
|
|
|
|
|
|
|
build_boot_image $boot_modules
|
|
|
|
|
|
|
|
#
|
|
|
|
# Execute test case
|
|
|
|
#
|
|
|
|
|
2017-05-23 13:05:55 +00:00
|
|
|
append qemu_args " -nographic "
|
2011-12-22 15:19:25 +00:00
|
|
|
|
2014-08-22 12:43:54 +00:00
|
|
|
run_genode_until {.*child "test-python" exited with exit value 0.*} 60
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
grep_output {test-python\] }
|
|
|
|
compare_output_to {
|
|
|
|
[init -> test-python]
|
|
|
|
[init -> test-python] -============================-
|
|
|
|
[init -> test-python] || ||
|
|
|
|
[init -> test-python] || Python Core 2.6.4 ||
|
|
|
|
[init -> test-python] || ||
|
|
|
|
[init -> test-python] || Genode 11.11 ||
|
|
|
|
[init -> test-python] || ||
|
|
|
|
[init -> test-python] -============================-
|
|
|
|
[init -> test-python]
|
2014-07-02 07:00:57 +00:00
|
|
|
[init -> test-python] 2011 by Genode Labs www.genode-labs.com
|
2011-12-22 15:19:25 +00:00
|
|
|
[init -> test-python]
|
|
|
|
}
|
|
|
|
|
|
|
|
# vi: set ft=tcl :
|