Skip to content

Commit 7b2619d

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 0bf9cdd commit 7b2619d

File tree

3 files changed

+38
-33
lines changed

3 files changed

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

project/scripts/cmdTests

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22

33
source cmdTestsCommon.inc.sh
44

5-
# check that benchmarks can run
6-
"$SBT" "dotty-bench/jmh:run 1 1 tests/pos/alias.scala"
7-
"$SBT" "dotty-bench-bootstrapped/jmh:run 1 1 tests/pos/alias.scala"
8-
"$SBT" "dotty-bench-bootstrapped/jmh:run 1 1 -with-compiler compiler/src/dotty/tools/dotc/core/Types.scala"
9-
105
# check that `sbt dotc` compiles and `sbt dotr` runs it
116
echo "testing sbt dotc and dotr"
127
"$SBT" ";dotc $SOURCE -d $OUT ;dotr -classpath $OUT $MAIN" > "$tmp"
@@ -33,34 +28,6 @@ clear_out "$OUT"
3328
"$SBT" ";dotc -d $OUT/out.jar $SOURCE; dotc -decompile -classpath $OUT/out.jar -color:never $MAIN" > "$tmp"
3429
grep -qe "def main(args: scala.Array\[scala.Predef.String\]): scala.Unit =" "$tmp"
3530

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

0 commit comments

Comments
 (0)