def parse_args():
  parser = argparse.ArgumentParser(description='Test mksnapshot')
  parser.add_argument('-b', '--build-dir',
                      help='Path to an Electron build folder. \
                          Relative to the --source-root.',
                      default=None,
                      required=True)
  parser.add_argument('--create-snapshot-only',
                      help='Just create snapshot files, but do not run test',
                      action='store_true')
  parser.add_argument('--snapshot-files-dir',
                      help='Directory containing snapshot files to use \
                          for testing',
                      default=None,
                      required=False)
  parser.add_argument('--source-root',
                      default=SOURCE_ROOT,
                      required=False)
  return parser.parse_args()