-
-
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 2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<?xml version="1.0"?> | ||
|
||
<!-- | ||
Copyright (c) 2018, 2018 IBM Corp. and others | ||
|
||
This program and the accompanying materials are made available under | ||
the terms of the Eclipse Public License 2.0 which accompanies this | ||
distribution and is available at https://www.eclipse.org/legal/epl-2.0/ | ||
or the Apache License, Version 2.0 which accompanies this distribution and | ||
is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
|
||
This Source Code may also be made available under the following | ||
Secondary Licenses when the conditions for such availability set | ||
forth in the Eclipse Public License, v. 2.0 are satisfied: GNU | ||
General Public License, version 2 with the GNU Classpath | ||
Exception [1] and GNU General Public License, version 2 with the | ||
OpenJDK Assembly Exception [2]. | ||
|
||
[1] https://www.gnu.org/software/classpath/license.html | ||
[2] https://openjdk.org/legal/assembly-exception.html | ||
|
||
SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception | ||
--> | ||
|
||
<project name="BUILD_FUNCTIONAL_TEST" default="build_functional" basedir="."> | ||
<taskdef resource="net/sf/antcontrib/antlib.xml" /> | ||
<description> | ||
Build functional tests | ||
</description> | ||
|
||
<!-- set properties for this build --> | ||
<property name="DEST_FUNCTIONAL" value="${BUILD_ROOT}/functional" /> | ||
|
||
<target name="dist_functional" > | ||
<mkdir dir="${DEST_FUNCTIONAL}" /> | ||
<copy todir="${DEST_FUNCTIONAL}"> | ||
<fileset dir="${TEST_ROOT}/functional" includes="*.mk,*.xml"/> | ||
</copy> | ||
</target> | ||
|
||
<target name="build_functional" depends="dist_functional"> | ||
<if> | ||
<equals arg1="${JDK_VERSION}" arg2="Panama"/> | ||
<then> | ||
<subant target=""> | ||
<fileset dir="./"> | ||
<include name="Panama/build.xml" /> | ||
</fileset> | ||
</subant> | ||
</then> | ||
<else> | ||
<subant target=""> | ||
<fileset dir="." includes="*/build.xml" > | ||
<exclude name="Panama/build.xml" /> | ||
</fileset> | ||
</subant> | ||
</else> | ||
</if> | ||
</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 | ||||
---|---|---|---|---|---|---|
|
@@ -14,15 +14,15 @@ | |||||
# limitations under the License. | ||||||
--> | ||||||
|
||||||
<project name="Security Functional tests" default="build" basedir="."> | ||||||
<project name="Adotpium Security Functional tests" default="build" basedir="."> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
<taskdef resource="net/sf/antcontrib/antlib.xml" /> | ||||||
<description> | ||||||
Security Functional tests | ||||||
</description> | ||||||
<import file="${TEST_ROOT}/functional/build.xml"/> | ||||||
Adotpium Security Functional tests | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
</description> | ||||||
<!-- <import file="${TEST_ROOT}/functional/build.xml"/> --> | ||||||
|
||||||
<!-- set global properties for this build --> | ||||||
<property name="DEST" value="${BUILD_ROOT}/functional/security" /> | ||||||
<property name="DEST" value="${BUILD_ROOT}/functional/security/Adoptium" /> | ||||||
|
||||||
<!--Properties for this particular build--> | ||||||
<property name="src" location="./src" /> | ||||||
|
@@ -32,7 +32,7 @@ | |||||
<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> | ||||||
|
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> |
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.
This material would not be Copyright IBM, but rather
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 file was added by accident. Removed.