Package ghidra.framework
Class TestApplicationUtils
- java.lang.Object
-
- ghidra.framework.TestApplicationUtils
-
public class TestApplicationUtils extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description TestApplicationUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.io.File
getInstallationDirectory()
Returns the directory containing the installation of this application.static java.io.File
getUniqueTempFolder()
Creates a folder that is unique for the current installation.
-
-
-
Method Detail
-
getInstallationDirectory
public static java.io.File getInstallationDirectory()
Returns the directory containing the installation of this application. The value returned here will either be an actual installation directory or the parent directory of a cloned repository. This method will work in the various modes of operation, including:- Development Mode - running from a repo clone, from inside of an IDE or the
command-line. In this mode a sample directory structure is:
/.../git_repos/ghidra_clone/ghidra/Ghidra/Features/Base/src/... which means this method will return 'ghidra_clone'
- Batch Testing Mode - running from a test server, but not from inside a
complete build. This mode uses jar files for the compiled source code, but is running
from within the structure of a cloned repo. In this mode a sample directory structure is:
/.../git_repos/ghidra_clone/ghidra/Ghidra/Features/Base/src/... which means this method will return 'ghidra_clone'
- Eclipse Release Development Mode - running from a full application release.
This mode uses jar files from the installation for dependencies. The user test files
are run from within an Eclipse that has been linked with the application installation.
In this mode a sample directory structure is:
/.../Software/ghidra_10.0/Ghidra/Features/Base/lib/Base.jar which means this method will return 'ghidra_10.0'
- Returns:
- the installation directory
- Development Mode - running from a repo clone, from inside of an IDE or the
command-line. In this mode a sample directory structure is:
-
getUniqueTempFolder
public static java.io.File getUniqueTempFolder()
Creates a folder that is unique for the current installation. This allows clients to have multiple clones (for development mode) or multiple installations (for release mode) on their machine, running tests from each repo simultaneously.- Returns:
- a folder that is unique for the current installation
-
-