Skip to content

Commit a1fd469

Browse files
committed
CI/CD-friendly URIs to new location
- 2nd argument of resolve-uri makes the path relative to the original XSpec file instead of the compiled one, whose location can vary depending on how the test is run - Remove one ../ from URI to resolve (similar to usnistgov#1945) because of directory reorg
1 parent 009e981 commit a1fd469

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/utils/resolver-pipeline/testing/1_selected/select-mapping-controls.xspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
https://github.com/usnistgov/OSCAL/discussions/1114
2424
When this is determined, tests can be added for those sections. -->
2525

26-
<!-- Location of sample files, relative to compiled test in xspec/ subdirectory -->
27-
<x:variable name="ov:filedir" as="xs:string" select="resolve-uri('../../../../../../specifications/profile-resolution/profile-resolution-examples')"/>
26+
<!-- Location of sample files, relative to this test file -->
27+
<x:variable name="ov:filedir" as="xs:string" select="resolve-uri('../../../../specifications/profile-resolution/profile-resolution-examples',$x:xspec-uri)"/>
2828

2929
<x:scenario label="Import controls using ID mapping">
3030
<x:scenario label="Basic case" pending="Mapping is not implemented yet">

src/utils/resolver-pipeline/testing/1_selected/select-rlink.xspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
xmlns:xs="http://www.w3.org/2001/XMLSchema"
77
stylesheet="../../oscal-profile-resolve-select.xsl">
88

9-
<!-- Location of sample files, relative to compiled test in xspec/ subdirectory -->
10-
<x:variable name="ov:filedir" as="xs:string" select="resolve-uri('../../../../../../specifications/profile-resolution/profile-resolution-examples')"/>
9+
<!-- Location of sample files, relative to this test file -->
10+
<x:variable name="ov:filedir" as="xs:string" select="resolve-uri('../../../../specifications/profile-resolution/profile-resolution-examples',$x:xspec-uri)"/>
1111

1212
<x:scenario label="Direct import by file href">
1313
<x:context>

src/utils/resolver-pipeline/testing/1_selected/select.xspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
stylesheet="../../oscal-profile-resolve-select.xsl"
99
xslt-version="3.0">
1010

11-
<!-- Location of sample files, relative to compiled test in xspec/ subdirectory -->
12-
<x:variable name="ov:filedir" as="xs:string" select="resolve-uri('../../../../../../specifications/profile-resolution/profile-resolution-examples')"/>
11+
<!-- Location of sample files, relative to this test file -->
12+
<x:variable name="ov:filedir" as="xs:string" select="resolve-uri('../../../../specifications/profile-resolution/profile-resolution-examples',$x:xspec-uri)"/>
1313

1414
<x:variable name="ov:unique" as="function(*)"
1515
select="function($seq as xs:string*) as xs:boolean {

0 commit comments

Comments
 (0)