Skip to content

Commit

Permalink
remove version from signature files
Browse files Browse the repository at this point in the history
  • Loading branch information
alwin-joseph committed Feb 16, 2022
1 parent 374a802 commit 1cb7f12
Show file tree
Hide file tree
Showing 31 changed files with 9 additions and 23 deletions.
18 changes: 6 additions & 12 deletions src/com/sun/ts/tests/signaturetest/SignatureTestDriver.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2021 Oracle and/or its affiliates and others.
* Copyright (c) 2007, 2022 Oracle and/or its affiliates and others.
* All rights reserved.
*
* This program and the accompanying materials are made available under the
Expand Down Expand Up @@ -35,8 +35,6 @@ public abstract class SignatureTestDriver {

private static final String SIG_FILE_EXT = ".sig";

private static final String SIG_FILE_VER_SEP = "_";

// ---------------------------------------------------------- Public Methods

/**
Expand Down Expand Up @@ -498,23 +496,19 @@ protected Properties loadMapFile(String mapFile)
* the base portion of the signature filename
* @param repositoryDir
* the directory in which the signatures are stored
* @param version
* the version of the signature file
* @throws FileNotFoundException
* if the file cannot be validated as existing and is in fact a file
* @return a valid, fully qualified filename, appropriate for the system the
* test is being run on
*/
protected String getSigFileName(String baseName, String repositoryDir,
String version) throws FileNotFoundException {
protected String getSigFileName(String baseName, String repositoryDir)
throws FileNotFoundException {

String sigFile;
if (repositoryDir.endsWith(File.separator)) {
sigFile = repositoryDir + baseName + SIG_FILE_EXT + SIG_FILE_VER_SEP
+ version;
sigFile = repositoryDir + baseName + SIG_FILE_EXT;
} else {
sigFile = repositoryDir + File.separator + baseName + SIG_FILE_EXT
+ SIG_FILE_VER_SEP + version;
sigFile = repositoryDir + File.separator + baseName + SIG_FILE_EXT;
}

File testFile = new File(sigFile);
Expand Down Expand Up @@ -597,7 +591,7 @@ protected SignatureFileInfo getSigFileInfo(String packageName, String mapFile,

/* Return the expected name of the signature file */

return new SignatureFileInfo(getSigFileName(name, repositoryDir, version),
return new SignatureFileInfo(getSigFileName(name, repositoryDir),
version);

} // END getSigFileInfo
Expand Down
14 changes: 3 additions & 11 deletions src/com/sun/ts/tests/signaturetest/signature-repository/README
Expand Up @@ -12,23 +12,15 @@ a subset of the signature files stored in this directory.
Sig File Naming Schemes:
------------------------
The signature files have the following naming scheme:
<package_name>.sig_<version_id>
<package_name>.sig
Where <package_name> is the name of the package who's signatures are in this
file, note this includes all sub-packages. The <version_id> is a unique ID
used to denote one version of a package signature file from another (since
we now support changing APIs between Jakarta EE platform releases). Typically,
the version ID should be the version ID of the technology that the package
belongs to. (eg. jakarta.xml.soap.sig_2.0 are the signatures that apply to
the SOAP v2.0 technology)
file, note this includes all sub-packages.

----------------------------------
Which Sig Files Apply To Your TCK:
----------------------------------
All TCKs which contain public API's need to perform signature test verifications.
The names of the signature files used by a TCK is called out in the
$TS_HOME/bin/sig-test.map file. The sig-test.map file contains key-value pairs
where the key=package_name and value=version_id. These key-value pairs
are used to satisfy our naming scheme of:
<package_name>.sig_<version_id>

where the key=package_name and value=version_id.

0 comments on commit 1cb7f12

Please sign in to comment.