@@ -24,6 +24,7 @@ set _TESTS_POS_DIR=%_ROOT_DIR%test\pos
24
24
25
25
set _SOURCE = tests/pos/HelloWorld.scala
26
26
set _MAIN = HelloWorld
27
+ set _TASTY = HelloWorld.tasty
27
28
set _EXPECTED_OUTPUT = hello world
28
29
29
30
call :args %*
@@ -142,16 +143,16 @@ echo -timer display total execution time
142
143
echo -verbose display environment settings
143
144
echo Subcommands:
144
145
echo arch[ives] generate gz/zip archives (after bootstrap)
145
- echo boot[strap] generate compiler bootstrap (after compile)
146
+ echo boot[strap] generate+test bootstrapped compiler (after compile)
146
147
echo cleanall clean project (sbt+git) and quit
147
148
echo clone update submodules
148
- echo compile generate compiler 1st stage (after clone)
149
+ echo compile generate+test 1st stage compiler (after clone)
149
150
echo doc[umentation] generate documentation (after bootstrap)
150
151
echo help display this help message
151
152
echo Advanced subcommands (no deps):
152
153
echo arch[ives]-only generate ONLY gz/zip archives
153
- echo boot[strap]-only generate ONLY compiler bootstrap
154
- echo compile-only generate ONLY compiler 1st stage
154
+ echo boot[strap]-only generate+test ONLY bootstrapped compiler
155
+ echo compile-only generate+test ONLY 1st stage compiler
155
156
echo doc[umentation]-only] generate ONLY documentation
156
157
157
158
goto :eof
@@ -176,11 +177,17 @@ rem full path is required for sbt to run successfully
176
177
for /f %%i in ('where sbt.bat') do set _SBT_CMD = %%i
177
178
178
179
if %_VERBOSE% == 1 (
179
- for /f %%i in ('where git.exe') do set _GIT_CMD1 = %%i
180
- echo _GIT_CMD=!_GIT_CMD1!
181
- echo _SBT_CMD=%_SBT_CMD%
182
- echo JAVA_OPTS=%JAVA_OPTS%
183
- echo SBT_OPTS=%SBT_OPTS%
180
+ for /f %%i in ('where git.exe') do set __GIT_CMD1 = %%i
181
+ set __GIT_BRANCH = unknown
182
+ for /f " tokens=1-4,*" %%f in ('!__GIT_CMD1! branch -vv ^ | findstr /b *') do set __GIT_BRANCH = %%g %%i
183
+ echo Tool paths
184
+ echo GIT_CMD=!__GIT_CMD1!
185
+ echo SBT_CMD=%_SBT_CMD%
186
+ echo Tool options
187
+ echo JAVA_OPTS=%JAVA_OPTS%
188
+ echo SBT_OPTS=%SBT_OPTS%
189
+ echo Current Git branch
190
+ echo !__GIT_BRANCH!
184
191
echo .
185
192
)
186
193
if %_TIMER% == 1 (
@@ -262,6 +269,11 @@ call "%_SBT_CMD%" ";dotc -decompile -color:never -classpath %_OUT_DIR% %_MAIN%"
262
269
call :grep " def main(args: scala.Array\[scala.Predef.String\]): scala.Unit =" " %_TMP_FILE% "
263
270
if not %_EXITCODE% == 0 goto :eof
264
271
272
+ echo testing sbt dotc -decompile from file
273
+ call " %_SBT_CMD% " " ;dotc -decompile -color:never %_OUT_DIR% \%_TASTY% " > " %_TMP_FILE% "
274
+ call :grep " def main(args: scala.Array\[scala.Predef.String\]): scala.Unit =" " %_TMP_FILE% "
275
+ if not %_EXITCODE% == 0 goto :eof
276
+
265
277
echo testing sbt dotr with no -classpath
266
278
call :clear_out " %_OUT_DIR% "
267
279
if %_DEBUG% == 1 echo [%_BASENAME% ] " %_SBT_CMD% " " ;dotc %_SOURCE% ; dotr %_MAIN% " ^ > " %_TMP_FILE% "
0 commit comments