text
stringlengths
0
834k
echo.Running C# tests.
pushd dotnet\csharp_test
dotnet run -- all
if errorlevel 1 (exit /b 1)
popd
REM -----------------------------------------------------------------------------------------
echo.
echo.Validating JavaScript code.
node test.js astro_check > temp/js_check.txt
if errorlevel 1 (exit /b 1)
!GENEXE! check temp/js_check.txt
if errorlevel 1 (exit /b 1)
echo.
echo.Verifying against JPL Horizons data.
call jplcheck.bat
if errorlevel 1 (exit /b 1)
echo.
echo.Running JavaScript unit tests.
node test.js all
if errorlevel 1 (exit /b 1)
for %%f in (temp\longitude_*.txt) do (
!GENEXE! check %%f
if errorlevel 1 (exit /b 1)
)
REM -----------------------------------------------------------------------------------------
echo.Running C unit tests.
!CTESTEXE! check
if errorlevel 1 (exit /b 1)
!GENEXE! check temp\c_check.txt
if errorlevel 1 (exit /b 1)
!CTESTEXE! all
if errorlevel 1 (exit /b 1)
for %%f in (temp\c_longitude_*.txt) do (
!GENEXE! check %%f
if errorlevel 1 (exit /b 1)
)
REM -----------------------------------------------------------------------------------------
echo.Running Python tests.
test.py all
if errorlevel 1 (exit /b 1)
for %%f in (temp\py_longitude_*.txt) do (
!GENEXE! check %%f
if errorlevel 1 (exit /b 1)
)
echo.Generating Python test output.
test.py astro_check > temp\py_check.txt
if errorlevel 1 (exit /b 1)
echo.Verifying Python test output.
!GENEXE! check temp\py_check.txt
if errorlevel 1 (exit /b 1)
REM -----------------------------------------------------------------------------------------
call diffcalc.bat
if errorlevel 1 (exit /b 1)
if exist ..\website\src\assets\documentation.json (
REM *** documentation.json never generates the same in Windows as Linux.
REM *** For now, hack around this by discarding any local changes.
git checkout -- ../website/src/assets/documentation.json
)
type pass.txt
exit /b 0
REM -----------------------------------------------------------------------------------------
REM Subroutine for downloading an external file.
REM Some of the files needed to generate source code are large.
REM These files are only needed by Astronomy Engine contributors,
REM not by developers who are using the published version of Astronomy Engine.
REM A special download process helps keep the repo size reasonable.
:Download
setlocal
for %%x in (wget.exe) do (set wgetexe=%%~$PATH:x)
for %%x in (curl.exe) do (set curlexe=%%~$PATH:x)
for %%x in (md5sum.exe) do (set md5exe=%%~$PATH:x)
set EPHURL=%1
set EPHFILE=%2
set MD5FILE=%3
if not exist !EPHFILE! (
echo.
echo.Local file not found: !EPHFILE!
echo.Trying to download for you from:
echo.!EPHURL!