Testing CASA with Gradle
ONLY EDIT THIS WITH "EDIT WIKI TEXT"
Tasks
Within Gradle, tasks are used to perform actions. These tasks are implemented in Java or Groovy, and each task can depend upon other tasks. The table below describes the tasks currently available. There are two ways to supply input to tasks either on the command line or through a properties file. On the command line, properties are set like:
gradle -Papp=/some/path/CASA.app
Here the
app
parameter is set to
/some/path/CASA.app
(the path to an unpacked CASA distribution). Property files and a complete list of supported properties is discussed below. For more information about Gradle tasks in general, please refer to the
Gradle user guide.
Task |
Properties Used |
Command Line Parameters |
Description |
createStable |
test.dir.work | test.dir.data | test.dir.log | test.distro.in | test.distro.out | test.rpm.in | test.rpm.out | test.dir.backup | |
|
create stable from most recent test version |
runTest |
test.dir.work | test.dir.app | test.dir.data | test.dir.log | |
app=test.dir.app | test=<LIST> | data=test.dir.data | log=test.dir.log | |
run one or more tests (from nightly regression set of tests) |
In this table
<LIST>
is either a single test, e.g.
vishead
, or a list of tests to run, e.g.
cleanhelper_test,3C129,csvclean
. The elements of the list are separated by commas and optional whitespace. The strings used to represent the test are a substring of the test name, e.g. when
vishead
is specified all tests which match
*vishead*
are run.
Gradle task names are "camel cased," and they can be run using just the first letter plus each "hump" letter. So
runTest
can be invoked on the command line as
rT
instead of supplying the full name,
runTest
.
Property Files
Property files are located in the parent of the directory containing the
build.gradle
build script. Only a single property file will be loaded for a given build or test run with Gradle. A number of possible property file names are checked and the first one found is the one that is selected and loaded. These names are shown in the following table in priority order:
|
File Name |
1 |
gradle.properties.<HOSTNAME>.<USERNAME> |
2 |
gradle.properties.<OSVER>.<USERNAME> |
3 |
gradle.properties.<OS>.<USERNAME> |
4 |
gradle.properties.<USERNAME> |
5 |
gradle.properties.<HOSTNAME> |
6 |
gradle.properties.<OSVER> |
7 |
gradle.properties.<OS> |
8 |
gradle.properties |
Where
<USERNAME>
is the username of the current user,
<HOSTNAME>
is the hostname of the current machine,
<OS>
is either
osx
or
linux
,
<OSVER>
is one of
el6
,
el7
,
osx10_10
, or
osx10_8
.