Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue_166] Add the ability to exclude Faces new TCK tests; exclude challenge #1935 tests #168

Merged
merged 2 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions faces/bin/run-tck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ if [ ! -d "${WORK_DIR}" ]; then
mkdir -p "${WORK_DIR}"
fi
if [ -z "${TCK_VERSION}" ]; then
TCK_VERSION="4.0.2"
TCK_VERSION="4.0.3"
fi
TCK_ZIP="${WORK_DIR}/jakarta-faces-tck-${TCK_VERSION}.zip"
TCK_URL=https://download.eclipse.org/jakartaee/faces/4.0/jakarta-faces-tck-${TCK_VERSION}.zip
Expand Down Expand Up @@ -206,10 +206,19 @@ if [ ${skipNewTck} == true ]; then
else
echo "Executing NEW Jakarta Faces TCK."
pushd $TCK_ROOT
safeRun mvn ${MVN_ARGS} clean install -pl '!old-tck,!old-tck/build,!old-tck/run' \
# Run the bulk of the TCK with a excludes files to possibly exclude tests classes/methods with accepted challenges
safeRun mvn ${MVN_ARGS} clean install -pl '!old-tck,!old-tck/build,!old-tck/run,!faces-signaturetest' \
-P 'new-wildfly,wildfly-ci-managed,!glassfish-ci-managed' \
-Dwildfly.dir="${NEW_WILDFLY}" -fae
-Dwildfly.dir="${NEW_WILDFLY}" \
-Dnewtck.exclusions="${BASE_DIR}/wildfly-mods/newtck-exclusions.txt" \
-Dse21.newtck.exclusions="${BASE_DIR}/wildfly-mods/se21-newtck-exclusions.txt" \
-fae
newTckStatus=${status}
# Don't use an excludesFile for the signature tests; it doesn't allow excluded methods
safeRun mvn ${MVN_ARGS} clean install -pl 'faces-signaturetest' \
-P 'new-wildfly,wildfly-ci-managed,!glassfish-ci-managed' \
-Dwildfly.dir="${NEW_WILDFLY}" -fae
newTckStatus &&= ${status}
# Run the reporting
safeRun curl -Ls https://sh.jbang.dev | bash -s - run "${SCRIPT_DIR}/parsesurefire.java" --batch --format "Tests run: %p, Failures: %f, Errors: %e" "${TCK_ROOT}"
if [ ${status} -ne 0 ]; then
Expand Down
21 changes: 21 additions & 0 deletions faces/wildfly-mods/global-excludes-profile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>

<profile xmlns="http://maven.apache.org/POM/4.0.0">
<!-- Exclude accepted TCK challenges that are relevant in all contexts. -->
<id>global-tck-challenges</id>
<activation>
<property><name>newtck.exclusions</name></property>
</activation>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<excludesFile>${newtck.exclusions}</excludesFile>
</configuration>
</plugin>
</plugins>
</build>
</profile>
4 changes: 4 additions & 0 deletions faces/wildfly-mods/newtck-exclusions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Add entries for accepted challenges that are applicable in all contexts.
# Add a comment linking to the challenge, followed by ant globs pointing to the test class.
# To exclude a single method, append '#theMethodName' to the glob.
#
22 changes: 22 additions & 0 deletions faces/wildfly-mods/se21-excludes-profile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>

<profile xmlns="http://maven.apache.org/POM/4.0.0">
<!-- Exclude accepted TCK challenges that are only relevant to SE 21 or later. -->
<id>se21-tck-challenges</id>
<activation>
<jdk>[21,)</jdk>
<property><name>se21.newtck.exclusions</name></property>
</activation>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<excludesFile>${se21.newtck.exclusions}</excludesFile>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note I went with an excludesFile element here instead of an excludes element because it's not clear from the failsafe documentation whether method filtering is supported for 'excludes'. It's only documented in the excludesFile row:

Since 3.0.0-M6, method filtering support is provided in the exclusions file as well, example:

If it turns out it works with 'excludes' as well (which seems reasonable) in a future improvement we can perhaps switch to that and remove a couple files.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A file seems fine as it can be updated in a more clear manor IMO.

</configuration>
</plugin>
</plugins>
</build>
</profile>
8 changes: 8 additions & 0 deletions faces/wildfly-mods/se21-newtck-exclusions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Add entries for accepted challenges that are specific to SE 21 or later.
# Add a comment linking to the challenge, followed by ant globs pointing to the test class.
# To exclude a single method, append '#theMethodName' to the glob.
#
# Challenge https://github.com/jakartaee/faces/issues/1935
**/ee/jakarta/tck/faces/test/javaee8/converter/Issue4070IT#testJavaTimeTypes
**/ee/jakarta/tck/faces/test/javaee8/converter/Issue4087IT#testJavaTimeTypes
**/ee/jakarta/tck/faces/test/javaee8/converter/Issue4110IT#testJavaTimeTypes
2 changes: 2 additions & 0 deletions faces/wildfly-mods/transform.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
//*[local-name()='profiles']">
<xsl:copy>
<xsl:apply-templates select="document('profile.xml')/*"/>
<xsl:apply-templates select="document('global-excludes-profile.xml')/*"/>
<xsl:apply-templates select="document('se21-excludes-profile.xml')/*"/>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: I tried to include 3 'profile' elements in profile.xml and it didn't work. When my time budget for renewing my xslt skills was used up I went with 3 separate files.

<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
Expand Down