File tree Expand file tree Collapse file tree 4 files changed +15
-58
lines changed
tests/DS/sds_detect_version Expand file tree Collapse file tree 4 files changed +15
-58
lines changed Original file line number Diff line number Diff line change @@ -9,5 +9,4 @@ TESTS_ENVIRONMENT= \
9
9
TESTS = test_detect_version.sh
10
10
11
11
EXTRA_DIST = test_detect_version.sh \
12
- scap-1.2-ds.xml \
13
- scap-1.3-ds.xml
12
+ scap-ds.xml
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" ?>
2
- <ns0 : data-stream-collection xmlns : dc =" http://purl.org/dc/elements/1.1/" xmlns : html =" http://www.w3.org/1999/xhtml" xmlns : ns0 =" http://scap.nist.gov/schema/scap/source/1.2" xmlns : ns1 =" http://www.w3.org/1999/xlink" xmlns : ns10 =" http://checklists.nist.gov/xccdf/1.2" xmlns : ns13 =" http://cpe.mitre.org/dictionary/2.0" xmlns : ns2 =" urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns : ns3 =" http://scap.nist.gov/schema/ocil/2.0" xmlns : ns4 =" http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns : ns6 =" http://oval.mitre.org/XMLSchema/oval-common-5" xmlns : ns7 =" http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" xmlns : ns8 =" http://oval.mitre.org/XMLSchema/oval-definitions-5#unix" xmlns : ns9 =" http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" id =" scap_org.open-scap_collection_from_xccdf_ssg-rhel8-xccdf-1.2.xml" schematron-version =" 1.3 " >
3
- <ns0 : data-stream id =" scap_org.open-scap_datastream_from_xccdf_ssg-rhel8-xccdf-1.2.xml" scap-version =" 1.3 " use-case =" OTHER" >
2
+ <ns0 : data-stream-collection xmlns : dc =" http://purl.org/dc/elements/1.1/" xmlns : html =" http://www.w3.org/1999/xhtml" xmlns : ns0 =" http://scap.nist.gov/schema/scap/source/1.2" xmlns : ns1 =" http://www.w3.org/1999/xlink" xmlns : ns10 =" http://checklists.nist.gov/xccdf/1.2" xmlns : ns13 =" http://cpe.mitre.org/dictionary/2.0" xmlns : ns2 =" urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns : ns3 =" http://scap.nist.gov/schema/ocil/2.0" xmlns : ns4 =" http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns : ns6 =" http://oval.mitre.org/XMLSchema/oval-common-5" xmlns : ns7 =" http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" xmlns : ns8 =" http://oval.mitre.org/XMLSchema/oval-definitions-5#unix" xmlns : ns9 =" http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" id =" scap_org.open-scap_collection_from_xccdf_ssg-rhel8-xccdf-1.2.xml" schematron-version =" X.X " >
3
+ <ns0 : data-stream id =" scap_org.open-scap_datastream_from_xccdf_ssg-rhel8-xccdf-1.2.xml" scap-version =" X.X " use-case =" OTHER" >
4
4
<ns0 : checks >
5
5
<ns0 : component-ref id =" scap_org.open-scap_cref_ssg-rhel8-oval.xml" ns1 : href =" #scap_org.open-scap_comp_ssg-rhel8-oval.xml" />
6
6
</ns0 : checks >
Original file line number Diff line number Diff line change @@ -16,12 +16,21 @@ function test_oscap_info {
16
16
version=" $1 "
17
17
stdout=" $( mktemp) "
18
18
stderr=" $( mktemp) "
19
- $OSCAP info $srcdir /scap-$version -ds.xml > $stdout 2> $stderr
19
+ ds=" $( mktemp) "
20
+ cp scap-ds.xml $ds
21
+ sed -i " s/X.X/${version} /g" $ds
22
+
23
+ $OSCAP info $ds > $stdout 2> $stderr
20
24
[ ! -s $stderr ]
21
25
grep -q " Version: $version " $stdout
22
26
rm $stdout
23
27
rm $stderr
28
+ rm $ds
24
29
}
25
30
26
- test_oscap_info " 1.2"
27
- test_oscap_info " 1.3"
31
+ SDS=$( find $builddir /schemas/sds -maxdepth 1 -mindepth 1 -type d -printf ' %f\n' )
32
+
33
+ for sds_version in $SDS
34
+ do
35
+ test_oscap_info $sds_version
36
+ done
You can’t perform that action at this time.
0 commit comments