/IronPython_Main/Languages/IronPython/Samples/tests/Puzzle/Runner.ps1

# · Powershell · 40 lines · 18 code · 4 blank · 18 comment · 3 complexity · cf366d8a777f3bac56cab124122f1d3b MD5 · raw file

  1. #####################################################################################
  2. #
  3. # Copyright (c) Microsoft Corporation. All rights reserved.
  4. #
  5. # This source code is subject to terms and conditions of the Apache License, Version 2.0. A
  6. # copy of the license can be found in the License.html file at the root of this distribution. If
  7. # you cannot locate the Apache License, Version 2.0, please send an email to
  8. # ironpy@microsoft.com. By using this source code in any fashion, you are agreeing to be bound
  9. # by the terms of the Apache License, Version 2.0.
  10. #
  11. # You must not remove this notice, or any other, from this software.
  12. #
  13. #
  14. #####################################################################################
  15. #------------------------------------------------------------------------------
  16. $CURRPATH = split-path -parent $MyInvocation.MyCommand.Definition
  17. . $CURRPATH\..\Common.ps1
  18. if (! $?) {
  19. exit 1
  20. }
  21. #------------------------------------------------------------------------------
  22. setup-sampletests $CURRPATH\..\..\Puzzle
  23. sanitycheck-sample
  24. #------------------------------------------------------------------------------
  25. echo "Now running automated tests..."
  26. .\TestPuzzle.exe $env:IPY_CMD
  27. if (! $?) {
  28. echo "TestPuzzle.exe failed!"
  29. exit 1
  30. }
  31. else {
  32. echo "Finished!"
  33. }
  34. #------------------------------------------------------------------------------
  35. takedown-sampletests $CURRPATH\..\..\Puzzle
  36. rm -force $CURRPATH\..\..\Puzzle\cache\*.jpeg