@@ -402,7 +402,7 @@ if [ "${RestorePackages:-true}" = 'true' ]; then
402402fi
403403
404404if [" $BUILD_VS " = ' 1' ]; then
405- eval " $nugetexe restore vsintegration/packages.config -PackagesDirectory packages -ConfigFile$_nugetconfig "
405+ eval " $_nugetexe restore vsintegration/packages.config -PackagesDirectory packages -ConfigFile$_nugetconfig "
406406if [$? -ne 0 ]; then
407407 failwith" Nuget restore failed"
408408fi
@@ -447,16 +447,12 @@ if [ "$BUILD_PROTO" = '1' ]; then
447447 {pushd ./lkg/fsc&& eval " $_dotnetexe restore" && popd ; }|| failwith" dotnet restore failed"
448448 {pushd ./lkg/fsi&& eval " $_dotnetexe restore" && popd ; }|| failwith" dotnet restore failed"
449449
450- # pushd ./lkg/fsc && $_dotnetexe publish project.json --no-build -o ${_scriptdir}Tools/lkg -r $_architecture && popd && if ERRORLEVEL 1 echo Error: dotnet publish failed && goto :failure
451- # pushd ./lkg/fsi && $_dotnetexe publish project.json --no-build -o ${_scriptdir}Tools/lkg -r $_architecture && popd && if ERRORLEVEL 1 echo Error: dotnet publish failed && goto :failure
450+ { pushd ./lkg/fsc&& eval " $_dotnetexe publish project.json --no-build -o${_scriptdir} Tools/lkg -r$_architecture " && popd ; } || failwith " dotnet publish failed"
451+ { pushd ./lkg/fsi&& eval " $_dotnetexe publish project.json --no-build -o${_scriptdir} Tools/lkg -r$_architecture " && popd ; } || failwith " dotnet publish failed"
452452
453- # echo $_msbuildexe $msbuildflags src/fsharp-proto-build.proj
454- # $_msbuildexe $msbuildflags src/fsharp-proto-build.proj
455- # @if ERRORLEVEL 1 echo Error: compiler proto build failed && goto :failure
453+ { printeval" $_msbuildexe $msbuildflags src/fsharp-proto-build.proj" ; }|| failwith" compiler proto build failed"
456454
457- # echo $_ngenexe install Proto/net40/bin/fsc-proto.exe /nologo
458- # $_ngenexe install Proto/net40/bin/fsc-proto.exe /nologo
459- # @if ERRORLEVEL 1 echo Error: NGen of proto failed && goto :failure
455+ # { printeval "$_ngenexe install Proto/net40/bin/fsc-proto.exe /nologo"; } || failwith "NGen of proto failed"
460456else
461457# Build proto-compiler and libs
462458 { printeval" $_msbuildexe $msbuildflags src/fsharp-proto-build.proj /p:UseMonoPackaging=true" ; }|| failwith" compiler proto build failed"
512508printf " WHERE_ARG_NUNIT=%s\n" " $WHERE_ARG_NUNIT "
513509
514510export NUNITPATH=" tests/fsharpqa/testenv/bin/nunit/"
515- export NUNIT3_CONSOLE=" packages/NUnit.Console.3.0.0/tools/ nunit3-console.exe"
511+ export NUNIT3_CONSOLE=" ${NUNITPATH} nunit3-console.exe"
516512export link_exe=" ${_scriptdir} packages/VisualCppTools.14.0.24519-Pre/lib/native/bin/link.exe"
517513if [! -f " $link_exe " ]; then
518514 failwith" failed to find '$link_exe ' use nuget to restore the VisualCppTools package"
@@ -547,52 +543,18 @@ if [ "$TEST_NET40_FSHARP_SUITE" = '1' ]; then
547543 ERRORARG=" --err:\" $ERRORFILE \" "
548544fi
549545
550- if ! printeval" $NUNIT3_CONSOLE --verbose\" $FSCBINPATH /FSharp.Tests.FSharpSuite.dll\" --framework:V4.0 --work:\" $FSCBINPATH \" $OUTPUTARG $ERRORARG --result:\" $XMLFILE ;format=nunit3\" $WHERE_ARG_NUNIT " ; then
551- # TODO: Don't need to use 'cat' here -- can just use stream redirection to write the file directly to stdout/stderr
552- cat" $ERRORFILE "
546+ if ! printeval" mono$NUNIT3_CONSOLE --verbose\" $FSCBINPATH /FSharp.Tests.FSharpSuite.dll\" --framework:V4.0 --work:\" $FSCBINPATH \" $OUTPUTARG $ERRORARG --result:\" $XMLFILE ;format=nunit3\" $WHERE_ARG_NUNIT " ; then
547+ if [-f " $ERRORFILE " ]; then
548+ echo -----------------------------------------------------------------
549+ cat" $ERRORFILE "
550+ fi
553551echo -----------------------------------------------------------------
554552echo Error: Running tests net40-fsharp failed, see log above -- FAILED
555553echo -----------------------------------------------------------------
556554exit 1
557555fi
558556fi
559557
560- # ---------------- net40-fsharpqa -----------------------
561-
562- OSARCH=" ${PROCESSOR_ARCHITECTURE:- x64} "
563-
564- # Set this to 1 in order to use an external compiler host process
565- # This only has an effect when running the FSHARPQA tests, but can
566- # greatly speed up execution since fsc.exe does not need to be spawned thousands of times
567- HOSTED_COMPILER=1
568-
569- if [" $TEST_NET40_FSHARPQA_SUITE " = ' 1' ]; then
570-
571- export FSC=" $FSCBINPATH /fsc.exe"
572- export FSCOREDLLPATH=" $FSCBINPATH /FSharp.Core.dll"
573- export PATH=" $FSCBINPATH ;$PATH "
574-
575- if ! command -v perl> /dev/null; then
576- failwith" perl is not in the PATH, it is required for the net40-fsharpqa test suite"
577- fi
578-
579- OUTPUTFILE=test-net40-fsharpqa-results.log
580- ERRORFILE=test-net40-fsharpqa-errors.log
581- FAILENV=test-net40-fsharpqa-errors
582-
583- {pushd " ${_scriptdir} tests/fsharpqa/source" && \
584- printeval" perl tests/fsharpqa/testenv/bin/runall.pl -resultsroot$RESULTSDIR -results$OUTPUTFILE -log$ERRORFILE -fail$FAILENV -cleanup:no$TTAGS_ARG_RUNALL $PARALLEL_ARG " && \
585- popd ; }|| {
586- cat" $RESULTSDIR /$OUTPUTFILE "
587- echo -----------------------------------------------------------------
588- cat" $RESULTSDIR /$ERRORFILE "
589- echo -----------------------------------------------------------------
590- echo Error: Running tests net40-fsharpqa failed, see logs above -- FAILED
591- echo -----------------------------------------------------------------
592- exit 1
593- }
594- fi
595-
596558# ---------------- net40-compilerunit -----------------------
597559
598560if [" $TEST_NET40_COMPILERUNIT_SUITE " = ' 1' ]; then
@@ -608,11 +570,15 @@ if [ "$TEST_NET40_COMPILERUNIT_SUITE" = '1' ]; then
608570 OUTPUTARG=" --output:\" $OUTPUTFILE \" "
609571fi
610572
611- if ! printeval" $NUNIT3_CONSOLE --verbose --framework:V4.0 --result:\" $XMLFILE ;format=nunit3\" $OUTPUTARG $ERRORARG --work:\" $FSCBINPATH \" \" $FSCBINPATH /../../net40/bin/FSharp.Compiler.Unittests.dll\" $WHERE_ARG_NUNIT " ; then
612- echo -----------------------------------------------------------------
613- cat" $OUTPUTFILE "
614- echo -----------------------------------------------------------------
615- cat" $ERRORFILE "
573+ if ! printeval" mono$NUNIT3_CONSOLE --verbose --framework:V4.0 --result:\" $XMLFILE ;format=nunit3\" $OUTPUTARG $ERRORARG --work:\" $FSCBINPATH \" \" $FSCBINPATH /../../net40/bin/FSharp.Compiler.Unittests.dll\" $WHERE_ARG_NUNIT " ; then
574+ if [-f " $OUTPUTFILE " ]; then
575+ echo -----------------------------------------------------------------
576+ cat" $OUTPUTFILE "
577+ fi
578+ if [-f " $ERRORFILE " ]; then
579+ echo -----------------------------------------------------------------
580+ cat" $ERRORFILE "
581+ fi
616582echo -----------------------------------------------------------------
617583echo Error: Running tests net40-compilerunit failed, see logs above -- FAILED
618584echo -----------------------------------------------------------------
@@ -636,11 +602,15 @@ if [ "$TEST_NET40_COREUNIT_SUITE" = '1' ]; then
636602 OUTPUTARG=" --output:\" $OUTPUTFILE \" "
637603fi
638604
639- if ! printeval" $NUNIT3_CONSOLE --verbose --framework:V4.0 --result:\" $XMLFILE ;format=nunit3\" $OUTPUTARG $ERRORARG --work:\" $FSCBINPATH \" \" $FSCBINPATH /FSharp.Core.Unittests.dll\" $WHERE_ARG_NUNIT " ; then
640- echo -----------------------------------------------------------------
641- cat" $OUTPUTFILE "
642- echo -----------------------------------------------------------------
643- cat" $ERRORFILE "
605+ if ! printeval" mono$NUNIT3_CONSOLE --verbose --framework:V4.0 --result:\" $XMLFILE ;format=nunit3\" $OUTPUTARG $ERRORARG --work:\" $FSCBINPATH \" \" $FSCBINPATH /FSharp.Core.Unittests.dll\" $WHERE_ARG_NUNIT " ; then
606+ if [-f " $OUTPUTFILE " ]; then
607+ echo -----------------------------------------------------------------
608+ cat" $OUTPUTFILE "
609+ fi
610+ if [-f " $ERRORFILE " ]; then
611+ echo -----------------------------------------------------------------
612+ cat" $ERRORFILE "
613+ fi
644614echo -----------------------------------------------------------------
645615echo Error: Running tests net40-coreunit failed, see logs above -- FAILED
646616echo -----------------------------------------------------------------
@@ -665,11 +635,15 @@ if [ "$TEST_PORTABLE_COREUNIT_SUITE" = '1' ]; then
665635 OUTPUTARG=" --output:\" $OUTPUTFILE \" "
666636fi
667637
668- if ! printeval" $NUNIT3_CONSOLE /framework:V4.0 /result=\" $XMLFILE ;format=nunit3\" $OUTPUTARG $ERRORARG /work=\" $FSCBINPATH \" \" $FSCBINPATH /../../portable7/bin/FSharp.Core.Unittests.dll\" \" $FSCBINPATH /../../portable47/bin/FSharp.Core.Unittests.dll\" \" $FSCBINPATH /../../portable78/bin/FSharp.Core.Unittests.dll\" \" $FSCBINPATH /../../portable259/bin/FSharp.Core.Unittests.dll\" $WHERE_ARG_NUNIT " ; then
669- echo -----------------------------------------------------------------
670- cat" $OUTPUTFILE "
671- echo -----------------------------------------------------------------
672- cat" $ERRORFILE "
638+ if ! printeval" mono$NUNIT3_CONSOLE /framework:V4.0 /result=\" $XMLFILE ;format=nunit3\" $OUTPUTARG $ERRORARG /work=\" $FSCBINPATH \" \" $FSCBINPATH /../../portable7/bin/FSharp.Core.Unittests.dll\" \" $FSCBINPATH /../../portable47/bin/FSharp.Core.Unittests.dll\" \" $FSCBINPATH /../../portable78/bin/FSharp.Core.Unittests.dll\" \" $FSCBINPATH /../../portable259/bin/FSharp.Core.Unittests.dll\" $WHERE_ARG_NUNIT " ; then
639+ if [-f " $OUTPUTFILE " ]; then
640+ echo -----------------------------------------------------------------
641+ cat" $OUTPUTFILE "
642+ fi
643+ if [-f " $ERRORFILE " ]; then
644+ echo -----------------------------------------------------------------
645+ cat" $ERRORFILE "
646+ fi
673647echo -----------------------------------------------------------------
674648echo Error: Running tests portable-coreunit failed, see logs above -- FAILED
675649echo -----------------------------------------------------------------
@@ -712,3 +686,44 @@ if [ "$TEST_CORECLR_FSHARP_SUITE" = '1' ]; then
712686exit 1
713687fi
714688fi
689+
690+ # ---------------- net40-fsharpqa -----------------------
691+
692+ OSARCH=" ${PROCESSOR_ARCHITECTURE:- x64} "
693+
694+ # Set this to 1 in order to use an external compiler host process
695+ # This only has an effect when running the FSHARPQA tests, but can
696+ # greatly speed up execution since fsc.exe does not need to be spawned thousands of times
697+ HOSTED_COMPILER=1
698+
699+ if [" $TEST_NET40_FSHARPQA_SUITE " = ' 1' ]; then
700+
701+ export FSC=" $FSCBINPATH /fsc.exe"
702+ export FSCOREDLLPATH=" $FSCBINPATH /FSharp.Core.dll"
703+ export PATH=" $FSCBINPATH ;$PATH "
704+
705+ if ! command -v perl> /dev/null; then
706+ failwith" perl is not in the PATH, it is required for the net40-fsharpqa test suite"
707+ fi
708+
709+ OUTPUTFILE=test-net40-fsharpqa-results.log
710+ ERRORFILE=test-net40-fsharpqa-errors.log
711+ FAILENV=test-net40-fsharpqa-errors
712+
713+ {pushd " ${_scriptdir} tests/fsharpqa/source" && \
714+ printeval" perl tests/fsharpqa/testenv/bin/runall.pl -resultsroot$RESULTSDIR -results$OUTPUTFILE -log$ERRORFILE -fail$FAILENV -cleanup:no$TTAGS_ARG_RUNALL $PARALLEL_ARG " && \
715+ popd ; }|| {
716+ if [-f " $RESULTSDIR /$OUTPUTFILE " ]; then
717+ echo -----------------------------------------------------------------
718+ cat" $RESULTSDIR /$OUTPUTFILE "
719+ fi
720+ if [-f " $RESULTSDIR /$ERRORFILE " ]; then
721+ echo -----------------------------------------------------------------
722+ cat" $RESULTSDIR /$ERRORFILE "
723+ fi
724+ echo -----------------------------------------------------------------
725+ echo Error: Running tests net40-fsharpqa failed, see logs above -- FAILED
726+ echo -----------------------------------------------------------------
727+ exit 1
728+ }
729+ fi