hctdeploytest.cmd 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. @echo off
  2. setlocal ENABLEDELAYEDEXPANSION
  3. if "%1"=="" goto :showhelp
  4. if "%1"=="/?" goto :showhelp
  5. if "%1"=="-?" goto :showhelp
  6. if "%1"=="/h" goto :showhelp
  7. if "%1"=="-h" goto :showhelp
  8. if "%1"=="-help" goto :showhelp
  9. if "%1"=="--help" goto :showhelp
  10. if "%BUILD_CONFIG%"=="" (
  11. set BUILD_CONFIG=Debug
  12. )
  13. set TEST_DIR=%HLSL_BLD_DIR%\%BUILD_CONFIG%\test
  14. set DEPLOY_DIR=%1
  15. if not exist %HLSL_SRC_DIR%\external\taef\. (
  16. call hctgettaef.py
  17. if errorlevel 1 (
  18. echo hctgettaef.py failed with errorlevel !errorlevel!
  19. exit /b 1
  20. )
  21. )
  22. rem Deploy test content to test directory
  23. call hcttest.cmd none
  24. if errorlevel 1 (
  25. echo test deployment with 'hcttest none' failed with errorlevel !errorlevel!
  26. exit /b 1
  27. )
  28. robocopy /S %HLSL_SRC_DIR%\external\taef\build\Binaries %DEPLOY_DIR%\taef *
  29. robocopy /S %TEST_DIR% %DEPLOY_DIR%\test *
  30. robocopy /S %HLSL_SRC_DIR%\tools\clang\test\HLSL %DEPLOY_DIR%\HLSL *
  31. robocopy /S %HLSL_SRC_DIR%\tools\clang\test\CodeGenHLSL %DEPLOY_DIR%\CodeGenHLSL *
  32. echo =========================================================================
  33. echo Provided there were no errors above, the test can now be run from
  34. echo the target directory with:
  35. echo.
  36. echo taef\amd64\te test\clang-hlsl-tests.dll /p:"HlslDataDir=HLSL" [options]
  37. echo.
  38. echo You may need to deploy VS runtime libraries in order to run the unit tests.
  39. echo Debug versions of these will be required for the Debug build configuration.
  40. echo Here are some dll's that may be required:
  41. echo msvcp140.dll
  42. echo msvcp140d.dll
  43. echo ucrtbased.dll
  44. echo vcruntime140.dll
  45. echo vcruntime140d.dll
  46. echo.
  47. exit /b 0
  48. :showhelp
  49. echo Usage:
  50. echo hctdeploytest target-directory
  51. echo.
  52. goto :eof