Skip to content

Commit 89d57bf

Browse files
committed
Clean build results to make sure nothing refers to them while testing
(cherry picked from commit a162979)
1 parent dde532f commit 89d57bf

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

ci.jsonnet

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ local part_definitions = {
7676
environment+: { path+:: ["$MAVEN_HOME/bin"] },
7777
},
7878

79-
build: {
79+
build_no_clean: {
8080
setup+: [["mx", "sversions"]] +
8181
# aot-build.log is used for the build-stats metrics, in other cases it does no harm
8282
jt(["build", "--env", self.mx_env] + self.jt_build_options + ["--"] + self.mx_build_options + ["|", "tee", "aot-build.log"]) +
@@ -86,6 +86,11 @@ local part_definitions = {
8686
],
8787
},
8888

89+
build: $.use.build_no_clean + {
90+
# Clean build results to make sure nothing refers to them while testing
91+
setup+: jt(["mx", "--env", self.mx_env, "clean"]),
92+
},
93+
8994
clone_enterprise: {
9095
setup+: [["mx", "sversions"]] + jt(["checkout_enterprise_revision"]),
9196
},
@@ -273,18 +278,19 @@ local part_definitions = {
273278

274279
run: {
275280
test_unit_tck_specs: {
276-
run+: jt(["test", "unit"]) +
277-
jt(["test", "tck"]) +
278-
jt(["test", "specs"]) +
279-
jt(["test", "specs", ":next"]),
281+
run+: jt(["test", "specs"]) +
282+
jt(["test", "specs", ":next"]) +
283+
jt(["build"]) + # We need mx distributions to run unit tests
284+
jt(["test", "unit"]) +
285+
jt(["test", "tck"]),
280286
},
281287

282288
test_fast: {
283289
run+: jt(["test", "fast"]),
284290
},
285291

286292
lint: {
287-
is_after:: ["$.use.build"],
293+
is_after:: ["$.use.build_no_clean"],
288294
downloads+: {
289295
JDT: { name: "ecj", version: "4.5.1", platformspecific: false },
290296
ECLIPSE: { version: "4.5.2", name: "eclipse", platformspecific: true },
@@ -427,7 +433,7 @@ local composition_environment = utils.add_inclusion_tracking(part_definitions, "
427433

428434
test_builds:
429435
{
430-
"ruby-lint": $.platform.linux + $.cap.gate + $.jdk.v8 + $.use.common + $.env.jvm + $.use.build + $.run.lint + { timelimit: "30:00" },
436+
"ruby-lint": $.platform.linux + $.cap.gate + $.jdk.v8 + $.use.common + $.env.jvm + $.use.build_no_clean + $.run.lint + { timelimit: "30:00" },
431437
} +
432438

433439
{

tool/make-standalone-distribution.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@ set -x
1212
# Build
1313
tool/jt.rb build --env native
1414

15-
release_home=$(tool/jt.rb mx --env native standalone-home ruby)
15+
standalone=$(tool/jt.rb mx --env native standalone-home ruby)
16+
release_home="$PWD/mxbuild/truffleruby-standalone"
17+
rm -rf "$release_home"
18+
cp -R "$standalone" "$release_home"
19+
# Clean build results to make sure nothing refers to them while testing
20+
tool/jt.rb mx --env native clean
21+
rm -rf ../graal/sdk/mxbuild
22+
rm -rf bin lib src
1623

1724
# Test the post-install hook
1825
TRUFFLERUBY_RECOMPILE_OPENSSL=true "$release_home/lib/truffle/post_install_hook.sh"

0 commit comments

Comments
 (0)