tests.bat 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. REM ---------------------------------------------------------------------------
  2. REM Batch file for running the unit-tests for cpp-ethereum for Windows.
  3. REM
  4. REM The documentation for cpp-ethereum is hosted at http://cpp-ethereum.org
  5. REM
  6. REM ---------------------------------------------------------------------------
  7. REM This file is part of cpp-ethereum.
  8. REM
  9. REM cpp-ethereum is free software: you can redistribute it and/or modify
  10. REM it under the terms of the GNU General Public License as published by
  11. REM the Free Software Foundation, either version 3 of the License, or
  12. REM (at your option) any later version.
  13. REM
  14. REM cpp-ethereum is distributed in the hope that it will be useful,
  15. REM but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. REM GNU General Public License for more details.
  18. REM
  19. REM You should have received a copy of the GNU General Public License
  20. REM along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>
  21. REM
  22. REM Copyright (c) 2016 cpp-ethereum contributors.
  23. REM ---------------------------------------------------------------------------
  24. set TESTS=%1
  25. set CONFIGURATION=%2
  26. set APPVEYOR_BUILD_FOLDER=%cd%
  27. set ETHEREUM_DEPS_PATH=%4
  28. if "%TESTS%"=="On" (
  29. REM Clone the end-to-end test repo, and point environment variable at it.
  30. cd ..
  31. git clone --depth 1 https://github.com/ethereum/tests.git
  32. set ETHEREUM_TEST_PATH=%APPVEYOR_BUILD_FOLDER%\..\tests
  33. REM Copy the DLLs into the test directory which need to be able to run.
  34. cd %APPVEYOR_BUILD_FOLDER%\build\test\%CONFIGURATION%
  35. copy %APPVEYOR_BUILD_FOLDER%\build\evmjit\libevmjit\%CONFIGURATION%\evmjit.dll .
  36. copy "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\x86\Microsoft.VC140.CRT\msvc*.dll" .
  37. copy %ETHEREUM_DEPS_PATH%\x64\bin\libcurl.dll .
  38. copy %ETHEREUM_DEPS_PATH%\x64\bin\libmicrohttpd-dll.dll .
  39. copy %ETHEREUM_DEPS_PATH%\win64\bin\OpenCl.dll .
  40. REM Run the tests for the Interpreter
  41. echo Testing testeth
  42. testeth.exe
  43. IF errorlevel 1 GOTO ON-ERROR-CONDITION
  44. REM Run the tests for the JIT
  45. echo Testing EVMJIT
  46. testeth.exe -t VMTests,StateTests -- --vm jit
  47. IF errorlevel 1 GOTO ON-ERROR-CONDITION
  48. cd ..\..\..
  49. )
  50. EXIT 0
  51. :ON-ERROR-CONDITION
  52. echo "ERROR - Unit-test run returned error code."
  53. EXIT 1