CONFIG = {
    'framework' : 'other',
    'arg' : 'tensorflow/tools/ci_build/builds/run_pip_tests.sh --virtualenv',
    'env' : [{'TF_BUILD_APPEND_ARGUMENTS': '--test_output=errors'}],
    'expect_except' : None,
    'need_sources' : True,
    'location' : None,
    'use_re' : False,
    'set_cl_path' : False,
    'eol_patt' : r'Executed \d* out of \d* tests:',
    'parser' : None,
    'errors' : {
        '2.7' : {
            'Win' : set(),
            'Lin' : {
                'testDoesNotRaiseIfInitializedWithSymmetricMatrix (__main__.MultivariateNormalFullCovarianceTest)', # Duplicate of mvn_full_covariance_test below
                'testConv2DEmpty (__main__.Conv2DTest)',                                                            # Duplicate of conv_ops_test below
            },
            'Mac' : set()
        },
        '3.5' : {
            'Win' : set(),
            'Lin' : set(),
            'Mac' : set()
        },
        '3.6' : {
            'Win' : set(),
            'Lin' : {
                'testDoesNotRaiseIfInitializedWithSymmetricMatrix (__main__.MultivariateNormalFullCovarianceTest)', # Duplicate of mvn_full_covariance_test below
                'testConv2DEmpty (__main__.Conv2DTest)',                                                            # Duplicate of conv_ops_test below
            },
            'Mac' : set()
        },
    },
    'failures' : {
        '2.7' : {
            'Win' : set(),
            'Lin' : {
                '//bazel_pip/tensorflow/tensorboard/plugins/text:text_plugin_test',              # We don't ship with markdown
                '//bazel_pip/tensorflow/python:function_test',                                   # Fails in Anaconda (0.1% array mismatch)
                '//bazel_pip/tensorflow/contrib/distributions:wishart_test',                     # Fails when run through bazel but passes when run alone
                '//bazel_pip/tensorflow/contrib/distributions:mvn_full_covariance_test',         # Fails in Anaconda too
                '//bazel_pip/tensorflow/contrib/image:image_ops_test',                           # 1.8% tolerance mismatch
                '//bazel_pip/tensorflow/python/kernel_tests/distributions:special_math_test',    # 1% tolerance mismatch
                '//bazel_pip/tensorflow/contrib/slim/python/slim/nets:resnet_v1_test',           # Determined benign by Intel TF team
                '//bazel_pip/tensorflow/python/debug:readline_ui_test',                          # We don't ship with readline
                '//bazel_pip/tensorflow/python/debug:session_debug_file_test',                   # Determined benign by Intel TF team
                '//bazel_pip/tensorflow/python:timeline_test',                                   # Determined benign by Intel TF team
                '//bazel_pip/tensorflow/python/tools:print_selective_registration_header_test',  # Determined benign by Intel TF team
                '//bazel_pip/tensorflow/python/kernel_tests:conv_ops_test (shard 1 of 4)',       # Determined benign by Intel TF team
                '//bazel_pip/tensorflow/python/kernel_tests:fft_ops_test (shard 3 of 3)',        # 0.1% tolerance mismatch
                '//bazel_pip/tensorflow/python/kernel_tests:fft_ops_test (shard 2 of 3)',        # 0.1% tolerance mismatch
                '//bazel_pip/tensorflow/python:saver_test',                                      # SAT-1542
            },
            'Mac' : set()
        },
        '3.5' : {
            'Win' : set(),
            'Lin' : set(),
            'Mac' : set()
        },
        '3.6' : {
            'Win' : set(),
            'Lin' : {
                '//bazel_pip/tensorflow/tensorboard/plugins/text:text_plugin_test',               # We don't ship with markdown
                '//bazel_pip/tensorflow/python:function_test',                                    # Fails in Anaconda (0.1% array mismatch)
                '//bazel_pip/tensorflow/contrib/distributions:wishart_test',                      # Fails when run through bazel but passes when run alone
                '//bazel_pip/tensorflow/contrib/distributions:mvn_full_covariance_test',          # Fails in Anaconda too
                '//bazel_pip/tensorflow/contrib/image:image_ops_test',                            # 1.8% tolerance mismatch
                '//bazel_pip/tensorflow/python/kernel_tests/distributions:special_math_test',     # 1% tolerance mismatch
                '//bazel_pip/tensorflow/contrib/slim/python/slim/nets:resnet_v1_test',            # Determined benign by Intel TF team
                '//bazel_pip/tensorflow/python/debug:readline_ui_test',                           # We don't ship with readline
                '//bazel_pip/tensorflow/python/debug:session_debug_file_test',                    # Determined benign by Intel TF team
                '//bazel_pip/tensorflow/python:timeline_test',                                    # Determined benign by Intel TF team
                '//bazel_pip/tensorflow/python/tools:print_selective_registration_header_test',   # Determined benign by Intel TF team
                '//bazel_pip/tensorflow/python/kernel_tests:conv_ops_test (shard 1 of 4)',        # Determined benign by Intel TF team
                '//bazel_pip/tensorflow/python/kernel_tests:fft_ops_test (shard 3 of 3)',         # 0.1% tolerance mismatch
                '//bazel_pip/tensorflow/python/kernel_tests:fft_ops_test (shard 2 of 3)',         # 0.1% tolerance mismatch
                '//bazel_pip/tensorflow/contrib/timeseries/python/timeseries:input_pipeline_test',#only fails during full-build
            },
            'Mac' : set()
        },
    },
}

def fetch_config(pyver):
    # All the quirky bits - excluding tests and/or different testing methods / arguments for different
    # versions of Python / platform must be done here.
    # For e.g. if foo needs addition of extra args to the default for testing with Python-3.5 :
    #         if pyver == '3.5':
    #             CONFIG['arg'] += ' extra_args'
    return CONFIG
