Skip to content

Commit c26ff2b

Browse files
committed
Added support for outputLine
1 parent c023845 commit c26ff2b

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

build.gradle

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class Tags {
1515
List<String> jVMArgs = []
1616
String exec = null
1717
String runFirst = null
18+
String outputLine = null
1819
private List<String> lines
1920
private String block
2021
def Tags(List<String> lines) {
@@ -39,6 +40,12 @@ class Tags {
3940
jVMArgs = jvmArgString.split(' ')
4041
exec = extract('Exec:')
4142
runFirst = extract('RunFirst:')
43+
lines.each {
44+
if(it =~ /\\/* Output:/) {
45+
outputLine = it.trim()
46+
println outputLine
47+
}
48+
}
4249
}
4350
private def testFor(String marker) {
4451
return block.contains("// {" + marker + "}")
@@ -137,6 +144,8 @@ subprojects {
137144

138145
String basePath = it.absolutePath.replaceAll('\\.java', '')
139146
File outFile = new File(basePath + '.out')
147+
if(tags.outputLine)
148+
outFile.write(tags.outputLine + "\n")
140149
File errFile = new File(basePath + '.err')
141150
OutputStream runStandardOutput = new TeeOutputStream(new FileOutputStream(outFile), System.out)
142151
OutputStream runErrorOutput = new TeeOutputStream(new FileOutputStream(errFile), System.err)

0 commit comments

Comments
 (0)