Skip to content

Commit 764d3fe

Browse files
authored
Merge pull request #3892 from dotty-staging/fix-3886
Fix #3886: add tests for dotc/dotr/dotd
2 parents ea18e25 + df14e43 commit 764d3fe

File tree

4 files changed

+32
-35
lines changed

4 files changed

+32
-35
lines changed

.drone.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,14 @@ pipeline:
2727
commands:
2828
- cp -R . /tmp/1/ && cd /tmp/1/
2929
- ./project/scripts/sbt ";compile ;test"
30-
- ./project/scripts/sbtTests
30+
- ./project/scripts/cmdTests
3131

3232
test_bootstrapped:
3333
group: test
3434
image: lampepfl/dotty:2018-01-17
3535
commands:
3636
- cp -R . /tmp/2/ && cd /tmp/2/
3737
- ./project/scripts/sbt ";dotty-bootstrapped/compile ;dotty-bootstrapped/test"
38-
- ./project/scripts/sbtBootstrappedTests
3938

4039
test_optimised:
4140
group: test

bin/dotd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" >& /dev/null && pwd)/.."
4+
5+
eval "$ROOT/bin/common" "$ROOT/dist-bootstrapped/target/pack/bin/dotd" "$@"

project/scripts/sbtTests renamed to project/scripts/cmdTests

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env bash
22

3+
set -eux
4+
35
# check that benchmarks can run
46
./project/scripts/sbt "dotty-bench/jmh:run 1 1 tests/pos/alias.scala"
57

@@ -66,3 +68,27 @@ else
6668
echo "failed output check"
6769
exit -1
6870
fi
71+
72+
73+
# check that benchmarks can run
74+
./project/scripts/sbt "dotty-bench-bootstrapped/jmh:run 1 1 tests/pos/alias.scala"
75+
76+
# setup for `dotc`/`dotr` script tests
77+
./project/scripts/sbt dist-bootstrapped/pack
78+
79+
# check that `dotc` compiles and `dotr` runs it
80+
echo "testing ./bin/dotc and ./bin/dotr"
81+
mkdir -p out/scriptedtest0
82+
./bin/dotc tests/pos/sbtDotrTest.scala -d out/scriptedtest0
83+
./bin/dotr -classpath out/scriptedtest0 dotrtest.Test
84+
85+
# check that `dotc -from-tasty` compiles and `dotr` runs it
86+
echo "testing ./bin/dotc -from-tasty and dotr -classpath"
87+
mkdir -p out/scriptedtest1
88+
mkdir -p out/scriptedtest2
89+
./bin/dotc tests/pos/sbtDotrTest.scala -d out/scriptedtest1/
90+
./bin/dotc -from-tasty -classpath out/scriptedtest1/ -d out/scriptedtest2/ dotrtest.Test
91+
./bin/dotr -classpath out/scriptedtest2/ dotrtest.Test
92+
93+
# echo ":quit" | ./dist-bootstrapped/target/pack/bin/dotr # not supported by CI
94+
mkdir -p _site && ./bin/dotd -project Hello -siteroot _site tests/run/hello.scala

project/scripts/sbtBootstrappedTests

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)