Skip to content

Commit a0f23e6

Browse files
Run ocaml tests in isolated dirs, ensure proper cleanup at the end of the stage (#1260)
1 parent ab791f7 commit a0f23e6

1 file changed

Lines changed: 16 additions & 10 deletions

File tree

Jenkinsfile

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,15 @@ pipeline {
209209
}
210210
}
211211
steps {
212-
unstash "Stanc3Setup"
213-
runShell("""
214-
eval \$(opam env)
215-
dune runtest
216-
""")
212+
dir("${env.WORKSPACE}/dune-tests"){
213+
unstash "Stanc3Setup"
214+
runShell("""
215+
eval \$(opam env)
216+
dune runtest --root=.
217+
""")
218+
}
217219
}
220+
post { always { runShell("rm -rf ${env.WORKSPACE}/dune-tests/*") }}
218221
}
219222
stage("stancjs tests") {
220223
agent {
@@ -225,12 +228,15 @@ pipeline {
225228
}
226229
}
227230
steps {
228-
unstash "Stanc3Setup"
229-
runShell("""
230-
eval \$(opam env)
231-
dune build @runjstest
232-
""")
231+
dir("${env.WORKSPACE}/stancjs-tests"){
232+
unstash "Stanc3Setup"
233+
runShell("""
234+
eval \$(opam env)
235+
dune build @runjstest --root=.
236+
""")
237+
}
233238
}
239+
post { always { runShell("rm -rf ${env.WORKSPACE}/stancjs-tests/*") }}
234240
}
235241
}
236242
}

0 commit comments

Comments
 (0)