Skip to content

Commit 1869436

Browse files
committed
Don't bootstrap on non-bootstrap CI job
The bootstrap is already done on the other job, and even tho it's not so expensive, moving the tests there will help balance the job runtime.
1 parent 5590c2d commit 1869436

File tree

3 files changed

+35
-28
lines changed

3 files changed

+35
-28
lines changed

.drone.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ pipeline:
3535
commands:
3636
- cp -R . /tmp/2/ && cd /tmp/2/
3737
- ./project/scripts/sbt ";dotty-bootstrapped/compile ;dotty-bootstrapped/test"
38+
- ./project/scripts/bootstrapCmdTests
3839

3940
test_sbt:
4041
group: test

project/scripts/bootstrapCmdTests

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/usr/bin/env bash
2+
3+
source cmdTestsCommon.inc.sh
4+
5+
# check that benchmarks can run
6+
"$SBT" "dotty-bench-bootstrapped/jmh:run 1 1 tests/pos/alias.scala"
7+
8+
echo "testing scala.quoted.Expr.run from sbt dotr"
9+
"$SBT" ";dotty-compiler-bootstrapped/dotc tests/run-with-compiler/quote-run.scala; dotty-compiler-bootstrapped/dotr -with-compiler Test" > "$tmp"
10+
grep -qe "val a: scala.Int = 3" "$tmp"
11+
12+
13+
# setup for `dotc`/`dotr` script tests
14+
"$SBT" dist-bootstrapped/pack
15+
16+
# check that `dotc` compiles and `dotr` runs it
17+
echo "testing ./bin/dotc and ./bin/dotr"
18+
clear_out "$OUT"
19+
./bin/dotc "$SOURCE" -d "$OUT"
20+
./bin/dotr -classpath "$OUT" "$MAIN" > "$tmp"
21+
test "$EXPECTED_OUTPUT" = "$(cat "$tmp")"
22+
23+
# check that `dotc -from-tasty` compiles and `dotr` runs it
24+
echo "testing ./bin/dotc -from-tasty and dotr -classpath"
25+
clear_out "$OUT1"
26+
./bin/dotc -from-tasty -classpath "$OUT" -d "$OUT1" "$MAIN"
27+
./bin/dotr -classpath "$OUT1" "$MAIN" > "$tmp"
28+
test "$EXPECTED_OUTPUT" = "$(cat "$tmp")"
29+
30+
# echo ":quit" | ./dist-bootstrapped/target/pack/bin/dotr # not supported by CI
31+
32+
echo "testing ./bin/dotd"
33+
clear_out "$OUT"
34+
./bin/dotd -project Hello -siteroot "$OUT" "$SOURCE"

project/scripts/cmdTests

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -32,34 +32,6 @@ clear_out "$OUT"
3232
"$SBT" ";dotc -d $OUT/out.jar $SOURCE; dotc -decompile -classpath $OUT/out.jar -color:never $MAIN" > "$tmp"
3333
grep -qe "def main(args: scala.Array\[scala.Predef.String\]): scala.Unit =" "$tmp"
3434

35-
echo "testing scala.quoted.Expr.run from sbt dotr"
36-
"$SBT" ";dotty-compiler-bootstrapped/dotc tests/run-with-compiler/quote-run.scala; dotty-compiler-bootstrapped/dotr -with-compiler Test" > "$tmp"
37-
grep -qe "val a: scala.Int = 3" "$tmp"
38-
39-
40-
# setup for `dotc`/`dotr` script tests
41-
"$SBT" dist-bootstrapped/pack
42-
43-
# check that `dotc` compiles and `dotr` runs it
44-
echo "testing ./bin/dotc and ./bin/dotr"
45-
clear_out "$OUT"
46-
./bin/dotc "$SOURCE" -d "$OUT"
47-
./bin/dotr -classpath "$OUT" "$MAIN" > "$tmp"
48-
test "$EXPECTED_OUTPUT" = "$(cat "$tmp")"
49-
50-
# check that `dotc -from-tasty` compiles and `dotr` runs it
51-
echo "testing ./bin/dotc -from-tasty and dotr -classpath"
52-
clear_out "$OUT1"
53-
./bin/dotc -from-tasty -classpath "$OUT" -d "$OUT1" "$MAIN"
54-
./bin/dotr -classpath "$OUT1" "$MAIN" > "$tmp"
55-
test "$EXPECTED_OUTPUT" = "$(cat "$tmp")"
56-
57-
# echo ":quit" | ./dist-bootstrapped/target/pack/bin/dotr # not supported by CI
58-
59-
echo "testing ./bin/dotd"
60-
clear_out "$OUT"
61-
./bin/dotd -project Hello -siteroot "$OUT" "$SOURCE"
62-
6335
## Disabled because of flakeyness, should be changed to not depend on sbt
6436
# echo "running Vulpix meta test"
6537
# tmp=$(mktemp)

0 commit comments

Comments
 (0)