Skip to content

Commit

Permalink
Add AOT testing to scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
atifaziz committed May 20, 2024
1 parent e3e9222 commit 9793674
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
21 changes: 20 additions & 1 deletion test.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,19 @@ popd & exit /b %ERRORLEVEL%
setlocal
if not defined SKIP_TEST_BUILD set SKIP_TEST_BUILD=false
if %SKIP_TEST_BUILD%==false call build || exit /b 1
if not "%~1"=="aot" goto :test-all
call :test-aot
exit /b %ERRORLEVEL%
:test-all
call :clean ^
&& call :test net8.0 Debug ^
&& call :test net8.0 Release ^
&& call :test net6.0 Debug ^
&& call :test net6.0 Release ^
&& call :test net471 Debug ^
&& call :test net471 Release ^
&& call :report-cover
&& call :report-cover ^
&& call :test-aot
exit /b %ERRORLEVEL%

:clean
Expand Down Expand Up @@ -51,3 +56,17 @@ dotnet reportgenerator -reports:coverage-*.opencover.xml ^
-targetdir:reports ^
&& type reports\Summary.txt
exit /b %ERRORLEVEL%

:test-aot
setlocal
cd MoreLinq.Test.Aot
dotnet publish
if not ERRORLEVEL==0 exit /b %ERRORLEVEL%
set AOT_TEST_PUBLISH_DIR=
for /f %%d in ('dir /ad /s /b publish') do if not defined AOT_TEST_PUBLISH_DIR set AOT_TEST_PUBLISH_DIR=%%~d
if not defined AOT_TEST_PUBLISH_DIR (
echo>&2 Published binary directory not found!
exit /b 1
)
"%AOT_TEST_PUBLISH_DIR%\MoreLinq.Test.Aot.exe"
exit /b %ERRORLEVEL%
2 changes: 2 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ else
mono MoreLinq.Test/bin/$c/net471/MoreLinq.Test.exe
done
fi
dotnet publish MoreLinq.Test.Aot
"$(find MoreLinq.Test.Aot -type d -name publish)/MoreLinq.Test.Aot"

0 comments on commit 9793674

Please sign in to comment.