updateTests.cmd 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. ::-------------------------------------------------------------------------------------------------------
  2. :: Copyright (C) Microsoft. All rights reserved.
  3. :: Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. ::-------------------------------------------------------------------------------------------------------
  5. @echo off
  6. :: usage updatedTests.cmd <path/ch.exe> [WasmSpec commit hash]
  7. pushd %~dp0
  8. if not exist "%1" (
  9. echo Please provide path to a chakra host, ch or jshost.
  10. exit /b 1
  11. )
  12. if exist "wasm-spec" (
  13. rd /q /s wasm-spec
  14. )
  15. if "" equ "%2" (
  16. git clone --depth 1 --branch master https://github.com/WebAssembly/spec.git wasm-spec
  17. cd wasm-spec
  18. ) else (
  19. git clone https://github.com/WebAssembly/spec.git wasm-spec
  20. cd wasm-spec
  21. git reset --hard %2
  22. )
  23. git rev-parse HEAD > ..\testsuite.rev
  24. cd ..
  25. rem Exclude comments.wast because it is intended to test wast->wasm with uncommon characters
  26. rem This is causing problems with our jenkins checks and it is not worth it to run in chakra
  27. robocopy /e /mir wasm-spec\test testsuite /xf comments.wast
  28. rd /q /s wasm-spec
  29. rem regerate testsuite
  30. cd convert-test-suite
  31. call npm install --production
  32. cd ..
  33. node convert-test-suite --rebase %*
  34. git add testsuite\*
  35. git add baselines\*
  36. echo Test updated and regenerated
  37. popd