I have (I believe) successfully created a script to run sbt in batch and compile and test my automatically assembled scala code. I’d now like to understand the output printed by sbt.
I get something like the following. How do I know whether “it worked”? and what does “it worked” mean?
For example I see the lines
[info] Done compiling.
[success] Total time: 6 s, completed May 11, 2019 12:31:55 PM
Does this mean compile succeeded with no errors, or does it mean sbt successfully ran the compiler which itself might have reported errors and failed to compile?
Also I see the following lines
[info] All tests passed.
[info] Passed: Total 2, Failed 0, Errors 0, Passed 2
[success] Total time: 4 s, completed May 11, 2019 12:32:00 PM
What does success mean? Is it that all tests passed, or that sbt successfully ran the tests, which might have themselves failed.
Is there a way for me to check for success better than grepping the output for certain patterns?
Here is the actual output?
[info] Updated file /private/tmp/jimka/scalain_e/24693/project/build.properties: set sbt.version to 1.2.8
[info] Loading settings for project global-plugins from idea.sbt ...
[info] Loading global plugins from /Users/jimka/.sbt/1.0/plugins
[info] Loading project definition from /private/tmp/jimka/scalain_e/24693/project
[info] Updating ProjectRef(uri("file:/private/tmp/jimka/scalain_e/24693/project/"), "root-24693-build")...
[info] Done updating.
[info] Loading settings for project root-24693 from build.sbt ...
[info] Set current project to greeting (in build file:/private/tmp/jimka/scalain_e/24693/)
[info] Executing in batch mode. For better performance use sbt's shell
[info] Updating ...
[info] Done updating.
[info] Compiling 2 Scala sources to /private/tmp/jimka/scalain_e/24693/target/scala-2.12/classes ...
[info] Done compiling.
[success] Total time: 6 s, completed May 11, 2019 12:31:55 PM
[info] Compiling 1 Scala source to /private/tmp/jimka/scalain_e/24693/target/scala-2.12/test-classes ...
[info] Done compiling.
hello world
hello jim!
[info] GreetingTestSuite:
[info] - greeting
[info] - HW customized greeting
[info] ScalaTest
[info] Run completed in 676 milliseconds.
[info] Total number of tests run: 2
[info] Suites: completed 1, aborted 0
[info] Tests: succeeded 2, failed 0, canceled 0, ignored 0, pending 0
[info] All tests passed.
[info] Passed: Total 2, Failed 0, Errors 0, Passed 2
[success] Total time: 4 s, completed May 11, 2019 12:32:00 PM