Files
spark/tools/run_sparkcmd_test_Linux.cmd
T

48 lines
1014 B
Batchfile

@echo off
@setlocal
SETLOCAL
if [%1]==[] goto PRINT_USAGE
if [%3] == [r] (
set build_type=release
) else (
set build_type=debug
)
echo(%0)
echo(%1)
echo(%2)
echo(%3)
echo %build_type%
if "%SPARKVM_PORT%"=="" set SPARKVM_PORT=22
echo.
pushd %~dp0\..\src\client\sparkcmd
dotnet publish -f netcoreapp2.1
cd ..\..\..\build\Debug\bin\netcoreapp2.1\publish
bash -c "scp * bts@sparkvm:~/spark/build/ninja_%build_type%/server/"
copy /Y %~dp0\..\src\client\spark_test\system_test_scripts\*.sh ..\..\net471\
cd ../../net471
bash -c "scp *.sh bts@sparkvm:~/spark/build/ninja_%build_type%/server/"
ssh bts@sparkvm -p %SPARKVM_PORT% -o StrictHostKeyChecking=no -t "cd /home/bts/spark/build/ninja_%build_type%/server && ./%1 %2"
ENDLOCAL
popd
goto END
:PRINT_USAGE
echo Runs a spark test on a linux machine.
echo(
echo usage:
echo run_sparkcmd_test_linux.cmd test_name [r]
echo(
echo r Specifies the build should be in release mode
echo(
goto END
:END