summaryrefslogtreecommitdiffstats
path: root/testing-drivers/testdata/incremental/harness/suite.xml
blob: 3a19813e5832b4ed484c3cd820f771ff74d8e4dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd">

<suite>    

    <!-- driven from JUnit by HarnessSelectionTest.testIncrementalSuite() -->
	<!-- 
	      Using OldAjc (no inc-compile), get two errors (updated file not found (b/c cleared?), 
	      deleted file not found.
	 -->

    <!-- 
         test harness ability to update and delete source files to prep for a compile
     -->
     
    <ajc-test dir="sourceDeleted" title="delete file" keywords="incremental-test" 
      comment="moved to ajcTests{Failing}.xml">
        <compile staging="true" options="-incremental" sourceroots="."/>
        <run class="delete.Main"/>
        <inc-compile tag="20">
            <dir-changes removed="delete.DeleteMe"/>
        	<message kind="error" line="6" file="delete/Target.java"/>
        </inc-compile>
        <inc-compile tag="30"/> 
        <run class="delete.Main"/>
    </ajc-test>
    
    <ajc-test dir="sourceAdded" title="add file with class" keywords="incremental-test" >
        <compile staging="true" options="-incremental" sourceroots="."/>
        <run class="main.Main"/>
        <inc-compile tag="20">
            <dir-changes added="main.Target"/>
        </inc-compile>
        <inc-compile tag="30">
            <dir-changes updated="main.Main"/>
        </inc-compile>
        <run class="main.Main"/>
    </ajc-test>

    <ajc-test dir="defaultPackage" title="do everything in default package" keywords="incremental-test" >
        <compile staging="true"  options="-incremental" sourceroots="."/>
        <run class="Main"/>
        <inc-compile tag="20">
            <dir-changes added="Target"/>
        </inc-compile>
        <run class="Target" skipTester="true"/>
        <inc-compile tag="30">
            <dir-changes updated="Main"/>
        </inc-compile>
        <run class="Main" skipTester="true"/>
        <inc-compile tag="40">
            <dir-changes updated="Main" removed="Target"/>
        </inc-compile>
        <run class="Main"/>
    </ajc-test>

    <!-- 
         test harness detection of .class file added, removed, or changed 
         as a result of the compile process. 
         XXX test dir-changes for JavaRun, CompilerRun
         XXX document special handling of dir-changes paths as FQN for .class suffix
         XXX need negative tests, fails reported
     -->
    <ajc-test dir="classAdded" title="expect class added" keywords="incremental-test" >
        <compile staging="true"  options="-incremental" sourceroots="."/>
        <run class="main.Main"/>
        <inc-compile tag="20" >
            <dir-changes added="main.Target"/>
        </inc-compile>
        <run class="main.Main"  skipTester="true"/>
    </ajc-test>

    <ajc-test dir="classRemoved" title="expect class removed" keywords="incremental-test" >
        <compile staging="true"  options="-incremental" sourceroots="."/>
        <run class="main.Main"/>
        <inc-compile tag="20">
            <dir-changes removed="main.Target"/>
        </inc-compile>
        <run class="main.Main"/>
    </ajc-test>

    <ajc-test dir="classUpdated" title="expect class updated" keywords="incremental-test" >
        <compile staging="true"  options="-incremental" sourceroots="."/>
        <run class="main.Main"/>
        <inc-compile tag="20">
            <dir-changes updated="main.Main"/>
        </inc-compile>
        <run class="main.Main"/>
    </ajc-test>

    <ajc-test dir="expClasses" title="expected class tree" keywords="incremental-test" >
        <compile files="Main.java">
            <dir-changes expDir="exp"/>
        </compile>
        <run class="Main"/>
    </ajc-test>


</suite>