buildframework/helium/tests/minibuilds/docs/test_docs_minibuild.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

<?xml version="1.0" encoding="UTF-8"?>
<!-- 
============================================================================ 
Name        : test_docs_minibuild.ant.xml 
Part of     : Helium 

Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
This component and the accompanying materials are made available
under the terms of the License "Eclipse Public License v1.0"
which accompanies this distribution, and is available
at the URL "http://www.eclipse.org/legal/epl-v10.html".

Initial Contributors:
Nokia Corporation - initial contribution.

Contributors:

Description:

============================================================================
-->
<project name="test_docs_minibuild" xmlns:au="org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
    <description>
        Targets to test docs minibuild job 
    </description>
    <property name="helium.dir" location="../../.." />
    <property name="cache.dir" value="build/cache" />
    <import file="../../../build.xml" />

    <target name="setUp">
        <mkdir dir="${doc.build.dir}\docs_minibuild"/>
        <antcall target="docs-database"/>
    </target>
       
    <target name="test-check-minibuild-docs-fails">
         <!-- Insert one undocumented property and check that we fail -->
         <au:expectfailure>
             <antcall target="build-textdocs">
                 <param name="doc.temp.dir" value="${helium.dir}\tests\data\doc\input_for_failure"/>
                 <param name="doc.build.dir" value="${doc.build.dir}\docs_minibuild"/>
             </antcall>
        </au:expectfailure>        
        <au:assertLogContains text="EXCEPTION: Found 1 error(s) of type '(ERROR/3) Missing API doc for &lt;property&gt;'"/>
     </target>

    <target name="test-check-minibuild-docs-succeeds">
       <antcall target="build-textdocs">
                 <param name="doc.temp.dir" value="${helium.dir}\tests\data\doc\\input_for_pass"/>
            <param name="doc.build.dir" value="${doc.build.dir}\docs_minibuild"/>
        </antcall>
        <au:assertLogDoesntContain text="EXCEPTION: Found 1 error(s) of type '(ERROR/3) Missing API doc for &lt;property&gt;'"/>
    </target>

    <target name="tearDown">
        <delete dir="${doc.build.dir}\.."/>
    </target>
    
</project>