These tests were copied from https://github.com/alanxz/rabbitmq-c/tree/master/tests and converted to gtests.
TestEntity
—TestsEntropyEntity
—Random number generatorDNetSrv
—Driver for working with network cardsVfsSdCardFs
—Program that supports the SD Card file systemVfsNet
—Program that is used for working with the networkDhcpcd
—DHCP client implementation program that gets network interface parameters from an external DHCP server in the background and passes them to the virtual file systemSDCard
—SD Card driverBSP
—Driver for configuring pin multiplexing parameters (pinmux)Bcm2711MboxArmToVc
—Mailbox driver for Raspberry Pi 4 B
Statically created IPC channels
amqp.TestEntity
→kl.VfsSdCardFs
amqp.Consumer
→kl.VfsNet
kl.VfsNet
→kl.EntropyEntity
kl.VfsNet
→kl.drivers.DNetSrv
kl.rump.Dhcpcd
→kl.VfsSdCardFs
kl.rump.Dhcpcd
→kl.VfsNet
kl.VfsSdCardFs
→kl.drivers.SDCard
kl.VfsSdCardFs
→kl.EntropyEntity
kl.drivers.DNetSrv
→kl.drivers.Bcm2711MboxArmToVc
kl.drivers.SDCard
→kl.drivers.BSP
The ./einit/src/init.yaml.in
template is used to automatically generate
part of the solution initialization description file init.yaml
. For more information about the
init.yaml.in
template file, see the
KasperskyOS Community Edition Online Help.
The ./einit/src/security.psl.in
template is used to automatically
generate part of the security.psl
file using CMake tools. The security.psl
file contains part of
a solution security policy description. For more information about the security.psl
file, see
Describing a security policy for a KasperskyOS-based solution.
The tests for KasperskyOS are built using the CMake build system, which is provided in the KasperskyOS Community Edition SDK.
The SDK_PREFIX
environment variables affects the build of the tests. It specifies the path to
the installed version of the KasperskyOS Community Edition SDK.
Run the following command ./cross-build.sh <TARGET> [SDK_PATH]
, where:
TARGET
can take one of the following values:qemu
for QEMU orrpi
for Raspberry Pi 4 B.SDK_PATH
specifies the path to the installed version of the KasperskyOS Community Edition SDK. If not specified, the path defined in theSDK_PREFIX
environment variable is used. The value specified in theSDK_PATH
option takes precedence over the value of theSDK_PREFIX
environment variable.
Running cross-build.sh
creates a KasperskyOS-based solution image that includes the tests.
The kos-qemu-image
solution image is located in the ./build/einit
directory.
The cross-build.sh
script both builds the tests on QEMU and runs them.
Running cross-build.sh
creates a KasperskyOS-based solution image that includes the tests and
a bootable SD card image for Raspberry Pi 4 B. The kos-image
solution image is located in the
./build/einit
directory. The rpi4kos.img
bootable SD card image is located in the ./build
directory.
-
To copy the bootable SD card image to the SD card, connect the SD card to the computer and run the following command:
$ sudo dd bs=64k if=build/rpi4kos.img of=/dev/sd[X] conv=fsync
,where
[X]
is the final character in the name of the SD card block device. -
Connect the bootable SD card to the Raspberry Pi 4 B.
-
Supply power to the Raspberry Pi 4 B and wait for the tests to run.
You can also use an alternative option to prepare and run the tests:
- Prepare Raspberry Pi 4 B and a bootable SD card to run the tests by following the instructions in the KasperskyOS Community Edition Online Help.
- Run the tests by following the instructions in the KasperskyOS Community Edition Online Help
./consumer/CMakeLists.txt—CMake commands for building the TestEntity
program.
./einit/CMakeLists.txt—CMake commands for building the Einit
program and
the solution image.
./CMakeLists.txt—CMake commands for building the solution.
Once testing is complete, the results are displayed:
[==========] Running 5 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 5 tests from LibRabbitMQTest
[ RUN ] LibRabbitMQTest.ParseUrl
[ OK ] LibRabbitMQTest.ParseUrl (4 ms)
[ RUN ] LibRabbitMQTest.Tables
[ OK ] LibRabbitMQTest.Tables (8 ms)
[ RUN ] LibRabbitMQTest.StatusEnum
[ OK ] LibRabbitMQTest.StatusEnum (1 ms)
[ RUN ] LibRabbitMQTest.SaslMechanism
[ OK ] LibRabbitMQTest.SaslMechanism (0 ms)
[ RUN ] LibRabbitMQTest.MergeCapabilities
[ OK ] LibRabbitMQTest.MergeCapabilities (2 ms)
[----------] 5 tests from LibRabbitMQTest (48 ms total)
[----------] Global test environment tear-down
[==========] 5 tests from 1 test suite ran. (69 ms total)
[ PASSED ] 5 tests.
© 2024 AO Kaspersky Lab