Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/test/functional/cmdLineTests/cmdlinetestertests/cmdlinetests.xml
6004 views
1
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
2
3
<!--
4
Copyright (c) 2009, 2021 IBM Corp. and others
5
6
This program and the accompanying materials are made available under
7
the terms of the Eclipse Public License 2.0 which accompanies this
8
distribution and is available at https://www.eclipse.org/legal/epl-2.0/
9
or the Apache License, Version 2.0 which accompanies this distribution and
10
is available at https://www.apache.org/licenses/LICENSE-2.0.
11
12
This Source Code may also be made available under the following
13
Secondary Licenses when the conditions for such availability set
14
forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
15
General Public License, version 2 with the GNU Classpath
16
Exception [1] and GNU General Public License, version 2 with the
17
OpenJDK Assembly Exception [2].
18
19
[1] https://www.gnu.org/software/classpath/license.html
20
[2] http://openjdk.java.net/legal/assembly-exception.html
21
22
SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
23
-->
24
25
<!DOCTYPE suite SYSTEM "cmdlinetester.dtd">
26
27
<suite id="CmdLineTester Tests" timeout="600">
28
29
<variable name="J9CMDLINE" value="$EXE$ -DRESJAR=$Q$$RESJAR$$Q$ -DTESTDIR=$Q$$TESTDIR$$Q$ -DCMDLINETESTERJAR=$Q$$CMDLINETESTERJAR$$Q$ -DRUN_SCRIPT_STRING=$Q$$RUN_SCRIPT_STRING$$Q$ -Dcmdlinetester.test=testval -jar $Q$$CMDLINETESTERJAR$$Q$ -explainExcludes -config $Q$$TESTDIR$$file.separator$" />
30
31
<test id="Test 1 (correct number of passes/fails reported)">
32
<command>$J9CMDLINE$test1.xml$Q$</command>
33
34
<!-- CmdLineTester needs at least one "success" output; you can think of
35
the second output as also being "required"
36
-->
37
<return value="0" type="required" />
38
<output regex="yes" type="required">Number of PASSED tests: 8 out of 8</output>
39
<output regex="yes" type="success">Number of FAILED tests: 0 out of 8</output>
40
41
</test>
42
43
<test id="Test 2 (variables in for loop)">
44
<command>$J9CMDLINE$test2.xml$Q$</command>
45
<return value="0" type="required" />
46
<output regex="yes" type="success">Number of FAILED tests: 0 out of \d</output>
47
</test>
48
49
<test id="Test 3 (simple variable evaluation loop)">
50
<command>$J9CMDLINE$test3.xml$Q$</command>
51
<return value="1" type="required" />
52
<output regex="yes" type="success">The variable "LOOP1" with value "$$LOOP1$$" cannot be resolved because it refers to itself somewhere along the variable substitution chain.</output>
53
</test>
54
55
<test id="Test 4 (not as simple variable evaluation loop)">
56
<command>$J9CMDLINE$test4.xml$Q$</command>
57
<return value="1" type="required" />
58
<output regex="yes" type="success">The variable "LOOP2" with value "$$LOOP2a$$" cannot be resolved because it refers to itself somewhere along the variable substitution chain.</output>
59
</test>
60
61
<test id="Test 5 (long variable evaluation loop)">
62
<command>$J9CMDLINE$test5.xml$Q$</command>
63
<return value="1" type="required" />
64
<output regex="yes" type="success">The variable "LOOP3" with value "$$TEMP11a$$" cannot be resolved because it refers to itself somewhere along the variable substitution chain.</output>
65
</test>
66
67
<test id="Test 6 (even longer variable evaluation loop)">
68
<command>$J9CMDLINE$test6.xml$Q$</command>
69
<return value="1" type="required" />
70
<output regex="yes" type="success">The variable "LOOP3" with value "$$TEMP11a$$" cannot be resolved because it refers to itself somewhere along the variable substitution chain.</output>
71
</test>
72
73
<test id="Test 7 (trying to fool loop detector)">
74
<command>$J9CMDLINE$test7.xml$Q$</command>
75
<return value="0" type="required" />
76
<output regex="yes" type="success">Number of FAILED tests: 0 out of \d</output>
77
</test>
78
79
<test id="Test 8 (trying to fool loop detector again)">
80
<command>$J9CMDLINE$test8.xml$Q$</command>
81
<return value="0" type="required" />
82
<output regex="yes" type="success">Number of FAILED tests: 0 out of \d</output>
83
</test>
84
85
<test id="Test 9 (variable does not exist)">
86
<command>$J9CMDLINE$test9.xml$Q$</command>
87
<return value="1" type="required" />
88
<output regex="yes" type="success">The variable "NO_EXIST" does not exist; original string used to construct the variable name was "NO_EXIST"</output>
89
</test>
90
91
<test id="Test 10 (long non-looping variable chain)">
92
<command>$J9CMDLINE$test10.xml$Q$</command>
93
<return value="0" type="required" />
94
<output regex="yes" type="success">Number of FAILED tests: 0 out of \d</output>
95
</test>
96
97
<test id="Test 11 (long looping variable chain)">
98
<command>$J9CMDLINE$test11.xml$Q$</command>
99
<return value="1" type="required" />
100
<output regex="yes" type="success">The variable "TEMP0" with value "$$TEMP1$$" cannot be resolved because it refers to itself somewhere along the variable substitution chain.</output>
101
</test>
102
103
<test id="Test 12 (curlies outside of dollar signs)">
104
<command>$J9CMDLINE$test12.xml$Q$</command>
105
<return value="0" type="required" />
106
<output regex="yes" type="success">Number of FAILED tests: 0 out of \d</output>
107
</test>
108
109
<test id="Test 13 (unclosed dollar sign before closing curly, discovered by expandVariable())">
110
<command>$J9CMDLINE$test13.xml$Q$</command>
111
<return value="1" type="required" />
112
<output regex="yes" type="success">The variable "TEMP0" with value "$$HI{$$HI}$$" cannot be resolved because it contains a '}' after an opening '$$'.</output>
113
</test>
114
115
<test id="Test 14 (unclosed dollar sign before closing curly, discovered by evaluateVariables())">
116
<command>$J9CMDLINE$test14.xml$Q$</command>
117
<return value="1" type="required" />
118
<output regex="yes" type="success">The variable "TEMP0" with value "$$HI}$$" cannot be resolved because it contains a '}' after an opening '$$'.</output>
119
</test>
120
121
<test id="Test 15 (unclosed '{' (no matching '}' before end of String), version 1)">
122
<command>$J9CMDLINE$test15.xml$Q$</command>
123
<return value="1" type="required" />
124
<output regex="yes" type="success">The variable "TEMP0" with value "$$HI{" cannot be resolved because it is missing at least one token signifying the end of a variable ('$$' or '}'); the first unbalanced start token is a '{'</output>
125
</test>
126
127
<test id="Test 16 (unclosed '{' (no matching '}' before end of String), version 2)">
128
<command>$J9CMDLINE$test16.xml$Q$</command>
129
<return value="1" type="required" />
130
<output regex="yes" type="success">The variable "TEMP0" with value "$$HI{HI{}$$" cannot be resolved because it is missing at least one token signifying the end of a variable ('$$' or '}'); the first unbalanced start token is a '$$'</output>
131
</test>
132
133
<test id="Test 17 (unclosed '$$' (no matching '$$' before end of String))">
134
<command>$J9CMDLINE$test17.xml$Q$</command>
135
<return value="1" type="required" />
136
<output regex="yes" type="success">The variable "TEMP0" with value "$$HI" cannot be resolved because it is missing at least one token signifying the end of a variable ('$$' or '}'); the first unbalanced start token is a '$$'</output>
137
</test>
138
139
<test id="Test 18 (_variables Map overrides System.properties())">
140
<command>$J9CMDLINE$test18.xml$Q$</command>
141
<return value="0" type="required" />
142
<output regex="yes" type="success">Number of FAILED tests: 0 out of \d</output>
143
</test>
144
145
<test id="Test 19 (_variables Map does not override System.properties())">
146
<command>$J9CMDLINE$test19.xml$Q$</command>
147
<return value="0" type="required" />
148
<output regex="yes" type="success">Number of FAILED tests: 0 out of \d</output>
149
</test>
150
151
<test id="Test 20 ($$$$$$$$$$ should give error (unclosed variable))">
152
<command>$J9CMDLINE$test20.xml$Q$</command>
153
<return value="1" type="required" />
154
<output regex="yes" type="success">The variable "TEMP" with value "$$$$$$$$$$" cannot be resolved because it is missing at least one token signifying the end of a variable ('$$' or '}'); the first unbalanced start token is a '$$'</output>
155
</test>
156
157
<test id="Test 21 ($$$$$$$$$$$$ should be fine)">
158
<command>$J9CMDLINE$test21.xml$Q$</command>
159
<return value="0" type="required" />
160
<output regex="yes" type="success">Number of FAILED tests: 0 out of \d</output>
161
</test>
162
163
<test id="Test 22 ($$HI$$$$ should give error (unclosed variable))">
164
<command>$J9CMDLINE$test22.xml$Q$</command>
165
<return value="1" type="required" />
166
<output regex="yes" type="success">The variable "TEMP" with value "$$HI$$$$" cannot be resolved because it is missing at least one token signifying the end of a variable ('$$' or '}'); the first unbalanced start token is a '$$'</output>
167
</test>
168
169
<test id="Test 23 ($$HI$$$$BYE$$$$HI$$ should be fine)">
170
<command>$J9CMDLINE$test23.xml$Q$</command>
171
<return value="0" type="required" />
172
<output regex="yes" type="success">Number of FAILED tests: 0 out of \d</output>
173
</test>
174
175
<test id="Test 24 (outputting number of failed tests)">
176
<command>echo FINAL failed tests: $cmdlinetester.failed_tests$</command>
177
<return value="0" type="required" />
178
<output regex="yes" type="success">FINAL failed tests: \d</output>
179
</test>
180
181
</suite>
182
183
184
185