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

Conversation

liufengyun
Copy link
Contributor

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

.drone.yml Outdated
- ./dist-bootstrapped/target/pack/bin/dotr Test
- echo ":quit" | ./dist-bootstrapped/target/pack/bin/dotr
- ./dist-bootstrapped/target/pack/bin/dotd -project Hello tests/run/hello.scala

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@allanrenucci I'm not sure if it's the best way to do it, could you please advise?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would probably merge this with project/scripts/sbt/sbtTests. The script tests the commands but within sbt.

./dist-bootstrapped/target/pack/bin/dotc tests/run/hello.scala
./dist-bootstrapped/target/pack/bin/dotr Test
echo ":quit" | ./dist-bootstrapped/target/pack/bin/dotr
mkdir -p _site && ./dist-bootstrapped/target/pack/bin/dotd -project Hello -siteroot _site tests/run/hello.scala
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add set -eux under #!/usr/bin/env bash otherwise the exit code of the script will be the result of the last command ran

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@@ -1,5 +1,7 @@
#!/usr/bin/env bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file seems redundant to me now. I would merge it with cmdTests


./project/scripts/sbt ";dist-bootstrapped/pack"
./dist-bootstrapped/target/pack/bin/dotc tests/run/hello.scala
./dist-bootstrapped/target/pack/bin/dotr Test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can remove the three lines above. Lines 82-83 already exercise this

Copy link
Contributor

@allanrenucci allanrenucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise LGTM

./dist-bootstrapped/target/pack/bin/dotc tests/run/hello.scala
./dist-bootstrapped/target/pack/bin/dotr Test
# echo ":quit" | ./dist-bootstrapped/target/pack/bin/dotr # not supported by CI
mkdir -p _site && ./dist-bootstrapped/target/pack/bin/dotd -project Hello -siteroot _site tests/run/hello.scala
Copy link
Contributor

@allanrenucci allanrenucci Jan 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use ./bin/dotd instead

EDIT: Oups we don't have it. My bad. Maybe add an alias?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants