-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
four different coverage tests have been added
- Loading branch information
1 parent
95db70b
commit fc04145
Showing
40 changed files
with
829 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.lobster | ||
*.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
LOBSTER_ROOT:=../../.. | ||
|
||
PATH:=$(LOBSTER_ROOT)/test_install/bin:$(PATH) | ||
PYTHONPATH:=$(wildcard $(LOBSTER_ROOT)/test_install/lib/python*/site-packages) | ||
|
||
THIS_TEST:=$(shell realpath --relative-to $(LOBSTER_ROOT) $(PWD)) | ||
THIS_TEST_ESCAPED:=$(subst /,\\/,$(THIS_TEST)) | ||
|
||
html_report.html: softreq.lobster sysreq.lobster lobster.conf trlc-softreq.conf trlc-sysreq.conf | ||
@lobster-report | ||
@lobster-online-report | ||
@cp report.lobster report.reference_output | ||
@lobster-html-report | ||
|
||
softreq.lobster: example.rsl softreq_example.trlc sysreq_example.trlc | ||
@lobster-trlc example.rsl softreq_example.trlc sysreq_example.trlc\ | ||
--out="softreq.lobster" --config-file="trlc-softreq.conf" | ||
|
||
sysreq.lobster: example.rsl softreq_example.trlc sysreq_example.trlc | ||
@lobster-trlc example.rsl softreq_example.trlc sysreq_example.trlc\ | ||
--out="sysreq.lobster" --config-file="trlc-sysreq.conf" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package coverage_example | ||
|
||
type System_Requirement | ||
{ | ||
text String | ||
} | ||
|
||
type Software_Requirement | ||
{ | ||
text String | ||
derived_from optional System_Requirement [1 .. *] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
requirements "System Requirements" { | ||
source: "sysreq.lobster"; | ||
} | ||
|
||
requirements "Software Requirements" | ||
{ | ||
source: "softreq.lobster"; | ||
trace to: "System Requirements"; | ||
} |
127 changes: 127 additions & 0 deletions
127
tests-integration/projects/coverage-half/report.reference_output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
{ | ||
"schema": "lobster-report", | ||
"version": 2, | ||
"generator": "lobster_report", | ||
"levels": [ | ||
{ | ||
"name": "System Requirements", | ||
"kind": "requirements", | ||
"items": [ | ||
{ | ||
"tag": "req sysreq_coverage_example.requirement_1a", | ||
"location": { | ||
"kind": "file", | ||
"file": ".\\sysreq_example.trlc", | ||
"line": 4, | ||
"column": 37 | ||
}, | ||
"name": "sysreq_coverage_example.requirement_1a", | ||
"messages": [], | ||
"just_up": [], | ||
"just_down": [], | ||
"just_global": [], | ||
"ref_up": [], | ||
"ref_down": [ | ||
"req softreq_coverage_example.requirement_2a" | ||
], | ||
"tracing_status": "OK", | ||
"framework": "TRLC", | ||
"kind": "System_Requirement", | ||
"text": "Requirement 1a", | ||
"status": null | ||
} | ||
], | ||
"coverage": 100.0 | ||
}, | ||
{ | ||
"name": "Software Requirements", | ||
"kind": "requirements", | ||
"items": [ | ||
{ | ||
"tag": "req softreq_coverage_example.requirement_2a", | ||
"location": { | ||
"kind": "file", | ||
"file": ".\\softreq_example.trlc", | ||
"line": 5, | ||
"column": 39 | ||
}, | ||
"name": "softreq_coverage_example.requirement_2a", | ||
"messages": [], | ||
"just_up": [], | ||
"just_down": [], | ||
"just_global": [], | ||
"ref_up": [ | ||
"req sysreq_coverage_example.requirement_1a" | ||
], | ||
"ref_down": [], | ||
"tracing_status": "OK", | ||
"framework": "TRLC", | ||
"kind": "Software_Requirement", | ||
"text": "Requirement2a", | ||
"status": null | ||
}, | ||
{ | ||
"tag": "req softreq_coverage_example.requirement_2b", | ||
"location": { | ||
"kind": "file", | ||
"file": ".\\softreq_example.trlc", | ||
"line": 11, | ||
"column": 39 | ||
}, | ||
"name": "softreq_coverage_example.requirement_2b", | ||
"messages": [ | ||
"missing up reference" | ||
], | ||
"just_up": [], | ||
"just_down": [], | ||
"just_global": [], | ||
"tracing_status": "MISSING", | ||
"framework": "TRLC", | ||
"kind": "Software_Requirement", | ||
"text": "Requirement2b", | ||
"status": null | ||
} | ||
], | ||
"coverage": 50.0 | ||
} | ||
], | ||
"policy": { | ||
"System Requirements": { | ||
"name": "System Requirements", | ||
"kind": "requirements", | ||
"traces": [], | ||
"source": [ | ||
{ | ||
"file": "sysreq.lobster", | ||
"filters": [], | ||
"valid_status": [] | ||
} | ||
], | ||
"needs_tracing_up": false, | ||
"needs_tracing_down": true, | ||
"breakdown_requirements": [ | ||
[ | ||
"Software Requirements" | ||
] | ||
] | ||
}, | ||
"Software Requirements": { | ||
"name": "Software Requirements", | ||
"kind": "requirements", | ||
"traces": [ | ||
"System Requirements" | ||
], | ||
"source": [ | ||
{ | ||
"file": "softreq.lobster", | ||
"filters": [], | ||
"valid_status": [] | ||
} | ||
], | ||
"needs_tracing_up": true, | ||
"needs_tracing_down": false, | ||
"breakdown_requirements": [] | ||
} | ||
}, | ||
"matrix": [] | ||
} |
14 changes: 14 additions & 0 deletions
14
tests-integration/projects/coverage-half/softreq_example.trlc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package softreq_coverage_example | ||
import coverage_example | ||
import sysreq_coverage_example | ||
|
||
coverage_example.Software_Requirement requirement_2a | ||
{ | ||
text = '''Requirement 2a''' | ||
derived_from = [sysreq_coverage_example.requirement_1a] | ||
} | ||
|
||
coverage_example.Software_Requirement requirement_2b | ||
{ | ||
text = '''Requirement 2b''' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package sysreq_coverage_example | ||
import coverage_example | ||
|
||
coverage_example.System_Requirement requirement_1a | ||
{ | ||
text = '''Requirement 1a''' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
coverage_example.Software_Requirement { | ||
description = text | ||
tags "req" = derived_from | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
coverage_example.System_Requirement { | ||
description = text | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.lobster | ||
*.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
LOBSTER_ROOT:=../../.. | ||
|
||
PATH:=$(LOBSTER_ROOT)/test_install/bin:$(PATH) | ||
PYTHONPATH:=$(wildcard $(LOBSTER_ROOT)/test_install/lib/python*/site-packages) | ||
|
||
THIS_TEST:=$(shell realpath --relative-to $(LOBSTER_ROOT) $(PWD)) | ||
THIS_TEST_ESCAPED:=$(subst /,\\/,$(THIS_TEST)) | ||
|
||
html_report.html: softreq.lobster sysreq.lobster testreq.lobster lobster.conf trlc-softreq.conf trlc-sysreq.conf trlc-testreq.conf | ||
@lobster-report | ||
@lobster-online-report | ||
@cp report.lobster report.reference_output | ||
@lobster-html-report | ||
|
||
softreq.lobster: example.rsl softreq_example.trlc sysreq_example.trlc testreq_example.trlc | ||
@lobster-trlc example.rsl softreq_example.trlc sysreq_example.trlc testreq_example.trlc\ | ||
--out="softreq.lobster" --config-file="trlc-softreq.conf" | ||
|
||
sysreq.lobster: example.rsl softreq_example.trlc sysreq_example.trlc testreq_example.trlc | ||
@lobster-trlc example.rsl softreq_example.trlc sysreq_example.trlc testreq_example.trlc\ | ||
--out="sysreq.lobster" --config-file="trlc-sysreq.conf" | ||
|
||
testreq.lobster: example.rsl softreq_example.trlc sysreq_example.trlc testreq_example.trlc | ||
@lobster-trlc example.rsl softreq_example.trlc sysreq_example.trlc testreq_example.trlc\ | ||
--out="testreq.lobster" --config-file="trlc-testreq.conf" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package coverage_half_example | ||
|
||
type System_Requirement | ||
{ | ||
text String | ||
} | ||
|
||
type Software_Requirement | ||
{ | ||
text String | ||
derived_from optional System_Requirement [1 .. *] | ||
} | ||
|
||
type Test_Requirement | ||
{ | ||
text String | ||
derived_from optional Software_Requirement [1 .. *] | ||
just_up optional String | ||
just_down optional String | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
requirements "Software Requirements" | ||
{ | ||
source: "softreq.lobster"; | ||
requires: "Test Requirements"; | ||
} | ||
|
||
requirements "System Requirements" { | ||
source: "sysreq.lobster"; | ||
trace to: "Software Requirements"; | ||
} | ||
|
||
requirements "Test Requirements" | ||
{ | ||
source: "testreq.lobster"; | ||
trace to: "Software Requirements"; | ||
} |
Oops, something went wrong.