Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lobster cpptest requirement input files using trlc #150

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

TannazVhdBMWExt
Copy link
Contributor

No description provided.

@TannazVhdBMWExt TannazVhdBMWExt requested a review from a team as a code owner December 10, 2024 12:08
@TannazVhdBMWExt TannazVhdBMWExt force-pushed the lobster-cpptest-requirement-inputFiles-using-TRLC branch 3 times, most recently from d447366 to ee8b98d Compare December 11, 2024 10:03
''' String
}

type Tool_Requirement {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need the following types:

  • System_Requirement
  • System_Requirement_Else
  • Software_Requirement

Apart from that, feel free to introduce new types like

  • Tool_Definition
  • Tool_Config_Parameter

lobster/tools/requirements.rsl Show resolved Hide resolved
@TannazVhdBMWExt TannazVhdBMWExt force-pushed the lobster-cpptest-requirement-inputFiles-using-TRLC branch from 6ce6620 to 41f1b71 Compare December 11, 2024 15:03
@TannazVhdBMWExt TannazVhdBMWExt force-pushed the lobster-cpptest-requirement-inputFiles-using-TRLC branch 4 times, most recently from 80cbbb5 to 0670acd Compare December 11, 2024 15:35
Detailed requirements for three main scenarios have been added.
The related system-tests have been aded.
@TannazVhdBMWExt TannazVhdBMWExt force-pushed the lobster-cpptest-requirement-inputFiles-using-TRLC branch from 3428e9f to c1ba65f Compare December 11, 2024 15:57
@phiwuu phiwuu added the internal Affects the CI, tests or refactorings only, not relevant to the end-user label Dec 12, 2024
req.Tool_Definition Source_Input_Files {
title = '''Source input files given'''
description = '''
Valid existing source input files in the case of [[Source_Inputs_Valid]]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A question here:

  • Source_Inputs_Valid is given if all input files and directories exist.
  • Source_Input_Files is given if all input files and directories exist and the files are C++ files. Is this the intention here?

If not, then what is the difference between these two definitions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Source_Inputs_Valid is a boolean definition that indicates "is the given input valid?". Thats why we used it in if statement

Source_Input_Files is the file/s themselves if the given input is valid. We used it in the description of our requirement.

@@ -0,0 +1,587 @@
Written 5 lobster items to "cpptest.lobster".
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does lobster-cpptest really print the output to stdout, too? The config file of this test case specifies an output file.

Copy link
Contributor Author

@TannazVhdBMWExt TannazVhdBMWExt Dec 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. If the config file does not cover all the markers provided in cpp files, the lobster-cpptest tool prints the rest of the markers without references to stdout.

Relevant link

* Note: If you want to extract the other tests with other `markers`,

"tag": "cpp test_case.cpp:TestMacrosTest:3",
"location": {
"kind": "file",
"file": "..\\..\\..\\data\\test_case.cpp",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use Unix-style forward slashes / instead of Windows-style \\
That is the reason why the test suites are failing (I guess).
Note: The system test framework translates \\ to /, to support running tests on Windows.

"tag": "cpp test_case.cpp:RequirementTagTest:64",
"location": {
"kind": "file",
"file": "C:\\bmw-software-engineering\\vispiron\\lobster\\tests-system\\lobster-cpptest\\data\\test_case.cpp",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolute paths won't work when running in the CI.

@phiwuu
Copy link
Member

phiwuu commented Dec 13, 2024

Please have a look at #157. That PR introduces a possibility to run system tests where the generated *.lobster file contains absolute paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Affects the CI, tests or refactorings only, not relevant to the end-user
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants