-
-
Notifications
You must be signed in to change notification settings - Fork 314
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
Add Crypotests #4319
Closed
Closed
Add Crypotests #4319
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
9d89aa6
Moving security tests to adoptium sub folder
sophia-guo 1b8b017
Add crypto tests
sophia-guo b29bea2
Moving existing function/security tests to AQAvit sub folder
sophia-guo 97ce553
Adding security/build.xml
sophia-guo 3a67227
Update gitignore with security tests
sophia-guo 3921ec7
Add task getDependentLibs to support compile by sub directory
sophia-guo c6c1ec4
Limit LIB value to testng and jcommander
sophia-guo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<?xml version="1.0"?> | ||
|
||
<!-- | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
--> | ||
|
||
<project name="AQAvit Security Functional tests" default="build" basedir="."> | ||
<taskdef resource="net/sf/antcontrib/antlib.xml" /> | ||
<description> | ||
AQAvit Security Functional tests | ||
</description> | ||
<import file="${TEST_ROOT}/functional/build.xml"/> | ||
<property name="LIB" value="testng,jcommander" /> | ||
<import file="${TEST_ROOT}/TKG/scripts/getDependencies.xml"/> | ||
|
||
<!-- set global properties for this build --> | ||
<property name="DEST" value="${BUILD_ROOT}/functional/security/AQAvit" /> | ||
|
||
<!--Properties for this particular build--> | ||
<property name="src" location="./src" /> | ||
<property name="build" location="./bin" /> | ||
|
||
<target name="init"> | ||
<mkdir dir="${DEST}" /> | ||
<mkdir dir="${build}" /> | ||
</target> | ||
|
||
<target name="compile" depends="init,getDependentLibs" description="Using java ${JDK_VERSION} to compile the source "> | ||
<echo>Ant version is ${ant.version}</echo> | ||
<echo>============COMPILER SETTINGS============</echo> | ||
<echo>===fork: yes</echo> | ||
<echo>===executable: ${compiler.javac}</echo> | ||
<echo>===debug: on</echo> | ||
<echo>===destdir: ${DEST}</echo> | ||
<javac srcdir="${src}" destdir="${build}" debug="true" fork="true" executable="${compiler.javac}" includeAntRuntime="false" encoding="ISO-8859-1"> | ||
<src path="${src}" /> | ||
<classpath> | ||
<pathelement location="${LIB_DIR}/testng.jar"/> | ||
<pathelement location="${LIB_DIR}/jcommander.jar"/> | ||
</classpath> | ||
</javac> | ||
</target> | ||
|
||
<target name="dist" depends="compile" description="generate the distribution"> | ||
<jar jarfile="${DEST}/SecurityTests.jar" filesonly="true"> | ||
<fileset dir="${build}" /> | ||
<fileset dir="${src}/../" includes="*.properties,*.xml" /> | ||
</jar> | ||
<copy todir="${DEST}"> | ||
<fileset dir="${src}/../" includes="*.xml" /> | ||
<fileset dir="${src}/../" includes="*.mk" /> | ||
</copy> | ||
</target> | ||
|
||
<target name="clean" depends="dist" description="clean up"> | ||
<!-- Delete the ${build} directory trees --> | ||
<delete dir="${build}" /> | ||
</target> | ||
|
||
<target name="build" > | ||
<antcall target="clean" inheritall="true" /> | ||
</target> | ||
</project> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
<?xml version="1.0"?> | ||
|
||
<!-- | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
--> | ||
|
||
<project name="Crypto Security Functional tests" default="build" basedir="."> | ||
<taskdef resource="net/sf/antcontrib/antlib.xml" /> | ||
<description> | ||
Crypto Security Functional tests | ||
</description> | ||
<!-- <import file="${TEST_ROOT}/functional/build.xml"/> --> | ||
|
||
<!-- set global properties for this build --> | ||
<property name="DEST" value="${BUILD_ROOT}/functional/security/Crypto" /> | ||
|
||
<!--Properties for this particular build--> | ||
<property name="src" location="./CryptoTest/cryptotest" /> | ||
<property name="build" location="./bin" /> | ||
|
||
<target name="cryptoTest.check"> | ||
<condition property="cryptoTestdir.exists"> | ||
<available file="CryptoTest" type="dir"/> | ||
</condition> | ||
</target> | ||
|
||
<target name="getCryptoTest" depends="cryptoTest.check" unless="cryptoTestdir.exists"> | ||
<exec executable="git" failonerror="true"> | ||
<arg value="clone" /> | ||
<arg value="https://github.com/rh-openjdk/CryptoTest.git" /> | ||
</exec> | ||
</target> | ||
|
||
|
||
|
||
<target name="init"> | ||
<mkdir dir="${DEST}" /> | ||
<mkdir dir="${build}" /> | ||
</target> | ||
|
||
<target name="compile" depends="init,getCryptoTest" description="Using java ${JDK_VERSION} to compile the source "> | ||
<echo>Ant version is ${ant.version}</echo> | ||
<echo>============COMPILER SETTINGS============</echo> | ||
<echo>===fork: yes</echo> | ||
<echo>===executable: ${compiler.javac}</echo> | ||
<echo>===debug: on</echo> | ||
<echo>===destdir: ${DEST}</echo> | ||
|
||
<if> | ||
<equals arg1="${JDK_VERSION}" arg2="8"/> | ||
<then> | ||
<property name="extraOptions" value="-XDignore.symbol.file=true" /> | ||
<javac srcdir="${src}" destdir="${build}" debug="true" fork="true" executable="${compiler.javac}" includeAntRuntime="false" encoding="ISO-8859-1"> | ||
<src path="${src}" /> | ||
<compilerarg line='${extraOptions}' /> | ||
</javac> | ||
</then> | ||
<else> | ||
<property name="addExports" value="--add-reads java.base=ALL-UNNAMED --add-exports java.base/com.sun.crypto.provider=ALL-UNNAMED --add-exports java.base/sun.security.internal.spec=ALL-UNNAMED --add-exports java.base/sun.security.ssl=ALL-UNNAMED --add-exports java.base/sun.security.x509=ALL-UNNAMED --add-reads java.security.jgss=ALL-UNNAMED --add-exports java.security.jgss/sun.security.jgss=ALL-UNNAMED --add-exports java.security.jgss/sun.security.jgss.krb5=ALL-UNNAMED --add-exports java.security.jgss/sun.security.krb5=ALL-UNNAMED --add-reads java.xml.crypto=ALL-UNNAMED --add-exports java.xml.crypto/org.jcp.xml.dsig.internal.dom=ALL-UNNAMED --add-modules=jdk.crypto.ec --add-reads jdk.crypto.ec=ALL-UNNAMED --add-exports jdk.crypto.ec/sun.security.ec=ALL-UNNAMED"/> | ||
<javac srcdir="${src}" destdir="${build}" debug="true" fork="true" executable="${compiler.javac}" includeAntRuntime="false" encoding="ISO-8859-1"> | ||
<src path="${src}" /> | ||
<compilerarg line='${addExports}' /> | ||
</javac> | ||
</else> | ||
</if> | ||
</target> | ||
<target name="dist" depends="compile" description="generate the distribution"> | ||
<copy todir="${build}/cryptotest/tests"> | ||
<fileset file="${src}/tests/test.jks" /> | ||
</copy> | ||
<jar jarfile="${DEST}/CryptoTests.jar" filesonly="true"> | ||
<fileset dir="${build}" /> | ||
</jar> | ||
<copy todir="${DEST}"> | ||
<fileset dir="${src}/../../" includes="*.xml,*.mk" /> | ||
<fileset file="${src}/tests/test.jks" /> | ||
</copy> | ||
</target> | ||
|
||
<target name="clean" depends="dist" description="clean up"> | ||
<!-- Delete the ${build} directory trees --> | ||
<delete dir="${build}" /> | ||
</target> | ||
|
||
<target name="build" > | ||
<antcall target="clean" inheritall="true" /> | ||
</target> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
############################################################################## | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
############################################################################## | ||
ifneq ($(JDK_VERSION),8) | ||
JAVA_MOD_ARGS=--add-reads java.base=ALL-UNNAMED --add-exports java.base/com.sun.crypto.provider=ALL-UNNAMED --add-exports java.base/sun.security.internal.spec=ALL-UNNAMED --add-exports java.base/sun.security.ssl=ALL-UNNAMED --add-exports java.base/sun.security.x509=ALL-UNNAMED --add-reads java.security.jgss=ALL-UNNAMED --add-exports java.security.jgss/sun.security.jgss=ALL-UNNAMED --add-exports java.security.jgss/sun.security.jgss.krb5=ALL-UNNAMED --add-exports java.security.jgss/sun.security.krb5=ALL-UNNAMED --add-reads java.xml.crypto=ALL-UNNAMED --add-exports java.xml.crypto/org.jcp.xml.dsig.internal.dom=ALL-UNNAMED --add-modules=jdk.crypto.ec --add-reads jdk.crypto.ec=ALL-UNNAMED --add-exports jdk.crypto.ec/sun.security.ec=ALL-UNNAMED --add-opens java.base/java.security=ALL-UNNAMED | ||
else | ||
JAVA_MOD_ARGS= | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<!-- | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
--> | ||
|
||
<playlist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../TKG/playlist.xsd"> | ||
<include>crypto.mk</include> | ||
<test> | ||
<testCaseName>CryptoTests</testCaseName> | ||
<command>$(JAVA_COMMAND) $(JVM_OPTIONS) $(JAVA_MOD_ARGS) -cp $(Q)$(RESOURCES_DIR)$(P)$(TEST_RESROOT)$(D)CryptoTests.jar$(P)$(TEST_RESROOT)$(D)test.jks$(Q) -Dcryptotests.skipAgentTests=1 cryptotest.CryptoTest; \ | ||
$(TEST_STATUS)</command> | ||
<levels> | ||
<level>extended</level> | ||
</levels> | ||
<groups> | ||
<group>functional</group> | ||
</groups> | ||
</test> | ||
</playlist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,40 @@ | ||
<?xml version="1.0"?> | ||
|
||
<!-- | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
https://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
<project name="Security Functional tests" default="build" basedir="."> | ||
<project name="security" default="build" basedir="."> | ||
<taskdef resource="net/sf/antcontrib/antlib.xml" /> | ||
<description> | ||
Security Functional tests | ||
</description> | ||
Build security_Tests | ||
</description> | ||
<import file="${TEST_ROOT}/functional/build.xml"/> | ||
|
||
<!-- set global properties for this build --> | ||
<!-- set properties for this build --> | ||
<property name="DEST" value="${BUILD_ROOT}/functional/security" /> | ||
|
||
<!--Properties for this particular build--> | ||
<property name="src" location="./src" /> | ||
<property name="build" location="./bin" /> | ||
|
||
<target name="init"> | ||
<mkdir dir="${DEST}" /> | ||
<mkdir dir="${build}" /> | ||
</target> | ||
|
||
<target name="compile" depends="init" description="Using java ${JDK_VERSION} to compile the source "> | ||
<echo>Ant version is ${ant.version}</echo> | ||
<echo>============COMPILER SETTINGS============</echo> | ||
<echo>===fork: yes</echo> | ||
<echo>===executable: ${compiler.javac}</echo> | ||
<echo>===debug: on</echo> | ||
<echo>===destdir: ${DEST}</echo> | ||
<javac srcdir="${src}" destdir="${build}" debug="true" fork="true" executable="${compiler.javac}" includeAntRuntime="false" encoding="ISO-8859-1"> | ||
<src path="${src}" /> | ||
<classpath> | ||
<pathelement location="${LIB_DIR}/testng.jar"/> | ||
<pathelement location="${LIB_DIR}/jcommander.jar"/> | ||
</classpath> | ||
</javac> | ||
<target name="build" depends="dist"> | ||
<subant target=""> | ||
<fileset dir="." includes="*/build.xml" /> | ||
</subant> | ||
</target> | ||
|
||
<target name="dist" depends="compile" description="generate the distribution"> | ||
<jar jarfile="${DEST}/SecurityTests.jar" filesonly="true"> | ||
<fileset dir="${build}" /> | ||
<fileset dir="${src}/../" includes="*.properties,*.xml" /> | ||
</jar> | ||
|
||
<target name="dist" depends="init"> | ||
<copy todir="${DEST}"> | ||
<fileset dir="${src}/../" includes="*.xml" /> | ||
<fileset dir="${src}/../" includes="*.mk" /> | ||
<fileset dir="." includes="*.mk"/> | ||
</copy> | ||
</target> | ||
|
||
<target name="clean" depends="dist" description="clean up"> | ||
<!-- Delete the ${build} directory trees --> | ||
<delete dir="${build}" /> | ||
</target> | ||
|
||
<target name="build" > | ||
<antcall target="clean" inheritall="true" /> | ||
</target> | ||
</project> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
testng.jar and jcommand.jar are used, but they are not set before line 23. This will result in failure for the local runs.
Please add the following line before line 23:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default value of LIB is all. This should not fail the local run though it's alway good to limit to the lib needed.