EditorPythonBindingsTestWithArgs.py 804 B

12345678910111213141516171819202122232425
  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. SPDX-License-Identifier: Apache-2.0 OR MIT
  5. """
  6. #
  7. # testing Python code
  8. #
  9. import sys
  10. import os
  11. import os.path
  12. print('EditorPythonBindingsTestWithArgs_RunScriptFile')
  13. print('num args: {}'.format(len(sys.argv)))
  14. # Intentionally print script name separately from the other args.
  15. # The path that it prints will be non-deterministic based on where the code
  16. # has been synced to, so we strip it off, enabling us to just validate the script name
  17. # and the other args made it through successfully.
  18. print('script name: {}'.format(os.path.basename(sys.argv[0])))
  19. for arg in range(1, len(sys.argv)):
  20. print('arg {}: {}'.format(arg, sys.argv[arg]))