Permalink
097a544 Jul 14, 2017
@mrook @siad007
101 lines (87 sloc) 3.57 KB
<?xml version="1.0"?>
<project name="gitPullTest" default="invalid">
<import file="GitTestFunction.xml"/>
<target name="invalid">
<fail>This file should only be run via a testcase</fail>
</target>
<target name="allParamsSet" description="all parameters present">
<gitclone gitPath="${git-path}"
singleBranch="true"
repository="${repo.dir.resolved}"
targetPath="${tmp.dir.resolved}" />
<gitpull gitPath="${git-path}"
repository="${tmp.dir.resolved}"
source="origin" refspec="foobranch"
strategy="recursive" keep="true"
force="true" quiet="true" norebase="true" />
</target>
<target name="allParamsSetRebase" description="all parameters present">
<gitclone gitPath="${git-path}"
singleBranch="true"
repository="${repo.dir.resolved}"
targetPath="${tmp.dir.resolved}" />
<gitpull gitPath="${git-path}"
repository="${tmp.dir.resolved}"
source="origin" refspec="foobranch"
strategy="recursive" keep="true"
force="true" quiet="true" rebase="true" />
</target>
<target name="noRepository" description="Required param checking">
<gitpull gitPath="${git-path}" />
</target>
<target name="noSource" description="Required param checking">
<gitclone gitPath="${git-path}"
singleBranch="true"
repository="${repo.dir.resolved}"
targetPath="${tmp.dir.resolved}" />
<gitpull gitPath="${git-path}"
repository="${tmp.dir.resolved}" source="" />
</target>
<target name="wrongStrategySet" description="git-pull --strategy">
<gitclone gitPath="${git-path}"
singleBranch="true"
repository="${repo.dir.resolved}"
targetPath="${tmp.dir.resolved}" />
<gitpull gitPath="${git-path}"
repository="${tmp.dir.resolved}"
source="origin" refspec="foobranch"
strategy="plain-wrong"
force="true" quiet="true" />
</target>
<target name="allReposSet" description="git-pull --all">
<gitclone gitPath="${git-path}"
singleBranch="true"
repository="${repo.dir.resolved}"
targetPath="${tmp.dir.resolved}" />
<gitpull gitPath="${git-path}"
repository="${tmp.dir.resolved}" all="true" />
</target>
<target name="appendSet" description="git-pull --append">
<gitclone gitPath="${git-path}"
singleBranch="true"
repository="${repo.dir.resolved}"
targetPath="${tmp.dir.resolved}" />
<gitpull gitPath="${git-path}"
repository="${tmp.dir.resolved}" all="true" quiet="false" append="true" />
</target>
<target name="tagsSet" description="git-pull --tags">
<gitclone gitPath="${git-path}"
singleBranch="true"
repository="${repo.dir.resolved}"
targetPath="${tmp.dir.resolved}" />
<gitpull gitPath="${git-path}"
repository="${tmp.dir.resolved}"
refspec="foobranch"
keep="true" tags="true" />
</target>
<target name="noTagsSet" description="git-pull --no-tags">
<gitclone gitPath="${git-path}"
singleBranch="true"
repository="${repo.dir.resolved}"
targetPath="${tmp.dir.resolved}" />
<gitpull gitPath="${git-path}"
repository="${tmp.dir.resolved}"
refspec="foobranch"
keep="true" notags="true" />
</target>
</project>