'''
'''
#  Licensed to the Apache Software Foundation (ASF) under one
#  or more contributor license agreements.  See the NOTICE file
#  distributed with this work for additional information
#  regarding copyright ownership.  The ASF licenses this file
#  to you under the Apache License, Version 2.0 (the
#  "License"); you may not use this file except in compliance
#  with the License.  You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.

import sys
import microserver

if sys.version_info < (3, 6, 0):
    host.WriteError(
        "You need python 3.6 or later to run these tests\n", show_stack=False)

needed_autest_version = "1.10.4"
found_autest_version = AuTestVersion()
if AuTestVersion() < needed_autest_version:
    host.WriteError(
        f"Tests need AuTest version {needed_autest_version} or better, found version {found_autest_version}\n"
        "Please update AuTest:\n  pipenv --rm && pipenv install\n",
        show_stack=False)


needed_microserver_version = "1.0.6"
found_microserver_version = microserver.__version__
if found_microserver_version < needed_microserver_version:
    host.WriteError(
        f"Tests need a MicroServer version {needed_microserver_version} or better, found version {found_microserver_version}\n"
        "Please update MicroServer:\n  pipenv --rm && pipenv install\n",
        show_stack=False)

Settings.path_argument(["--ats-bin"],
                       required=True,
                       help="A user provided directory to ATS bin")

Settings.path_argument(["--build-root"],
                       required=False,
                       help="The location of the build root for out of source builds")

Settings.path_argument(["--proxy-verifier-bin"],
                       required=False,
                       help="A location for system proxy-verifier binaries to test with.")
