You've already forked OpenUxAS-SoI
mirror of
https://github.com/AdaCore/OpenUxAS-SoI.git
synced 2026-02-12 13:04:49 -08:00
This is a necessary first step to supporting the offline build pattern. As of this commit, though, that way of building is not supported.
Test Organization
The organization and purpose of sub-directories in OpenUxAS/tests/Test_Services follows:
- Each directory is a collection of test sets with each represented by a single
.cppfile. - Each
.cppfile contains a set of test cases; all test cases are share a single build, run-time and environment tear-down. - Each test case defined within a
.cppfile consists of 1-many tests - Each test build is managed by an associated
meson.buildfile
How To Add a Functional Test To Uxas
-
Create a directory for the test:
mkdir uxas/code/tests/Test_Services/SampleTest_Test01
-
Add a UxAS configuration file and inputs files to the new test directory
-
Make a copy of the functional test template source code:
cp OpenUxAS/tests/Test_Services/GTestFunctionalTestTemplate.cpp OpenUxAS/tests/Test_Services/SampleTest_Test01/SampleTest_Test01.cpp
-
Edit the new functional test source code to modify, at minimum, the following:
testPath: Test are run from theOpenUxas/builddirectory, so add the relative path from there to the new testuxasConfigurationFile: add the relative path, including file name to UxAS configuration file(ASSERT_TRUE): add/edit the google test statements necessary to test the results
-
Add the new functional test to
meson.build- Add the line
subdir('SampleTest_Test01')toOpenUxAS/tests/Test_Services/meson.build
- Add the line
-
Make a copy of the
meson.buildtemplate for compiling the testcp OpenUxAS/tests/Test_Services/mesontestbuild.template OpenUxAS/tests/Test_Services/SampleTest_Test01/meson.build- Change all instances of
SampleTest_Test01to the new test name