Ejemplo n.º 1
0
def AssembleTestSuites():
    ''' Populates the test suites to run.

    Populates the test suites to run. At least, it should pupulate the suites:
    "small", "nighlty" and "all"

    Return
    ------

    suites: A dictionary of suites
        The set of suites with its test_cases added.
    '''
    suites = KratosUnittest.KratosSuites

    # Adding small tests (tests that take < 1s)
    smallSuite = suites['small']
    smallSuite.addTest(mapper_test('test_execution'))
    smallSuite.addTest(opt_process_vertex_morphing_small_test('test_execution'))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases([WrlIOTest]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases([SurfaceNormalShapeChangeTest]))

    # Adding nightly tests (tests that take < 10min)
    nightSuite = suites['nightly']
    nightSuite.addTest(opt_process_shell_test('test_execution'))
    nightSuite.addTest(opt_process_solid_test('test_execution'))
    nightSuite.addTest(algorithm_bead_optimization_test('test_execution'))
    nightSuite.addTest(opt_process_step_adaption_test('test_execution'))
    nightSuite.addTest(in_plane_opt_test('test_execution'))
    nightSuite.addTest(packaging_mesh_based_test('test_execution'))
    nightSuite.addTest(packaging_plane_based_test('test_execution'))
    nightSuite.addTest(opt_process_vertex_morphing_test('test_execution'))
    nightSuite.addTest(opt_process_eigenfrequency_test('test_execution'))
    nightSuite.addTest(opt_process_weighted_eigenfrequency_test('test_execution'))
    nightSuite.addTest(algorithm_steepest_descent_test('test_execution'))
    nightSuite.addTest(algorithm_penalized_projection_test('test_execution'))
    nightSuite.addTest(algorithm_trust_region_test('test_execution'))
    nightSuite.addTest(trust_region_projector_test('test_execution'))
    nightSuite.addTest(opt_process_multiobjective_test('test_execution'))
    nightSuite.addTest(opt_process_stress_test('test_execution'))
    nightSuite.addTest(sensitivity_verification_semi_analytic_process_test('test_execution'))
    nightSuite.addTest(sensitivity_verification_in_design_space_process_test('test_execution'))
    nightSuite.addTest(sensitivity_verification_in_geometry_space_process_test('test_execution'))

    # Adding small tests to nightly tests
    nightSuite.addTests(smallSuite)

    # Adding validation tests
    validationSuite = suites['validation']

    # Creating a test suit that contains all tests:
    allSuite = suites['all']
    # allSuite.addTests(smallSuite) #Already added to small tests
    allSuite.addTests(nightSuite)
    allSuite.addTests(validationSuite)

    return suites
Ejemplo n.º 2
0
def AssembleTestSuites():
    ''' Populates the test suites to run.

    Populates the test suites to run. At least, it should pupulate the suites:
    "small", "nighlty" and "all"

    Return
    ------

    suites: A dictionary of suites
        The set of suites with its test_cases added.
    '''
    suites = KratosUnittest.KratosSuites

    # Adding small tests (tests that take < 1s)
    smallSuite = suites['small']
    smallSuite.addTest(opt_process_vertex_morphing_test('test_execution'))
    smallSuite.addTest(opt_process_shell_test('test_execution'))
    if not is_mesh_moving_app_missing:
        smallSuite.addTest(opt_process_solid_test('test_execution'))
    if not is_eigen_app_missing:
        smallSuite.addTest(opt_process_eigenfrequency_test('test_execution'))
        smallSuite.addTest(
            opt_process_weighted_eigenfrequency_test('test_execution'))
    smallSuite.addTest(algorithm_steepest_descent_test('test_execution'))
    smallSuite.addTest(algorithm_penalized_projection_test('test_execution'))
    smallSuite.addTest(algorithm_trust_region_test('test_execution'))
    smallSuite.addTest(trust_region_projector_test('test_execution'))
    smallSuite.addTest(algorithm_bead_optimization_test('test_execution'))
    smallSuite.addTest(opt_process_step_adaption_test('test_execution'))
    smallSuite.addTest(mapper_test('test_execution'))

    # Adding nightly tests (tests that take < 10min)
    nightSuite = suites['nightly']

    # Adding small tests to nightly tests
    nightSuite.addTests(smallSuite)

    # Adding validation tests
    validationSuite = suites['validation']

    # Creating a test suit that contains all tests:
    allSuite = suites['all']
    # allSuite.addTests(smallSuite) #Already added to small tests
    allSuite.addTests(nightSuite)
    allSuite.addTests(validationSuite)

    return suites