Add cram test

The test uses osolo5-elftool on the test_hello application from the
solo5 tests to query their abi and manifest. The manifest is empty and
boring.
This commit is contained in:
Reynir Björnsson 2025-01-31 17:45:34 +01:00
parent 8feb54d5f8
commit e98cc6d669
8 changed files with 28 additions and 0 deletions

View file

@ -1,2 +1,3 @@
(lang dune 2.9) (lang dune 2.9)
(name solo5-elftool) (name solo5-elftool)
(cram enable)

7
test/dune Normal file
View file

@ -0,0 +1,7 @@
(cram
(deps
test_hello.hvt
test_hello.muen
test_hello.spt
test_hello.virtio
test_hello.xen))

20
test/osolo5-elftool.t Normal file
View file

@ -0,0 +1,20 @@
Execute osolo5-elftool on hvt binary
$ osolo5-elftool query-abi test_hello.hvt
{ "type": "solo5.abi", "target": "hvt", "version": 2
}
$ osolo5-elftool query-manifest test_hello.hvt
{ "type": "solo5.manifest", "version": 1, "devices": [ ]
}
$ osolo5-elftool query-abi test_hello.muen
{ "type": "solo5.abi", "target": "muen", "version": 3
}
$ osolo5-elftool query-abi test_hello.spt
{ "type": "solo5.abi", "target": "spt", "version": 2
}
$ osolo5-elftool query-abi test_hello.virtio
{ "type": "solo5.abi", "target": "virtio", "version": 1
}
$ osolo5-elftool query-abi test_hello.xen
{ "type": "solo5.abi", "target": "xen", "version": 1
}

BIN
test/test_hello.hvt Executable file

Binary file not shown.

BIN
test/test_hello.muen Executable file

Binary file not shown.

BIN
test/test_hello.spt Executable file

Binary file not shown.

BIN
test/test_hello.virtio Executable file

Binary file not shown.

BIN
test/test_hello.xen Executable file

Binary file not shown.