-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbreak.build.gradle
56 lines (49 loc) · 1.54 KB
/
break.build.gradle
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
// For Travis-CI
// We use a multi-project build to run tests on Travis-CI.
// Non-Gradle projects are configured here, so we can execute command-line stuff.
def addShellPrefix = { command ->
def commandArray = new String[3]
commandArray[0] = "sh"
commandArray[1] = "-c"
commandArray[2] = command
return commandArray
}
def runCommand = { command, workingDir ->
def process = new ProcessBuilder(addShellPrefix(command))
.directory(workingDir)
.redirectErrorStream(true)
.start()
process.inputStream.eachLine {println it}
process.waitFor()
return process.exitValue()
}
println "TRACER ---------------------- "
configure(subprojects.find {it.name == 'javascript'}) {
task check {
doLast {
def retVal = runCommand("npm install", projectDir)
assert retVal == 0
retVal = runCommand("npm run test-single-run", projectDir)
assert retVal == 0
println "TRACER javascript tests passed"
}
}
}
configure(subprojects.find {it.name == 'python'}) {
task check {
doLast {
def retVal = runCommand("python test_gol.py", projectDir)
assert retVal == 0
println "TRACER python tests passed"
}
}
}
/*
configure(subprojects.find {it.name == 'ruby'}) {
task check << {
def retVal = runCommand("rake test", projectDir)
assert retVal == 0
println "TRACER ruby tests passed"
}
}
*/