platform_windows.cpp 767 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include <sstream> // for freopen_s
  9. #include <direct.h> // for _getcwd
  10. #include <AzCore/IO/SystemFile.h> // for AZ_MAX_PATH_LEN
  11. namespace AzTestRunner
  12. {
  13. void set_quiet_mode()
  14. {
  15. FILE* stream;
  16. freopen_s(&stream, "nul", "w", stdout);
  17. }
  18. const char* get_current_working_directory()
  19. {
  20. static char cwd_buffer[AZ_MAX_PATH_LEN] = { '\0' };
  21. return _getcwd(cwd_buffer, sizeof(cwd_buffer));
  22. }
  23. void pause_on_completion()
  24. {
  25. system("pause");
  26. }
  27. }