You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by db...@apache.org on 2021/03/31 01:27:37 UTC
[tomee-tck] branch jakartaee9-tck updated: Print TCK information if
it is there
This is an automated email from the ASF dual-hosted git repository.
dblevins pushed a commit to branch jakartaee9-tck
in repository https://gitbox.apache.org/repos/asf/tomee-tck.git
The following commit(s) were added to refs/heads/jakartaee9-tck by this push:
new 1968f23 Print TCK information if it is there
1968f23 is described below
commit 1968f23106b213ec0fd65452271e297d4e67c68c
Author: David Blevins <da...@gmail.com>
AuthorDate: Tue Mar 30 18:27:20 2021 -0700
Print TCK information if it is there
---
.../openejb/tck/commands/ValidateCommand.groovy | 23 +++++++++++++++++-----
update91tck.sh | 4 ++++
2 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/src/test/script/openejb/tck/commands/ValidateCommand.groovy b/src/test/script/openejb/tck/commands/ValidateCommand.groovy
index eb7a95d..21a9c44 100644
--- a/src/test/script/openejb/tck/commands/ValidateCommand.groovy
+++ b/src/test/script/openejb/tck/commands/ValidateCommand.groovy
@@ -20,6 +20,7 @@
package openejb.tck.commands
import org.apache.commons.lang.SystemUtils
+import org.apache.openejb.loader.IO
/**
* Validate the TCK environment.
@@ -32,7 +33,7 @@ class ValidateCommand
def ValidateCommand(source) {
super(source)
}
-
+
def logProperties(props, header) {
assert props
assert header
@@ -45,20 +46,20 @@ class ValidateCommand
}
}
}
-
+
def execute() {
log.info("Validating TCK environment...")
-
+
if (SystemUtils.IS_OS_WINDOWS) {
log.warn("Detected evil operating system; beware of failures caused by your operating system\'s stupidity")
}
-
+
// Spit out some debug information
if (log.isDebugEnabled()) {
logProperties(System.properties, "System")
logProperties(project.properties, "Project")
}
-
+
// Ensure that cts.home and ri.home are set to valid directories
['cts.home', 'ri.home'].each {
def dir = requireDirectory(it)
@@ -69,7 +70,19 @@ class ValidateCommand
log.info("Using $it: $dir")
}
+
+ def tckHome = new File(project.properties.getProperty('cts.home'))
+ def infoTxt = new File(tckHome, "info.txt")
+ if (infoTxt.exists()) {
+ def content = IO.slurp(infoTxt)
+ log.info(content)
+ }
+ def sha = new File(tckHome, "sha256")
+ if (sha.exists()) {
+ def content = IO.slurp(sha)
+ log.info("TCK SHA-256 " + content)
+ }
}
}
diff --git a/update91tck.sh b/update91tck.sh
index e6de021..d26fc0b 100755
--- a/update91tck.sh
+++ b/update91tck.sh
@@ -78,3 +78,7 @@ perl -i -pe "s,(<jakartaee91.cts.home>)[^<]+<,\$1$TCKDIR/$TCK<," ~/.m2/settings.
echo "Updated ~/.m2/settings.xml"
+## Add info.txt and sha256 files into the extracted TCK
+## so that we have the full details on what we've installed
+echo "$TCKINFO" > "$TCKDIR/$TCK/info.txt"
+echo "$SHA" > "$TCKDIR/$TCK/sha256"