Skip to content

Fix #3886: add tests for dotc/dotr/dotd #3892

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jan 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,14 @@ pipeline:
commands:
- cp -R . /tmp/1/ && cd /tmp/1/
- ./project/scripts/sbt ";compile ;test"
- ./project/scripts/sbtTests
- ./project/scripts/cmdTests

test_bootstrapped:
group: test
image: lampepfl/dotty:2018-01-17
commands:
- cp -R . /tmp/2/ && cd /tmp/2/
- ./project/scripts/sbt ";dotty-bootstrapped/compile ;dotty-bootstrapped/test"
- ./project/scripts/sbtBootstrappedTests

test_optimised:
group: test
Expand Down
5 changes: 5 additions & 0 deletions bin/dotd
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" >& /dev/null && pwd)/.."

eval "$ROOT/bin/common" "$ROOT/dist-bootstrapped/target/pack/bin/dotd" "$@"
26 changes: 26 additions & 0 deletions project/scripts/sbtTests → project/scripts/cmdTests
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

set -eux

# check that benchmarks can run
./project/scripts/sbt "dotty-bench/jmh:run 1 1 tests/pos/alias.scala"

Expand Down Expand Up @@ -66,3 +68,27 @@ else
echo "failed output check"
exit -1
fi


# check that benchmarks can run
./project/scripts/sbt "dotty-bench-bootstrapped/jmh:run 1 1 tests/pos/alias.scala"

# setup for `dotc`/`dotr` script tests
./project/scripts/sbt dist-bootstrapped/pack

# check that `dotc` compiles and `dotr` runs it
echo "testing ./bin/dotc and ./bin/dotr"
mkdir -p out/scriptedtest0
./bin/dotc tests/pos/sbtDotrTest.scala -d out/scriptedtest0
./bin/dotr -classpath out/scriptedtest0 dotrtest.Test

# check that `dotc -from-tasty` compiles and `dotr` runs it
echo "testing ./bin/dotc -from-tasty and dotr -classpath"
mkdir -p out/scriptedtest1
mkdir -p out/scriptedtest2
./bin/dotc tests/pos/sbtDotrTest.scala -d out/scriptedtest1/
./bin/dotc -from-tasty -classpath out/scriptedtest1/ -d out/scriptedtest2/ dotrtest.Test
./bin/dotr -classpath out/scriptedtest2/ dotrtest.Test

# echo ":quit" | ./dist-bootstrapped/target/pack/bin/dotr # not supported by CI
mkdir -p _site && ./bin/dotd -project Hello -siteroot _site tests/run/hello.scala
33 changes: 0 additions & 33 deletions project/scripts/sbtBootstrappedTests

This file was deleted.