buildframework/helium/sf/java/blocks/tests/antunits/test_blocks_repo.ant.xml
author lorewang
Wed, 01 Dec 2010 16:05:36 +0800
changeset 715 e0739b8406dd
parent 645 b8d81fa19e7d
permissions -rw-r--r--
Specify extenal tool with path
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
645
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
     2
<!-- 
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
     3
============================================================================ 
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
     4
Name        : test_blocks_repo.ant.xml 
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
     5
Part of     : Helium AntLib
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
     6
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
     7
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
     8
All rights reserved.
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
     9
This component and the accompanying materials are made available
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    10
under the terms of the License "Eclipse Public License v1.0"
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    11
which accompanies this distribution, and is available
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    12
at the URL "http://www.eclipse.org/legal/epl-v10.html".
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    13
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    14
Initial Contributors:
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    15
Nokia Corporation - initial contribution.
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    16
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    17
Contributors:
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    18
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    19
Description:
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    20
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    21
============================================================================
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    22
-->
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    23
<project name="helium-blocks-repo-unittest" xmlns:hlm="http://www.nokia.com/helium" xmlns:au="antlib:org.apache.ant.antunit" 
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    24
    xmlns:ac="antlib:net.sf.antcontrib">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    25
    <description>Helium blocks repository unittests.</description>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    26
    
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    27
    <property name="workspace" location="${test.temp.dir}/workspace" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    28
    <property name="repo" location="${test.temp.dir}/repo" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    29
    
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    30
    <target name="setUp">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    31
        <tstamp>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    32
            <format property="tstamp" pattern="yyyyMMddHHmmssSSS" locale="en,UK" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    33
        </tstamp>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    34
        <mkdir dir="${test.temp.dir}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    35
        <delete file="${test.temp.dir}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    36
        <mkdir dir="${test.temp.dir}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    37
        <mkdir dir="${workspace}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    38
        <mkdir dir="${repo}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    39
        
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    40
        <exec executable="blocks.bat"  resultproperty="blocks.result" failifexecutionfails="false" osfamily="windows" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    41
        <exec executable="blocks"  resultproperty="blocks.result" failifexecutionfails="false" osfamily="unix" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    42
        <condition property="execute.test" value="true">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    43
            <equals arg1="${blocks.result}" arg2="0" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    44
        </condition>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    45
        <echo>execute.test: ${execute.test}</echo>    
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    46
        <ac:if>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    47
        	<istrue value="${execute.test}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    48
        	<then>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    49
                <hlm:blocksAddWorkspace name="unittest-addworkspace-${tstamp}" dir="${workspace}"
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    50
                    wsidproperty="wsid" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    51
        	    <copy todir="${workspace}">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    52
        	        <fileset dir="../" includes="src/**" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    53
        	    </copy>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    54
        	    <mkdir dir="${workspace}/epoc32" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    55
        	    <copy todir="${workspace}/epoc32">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    56
        	        <fileset dir="../" includes="src/**" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    57
        	    </copy>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    58
        	    <exec executable="bundle.bat" dir="${workspace}" osfamily="windows">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    59
        	        <arg line="create-xml -n blocks -v 1.0" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    60
        	        <arg value="--source=${workspace}/src" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    61
        	        <arg value="--target=${workspace}/epoc32" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    62
        	        <arg value="${test.temp.dir}/blocks.xml" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    63
        	    </exec>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    64
        	    <exec executable="bundle.bat" dir="${workspace}" osfamily="windows">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    65
        	        <arg line="create" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    66
        	        <arg line="-o ${repo}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    67
        	        <arg value="${test.temp.dir}/blocks.xml" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    68
        	    </exec>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    69
                <hlm:blocksCreateRepositoryIndex dest="${repo}" verbose="true" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    70
        	</then>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    71
        </ac:if>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    72
    </target>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    73
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    74
    <target name="tearDown">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    75
        <ac:if>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    76
        	<isset property="execute.test" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    77
        	<then>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    78
	        	<hlm:blocksRemoveWorkspace wsid="${wsid}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    79
        	</then>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    80
        </ac:if>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    81
        <delete dir="${workspace}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    82
    </target>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    83
        
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    84
    <target name="test-add-repo-fail-if-url-is-not-defined" if="execute.test">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    85
        <au:expectfailure expectedMessage="'url' attribute has not been defined.">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    86
    	    <hlm:blocksAddRepository wsid="${wsid}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    87
        </au:expectfailure>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    88
    </target>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    89
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    90
    <target name="test-add-repo-fail-if-url-is-not-defined-with-name" if="execute.test">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    91
        <au:expectfailure expectedMessage="'url' attribute has not been defined.">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    92
    	    <hlm:blocksAddRepository wsid="${wsid}" name="demo"/>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    93
        </au:expectfailure>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    94
    </target>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    95
    
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    96
    <target name="test-add-repo-fail-if-url-defined-with-nested-reposet" if="execute.test">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    97
        <au:expectfailure expectedMessage="'url' attribute and nested repositorySet element cannot be used at the same time.">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    98
    	    <hlm:blocksAddRepository wsid="${wsid}" url="${repo}">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    99
    	        <repositorySet />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   100
    	    </hlm:blocksAddRepository>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   101
        </au:expectfailure>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   102
    </target>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   103
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   104
    <target name="test-add-repo-fail-if-nested-reposet-has-invalid-reference-type" if="execute.test">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   105
        <patternset id="patternset.id" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   106
        <au:expectfailure expectedMessage="The type referenced by patternset.id is not of RepositorySet type.">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   107
    	    <hlm:blocksAddRepository wsid="${wsid}">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   108
    	        <repositorySet refid="patternset.id" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   109
    	    </hlm:blocksAddRepository>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   110
        </au:expectfailure>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   111
    </target>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   112
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   113
    <target name="test-add-repo-is-working-using-url" if="execute.test">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   114
        <au:assertFalse message="The workspace should not have any repo allocted yet.">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   115
            <hlm:blocksRepositoryExists wsid="${wsid}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   116
        </au:assertFalse>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   117
  	    <hlm:blocksAddRepository wsid="${wsid}" url="file:${repo}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   118
        <au:assertTrue message="The workspace should have a declared repo.">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   119
            <hlm:blocksRepositoryExists wsid="${wsid}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   120
        </au:assertTrue>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   121
    </target>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   122
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   123
    <target name="test-add-repo-is-working-using-url-and-name" if="execute.test">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   124
        <au:assertFalse message="The workspace should not have any repo allocted yet.">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   125
            <hlm:blocksRepositoryExists wsid="${wsid}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   126
        </au:assertFalse>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   127
  	    <hlm:blocksAddRepository wsid="${wsid}" name="demo" url="file:${repo}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   128
        <au:assertTrue message="The workspace should have a declared repo.">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   129
            <hlm:blocksRepositoryExists wsid="${wsid}" name="demo" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   130
        </au:assertTrue>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   131
    </target>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   132
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   133
    <target name="test-add-repo-is-working-using-nested-reposet" if="execute.test">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   134
        <au:assertFalse message="The workspace should not have any repo allocted yet.">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   135
            <hlm:blocksRepositoryExists wsid="${wsid}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   136
        </au:assertFalse>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   137
  	    <hlm:blocksAddRepository wsid="${wsid}">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   138
  	        <repositorySet>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   139
  	            <repository  name="demo" url="file:${repo}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   140
  	        </repositorySet>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   141
  	    </hlm:blocksAddRepository>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   142
        <au:assertTrue message="The workspace should have a declared repo.">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   143
            <hlm:blocksRepositoryExists wsid="${wsid}" name="demo" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   144
        </au:assertTrue>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   145
    </target>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   146
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   147
    <hlm:blocksRepositorySet id="reposet.id">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   148
        <repository  name="demo" url="file:${repo}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   149
    </hlm:blocksRepositorySet>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   150
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   151
    <target name="test-add-repo-is-working-using-nested-reposet-ref" if="execute.test">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   152
        <au:assertFalse message="The workspace should not have any repo allocted yet.">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   153
            <hlm:blocksRepositoryExists wsid="${wsid}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   154
        </au:assertFalse>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   155
  	    <hlm:blocksAddRepository wsid="${wsid}">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   156
  	        <repositorySet refid="reposet.id" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   157
  	    </hlm:blocksAddRepository>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   158
        <au:assertTrue message="The workspace should have a declared repo.">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   159
            <hlm:blocksRepositoryExists wsid="${wsid}" name="demo" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   160
        </au:assertTrue>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   161
    </target>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   162
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   163
    <target name="test-remove-repo-fail-if-repositoryId-is-not-defined" if="execute.test">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   164
        <au:expectfailure message="'repositoryId' attribute has not been defined.">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   165
    	    <hlm:blocksRemoveRepository wsid="${wsid}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   166
        </au:expectfailure>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   167
    </target>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   168
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   169
    <target name="test-remove-repo-fail-if-repositoryId-and-name-are-defined" if="execute.test">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   170
        <au:expectfailure message="'repositoryId' attribute has not been defined.">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   171
    	    <hlm:blocksRemoveRepository wsid="${wsid}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   172
        </au:expectfailure>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   173
    </target>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   174
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   175
    <target name="test-remove-repo-with-repositoryid" if="execute.test">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   176
        <au:assertFalse message="The workspace should not have any repo allocted yet.">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   177
            <hlm:blocksRepositoryExists wsid="${wsid}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   178
        </au:assertFalse>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   179
  	    <hlm:blocksAddRepository wsid="${wsid}">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   180
  	        <repositorySet>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   181
  	            <repository  name="demo" url="file:${repo}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   182
  	        </repositorySet>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   183
  	    </hlm:blocksAddRepository>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   184
        <au:assertTrue message="The workspace should have a declared repo.">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   185
            <hlm:blocksRepositoryExists wsid="${wsid}" name="demo" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   186
        </au:assertTrue>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   187
	    <hlm:blocksRemoveRepository wsid="${wsid}" repositoryId="1" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   188
        <au:assertFalse message="The workspace should not have any declared repo.">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   189
            <hlm:blocksRepositoryExists wsid="${wsid}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   190
        </au:assertFalse>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   191
    </target>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   192
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   193
    <target name="test-remove-repo-with-name" if="execute.test">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   194
        <au:assertFalse message="The workspace should not have any repo allocted yet.">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   195
            <hlm:blocksRepositoryExists wsid="${wsid}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   196
        </au:assertFalse>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   197
  	    <hlm:blocksAddRepository wsid="${wsid}">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   198
  	        <repositorySet>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   199
  	            <repository  name="demo" url="file:${repo}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   200
  	        </repositorySet>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   201
  	    </hlm:blocksAddRepository>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   202
        <au:assertTrue message="The workspace should have a declared repo.">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   203
            <hlm:blocksRepositoryExists wsid="${wsid}" name="demo" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   204
        </au:assertTrue>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   205
	    <hlm:blocksRemoveRepository wsid="${wsid}" name="demo" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   206
        <au:assertFalse message="The workspace should not have a declared repo.">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   207
            <hlm:blocksRepositoryExists wsid="${wsid}" name="demo" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   208
        </au:assertFalse>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   209
    </target>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   210
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   211
    
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   212
</project>