From c67001afa60cbf6cf6c7469ce802d925fc7cbe47 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 25 Jan 2018 16:03:48 -0800 Subject: [PATCH 1/2] Makefile: Change default test-data location This should have been updated as part of 36bce3f (test: Add license-test-files with read-tree, 2018-01-03, #593). --- .travis.yml | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index ce67c859d..7984f614e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ matrix: include: - language: java script: - - make TEST_DATA=test/simpleTestForGenerator validate-canonical-match + - make validate-canonical-match - language: node_js node_js: - "node" diff --git a/Makefile b/Makefile index 1512b02ca..ac07dd08a 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ TOOL_VERSION = 2.1.9 -TEST_DATA = ../license-test-files +TEST_DATA = test/simpleTestForGenerator .PHONY: validate-canonical-match validate-canonical-match: spdx-tools-$(TOOL_VERSION).jar-valid resources/licenses-full.json $(TEST_DATA) .tmp From fe10a2c8ee201688029048c984f7d219c751a90c Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 25 Jan 2018 16:10:55 -0800 Subject: [PATCH 2/2] Makefile: Change validate-canonical-match source from '.' to 'src' The old '.' lead to errors like: [Fatal Error] comment.xml:5:10: An invalid XML character (Unicode: 0xe) was found in the comment. 16:10:09.437 [main] ERROR org.spdx.licensexml.LicenseXmlDocument - Error parsing license XML document org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0xe) was found in the comment. at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:245) ~[spdx-tools-2.1.9.jar:?] at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:298) ~[spdx-tools-2.1.9.jar:?] at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:205) ~[?:1.8.0_151] at org.spdx.licensexml.LicenseXmlDocument.(LicenseXmlDocument.java:74) [spdx-tools-2.1.9.jar:?] at org.spdx.licensexml.XmlLicenseProvider$XmlLicenseIterator.findNextItem(XmlLicenseProvider.java:63) [spdx-tools-2.1.9.jar:?] at org.spdx.licensexml.XmlLicenseProvider$XmlLicenseIterator.next(XmlLicenseProvider.java:99) [spdx-tools-2.1.9.jar:?] at org.spdx.licensexml.XmlLicenseProvider$XmlLicenseIterator.next(XmlLicenseProvider.java:48) [spdx-tools-2.1.9.jar:?] at org.spdx.tools.LicenseRDFAGenerator.writeLicenseList(LicenseRDFAGenerator.java:478) [spdx-tools-2.1.9.jar:?] at org.spdx.tools.LicenseRDFAGenerator.generateLicenseData(LicenseRDFAGenerator.java:309) [spdx-tools-2.1.9.jar:?] at org.spdx.tools.LicenseRDFAGenerator.main(LicenseRDFAGenerator.java:193) [spdx-tools-2.1.9.jar:?] at org.spdx.tools.Main.main(Main.java:49) [spdx-tools-2.1.9.jar:?] My guess is that the tooling was walking into an already-populated .tmp (from a previous validation run) and then choking on the XML-ish it found there. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ac07dd08a..d601cd33f 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ TEST_DATA = test/simpleTestForGenerator .PHONY: validate-canonical-match validate-canonical-match: spdx-tools-$(TOOL_VERSION).jar-valid resources/licenses-full.json $(TEST_DATA) .tmp - java -jar -DLocalFsfFreeJson=true spdx-tools-$(TOOL_VERSION).jar LicenseRDFAGenerator . .tmp 1.0 2000-01-01 $(TEST_DATA) expected-warnings + java -jar -DLocalFsfFreeJson=true spdx-tools-$(TOOL_VERSION).jar LicenseRDFAGenerator src .tmp 1.0 2000-01-01 $(TEST_DATA) expected-warnings .PRECIOUS: spdx-tools-%.jar spdx-tools-%.jar: