From 009e981e21f418dc140a07849bbfb46aeacd1689 Mon Sep 17 00:00:00 2001 From: galtm <40716346+galtm@users.noreply.github.com> Date: Thu, 22 Feb 2024 08:27:58 -0500 Subject: [PATCH 1/4] Updates to accommodate CI/CD Imitate changes in xslt3-functions PR#7. - CI/CD puts compiled XSpec file somewhere else, so define ov:service variable more robustly so that uuid-value.txt will be found regardless of where compiled XSpec file is. - Java UUID class is not found in CI/CD, so conditionalize tests that use it. Running XSpec in Oxygen finds the class and verifies its results (same as before this change). --- .../2_metadata/uuid-method-choice.xspec | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/utils/resolver-pipeline/testing/2_metadata/uuid-method-choice.xspec b/src/utils/resolver-pipeline/testing/2_metadata/uuid-method-choice.xspec index f1a5f6b8e3..0c409a7ade 100644 --- a/src/utils/resolver-pipeline/testing/2_metadata/uuid-method-choice.xspec +++ b/src/utils/resolver-pipeline/testing/2_metadata/uuid-method-choice.xspec @@ -1,5 +1,6 @@ - + @@ -37,16 +38,22 @@ - + - + + - + test="if ($ov:java-fcn-available) + then (string($x:result) ne $ov:specified and string($x:result) ne $ov:fixed) + else true()"/> + - - + + diff --git a/src/utils/resolver-pipeline/testing/1_selected/select-rlink.xspec b/src/utils/resolver-pipeline/testing/1_selected/select-rlink.xspec index cb70e55295..7569f39e35 100644 --- a/src/utils/resolver-pipeline/testing/1_selected/select-rlink.xspec +++ b/src/utils/resolver-pipeline/testing/1_selected/select-rlink.xspec @@ -6,8 +6,8 @@ xmlns:xs="http://www.w3.org/2001/XMLSchema" stylesheet="../../oscal-profile-resolve-select.xsl"> - - + + diff --git a/src/utils/resolver-pipeline/testing/1_selected/select.xspec b/src/utils/resolver-pipeline/testing/1_selected/select.xspec index f05ee727cb..46c015c689 100644 --- a/src/utils/resolver-pipeline/testing/1_selected/select.xspec +++ b/src/utils/resolver-pipeline/testing/1_selected/select.xspec @@ -8,8 +8,8 @@ stylesheet="../../oscal-profile-resolve-select.xsl" xslt-version="3.0"> - - + + + From 7e7f140c84f8e75c417b0703858d70681d786d3e Mon Sep 17 00:00:00 2001 From: galtm <40716346+galtm@users.noreply.github.com> Date: Fri, 23 Feb 2024 08:49:06 -0500 Subject: [PATCH 4/4] Rewrite id() usage `select="id('a1-stmt')"` works in Oxygen but not xspec.bat or CI/CD. Expressing that select attribute a different way. Also, I fixed a select attribute where the namespace prefix was missing. The omission caused the test to pass for the wrong reason (empty context). --- src/utils/resolver-pipeline/testing/4_modified/modify.xspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/resolver-pipeline/testing/4_modified/modify.xspec b/src/utils/resolver-pipeline/testing/4_modified/modify.xspec index 40eb7e3026..5a0546a739 100644 --- a/src/utils/resolver-pipeline/testing/4_modified/modify.xspec +++ b/src/utils/resolver-pipeline/testing/4_modified/modify.xspec @@ -300,7 +300,7 @@ - + @@ -1158,7 +1158,7 @@ - + Control A