Beispiel #1
0
def AssembleTestSuites():
    ''' Populates the test suites to run.

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

    Return
    ------

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

    # Create a test suite with the selected tests (Small tests):
    smallSuite = suites['small']
    smallSuite.addTest(EmbeddedCouetteTest('testEmbeddedCouette2D'))
    smallSuite.addTest(EmbeddedCouetteTest('testEmbeddedSlipCouette2D'))
    smallSuite.addTest(EmbeddedCouetteTest('testEmbeddedAusasCouette2D'))
    smallSuite.addTest(EmbeddedCouetteTest('testEmbeddedDevelopmentCouette2D'))
    smallSuite.addTest(
        EmbeddedCouetteTest('testEmbeddedSlipDevelopmentCouette2D'))
    smallSuite.addTest(
        EmbeddedCouetteTest('testEmbeddedAusasDevelopmentCouette2D'))
    smallSuite.addTest(
        EmbeddedCouetteImposedTest('testEmbeddedCouetteImposed2D'))
    smallSuite.addTest(EmbeddedPistonTest('testEmbeddedPiston2D'))
    smallSuite.addTest(EmbeddedReservoirTest('testEmbeddedReservoir2D'))
    smallSuite.addTest(EmbeddedReservoirTest('testEmbeddedSlipReservoir2D'))
    smallSuite.addTest(
        EmbeddedVelocityInletEmulationTest(
            'testEmbeddedVelocityInletEmulationEmbedded2D'))
    smallSuite.addTest(
        EmbeddedVelocityInletEmulationTest(
            'testEmbeddedVelocityInletEmulationSymbolic2D'))
    smallSuite.addTest(
        NavierStokesWallConditionTest('testNavierStokesWallCondition'))
    smallSuite.addTest(FluidAnalysisTest('testSteadyAnalysisSmall'))
    #smallSuite.addTest(BuoyancyTest('testBFECC')) # I'm skipping this one, it varies too much between runs JC.

    # Create a test suite with the selected tests plus all small tests
    nightSuite = suites['nightly']
    nightSuite.addTests(smallSuite)
    nightSuite.addTest(
        ArtificialCompressibilityTest('testArtificialCompressibility'))
    nightSuite.addTest(BuoyancyTest('testEulerian'))
    nightSuite.addTest(BuoyancyTest('testThermalExpansionCoefficient'))
    nightSuite.addTest(DarcyChannelTest('testDarcyDensity'))
    nightSuite.addTest(DarcyChannelTest('testDarcyLinear'))
    nightSuite.addTest(DarcyChannelTest('testDarcyNonLinear'))
    nightSuite.addTest(EmbeddedReservoirTest('testEmbeddedReservoir3D'))
    nightSuite.addTest(EmbeddedReservoirTest('testEmbeddedSlipReservoir3D'))
    nightSuite.addTest(
        EmbeddedReservoirDiscontinuousTest(
            'testEmbeddedReservoirDiscontinuous3D'))
    nightSuite.addTest(EmbeddedCouetteTest('testEmbeddedCouette3D'))
    nightSuite.addTest(EmbeddedCouetteTest('testEmbeddedSlipCouette3D'))
    nightSuite.addTest(EmbeddedCouetteTest('testEmbeddedAusasCouette3D'))
    nightSuite.addTest(EmbeddedCouetteTest('testEmbeddedDevelopmentCouette3D'))
    nightSuite.addTest(
        EmbeddedCouetteTest('testEmbeddedSlipDevelopmentCouette3D'))
    nightSuite.addTest(
        EmbeddedCouetteTest('testEmbeddedAusasDevelopmentCouette3D'))
    nightSuite.addTest(
        EmbeddedCouetteImposedTest('testEmbeddedCouetteImposed3D'))
    nightSuite.addTest(FluidElementTest('testCavityQSASGS'))
    nightSuite.addTest(FluidElementTest('testCavityQSOSS'))
    nightSuite.addTest(FluidElementTest('testCavityDASGS'))
    nightSuite.addTest(FluidElementTest('testCavityDOSS'))
    nightSuite.addTest(FluidElementTest('testTimeIntegratedQSVMS'))
    nightSuite.addTest(FluidElementTest('testSymbolic'))
    nightSuite.addTest(ManufacturedSolutionTest('testManufacturedSolution'))
    nightSuite.addTest(FluidAnalysisTest('testFluidDynamicsAnalysis'))
    nightSuite.addTest(AdjointFluidTest('testCylinder'))
    nightSuite.addTest(
        AdjointVMSElement2D('testCalculateSecondDerivativesLHS'))
    nightSuite.addTest(
        AdjointVMSElement2D('testCalculateFirstDerivativesLHS1'))
    nightSuite.addTest(
        AdjointVMSElement2D('testCalculateFirstDerivativesLHS2'))
    nightSuite.addTest(AdjointVMSElement2D('testCalculateSensitivityMatrix'))
    nightSuite.addTest(AdjointVMSSensitivity2D('testCylinder'))
    nightSuite.addTest(AdjointVMSSensitivity2D('testOneElement'))
    nightSuite.addTest(HDF5IOTest('testInputOutput'))
    nightSuite.addTest(FluidAnalysisTest('testSteadyCavity'))
    nightSuite.addTest(FluidAnalysisTest('testSteadyCylinder'))
    nightSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [IntegrationPointStatisticsTest]))

    # For very long tests that should not be in nighly and you can use to validate
    validationSuite = suites['validation']
    validationSuite.addTest(BuoyancyTest('validationEulerian'))
    validationSuite.addTest(AdjointVMSSensitivity2D('testSteadyCylinder'))

    # Create a test suite that contains all the tests:
    allSuite = suites['all']
    allSuite.addTests(nightSuite)

    return suites
def AssembleTestSuites():
    ''' Populates the test suites to run.

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

    Return
    ------

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

    # Create a test suite with the selected tests (Small tests):
    smallSuite = suites['small']
    smallSuite.addTest(CouetteFlowTest('testCouetteFlow2DSymbolicStokes'))
    smallSuite.addTest(
        CouetteFlowTest('testCouetteFlow2DWeaklyCompressibleNavierStokes'))
    smallSuite.addTest(
        EmbeddedCouetteFlowTest(
            'testEmbeddedCouetteFlowEmbeddedWeaklyCompressibleNavierStokes2D'))
    smallSuite.addTest(
        EmbeddedCouetteFlowTest(
            'testEmbeddedCouetteFlowEmbeddedWeaklyCompressibleNavierStokes2DSlip'
        ))
    smallSuite.addTest(
        EmbeddedCouetteFlowTest(
            'testEmbeddedCouetteFlowEmbeddedWeaklyCompressibleNavierStokesDiscontinuous2D'
        ))
    smallSuite.addTest(
        EmbeddedCouetteImposedTest('testEmbeddedCouetteImposed2D'))
    smallSuite.addTest(EmbeddedPistonTest('testEmbeddedPiston2D'))
    smallSuite.addTest(EmbeddedReservoirTest('testEmbeddedReservoir2D'))
    smallSuite.addTest(EmbeddedReservoirTest('testEmbeddedSlipReservoir2D'))
    smallSuite.addTest(
        EmbeddedVelocityInletEmulationTest(
            'testEmbeddedVelocityInletEmulationEmbedded2D'))
    smallSuite.addTest(
        EmbeddedVelocityInletEmulationTest(
            'testEmbeddedVelocityInletEmulationSymbolic2D'))
    smallSuite.addTest(
        NavierStokesWallConditionTest('testNavierStokesWallCondition'))
    smallSuite.addTest(FluidAnalysisTest('testSteadyAnalysisSmall'))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [TestAdjointMonolithicWallCondition]))
    #smallSuite.addTest(BuoyancyTest('testBFECC')) # I'm skipping this one, it varies too much between runs JC.

    # Create a test suite with the selected tests plus all small tests
    nightSuite = suites['nightly']
    nightSuite.addTests(smallSuite)
    nightSuite.addTest(
        ArtificialCompressibilityTest('testArtificialCompressibility'))
    nightSuite.addTest(BuoyancyTest('testEulerian'))
    nightSuite.addTest(BuoyancyTest('testThermalExpansionCoefficient'))
    nightSuite.addTest(DarcyChannelTest('testDarcyDensity'))
    nightSuite.addTest(DarcyChannelTest('testDarcyLinear'))
    nightSuite.addTest(DarcyChannelTest('testDarcyNonLinear'))
    nightSuite.addTest(EmbeddedReservoirTest('testEmbeddedReservoir3D'))
    nightSuite.addTest(EmbeddedReservoirTest('testEmbeddedSlipReservoir3D'))
    nightSuite.addTest(
        EmbeddedReservoirDiscontinuousTest(
            'testEmbeddedReservoirDiscontinuous3D'))
    nightSuite.addTest(
        EmbeddedCouetteFlowTest(
            'testEmbeddedCouetteFlowEmbeddedWeaklyCompressibleNavierStokes3D'))
    nightSuite.addTest(
        EmbeddedCouetteFlowTest(
            'testEmbeddedCouetteFlowEmbeddedWeaklyCompressibleNavierStokes3DSlip'
        ))
    nightSuite.addTest(
        EmbeddedCouetteFlowTest(
            'testEmbeddedCouetteFlowEmbeddedWeaklyCompressibleNavierStokesDiscontinuous3D'
        ))
    nightSuite.addTest(
        EmbeddedCouetteImposedTest('testEmbeddedCouetteImposed3D'))
    nightSuite.addTest(FluidElementTest('testCavityQSASGS'))
    nightSuite.addTest(FluidElementTest('testCavityQSOSS'))
    nightSuite.addTest(FluidElementTest('testCavityDASGS'))
    nightSuite.addTest(FluidElementTest('testCavityDOSS'))
    nightSuite.addTest(FluidElementTest('testTimeIntegratedQSVMS'))
    nightSuite.addTest(FluidElementTest('testSymbolic'))
    nightSuite.addTest(FluidAnalysisTest('testFluidDynamicsAnalysis'))
    nightSuite.addTest(AdjointFluidTest('testCylinder'))
    nightSuite.addTest(AdjointFluidTest('testSlipCylinder'))
    nightSuite.addTest(
        AdjointVMSElement2D('testCalculateSecondDerivativesLHS'))
    nightSuite.addTest(
        AdjointVMSElement2D('testCalculateFirstDerivativesLHS1'))
    nightSuite.addTest(
        AdjointVMSElement2D('testCalculateFirstDerivativesLHS2'))
    nightSuite.addTest(AdjointVMSElement2D('testCalculateSensitivityMatrix'))
    nightSuite.addTest(AdjointVMSSensitivity2D('testOneElement'))
    nightSuite.addTest(AdjointVMSSensitivity2D('testTwoElementsSlipSteady'))
    nightSuite.addTest(AdjointVMSSensitivity2D('testTwoElementsSlipBossak'))
    nightSuite.addTest(HDF5IOTest('testInputOutput'))
    nightSuite.addTest(FluidAnalysisTest('testSteadyCavity'))
    nightSuite.addTest(FluidAnalysisTest('testSteadyCylinder'))
    nightSuite.addTest(
        ConsistentLevelsetNodalGradientTest('testConsistentGradientSquare2D'))
    nightSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [IntegrationPointStatisticsTest]))
    nightSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [CFLOutputProcessTest]))
    nightSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [FlowsMeasuringUtilityTest]))
    nightSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [FluidAuxiliaryUtilitiesTest]))

    # For very long tests that should not be in nighly and you can use to validate
    validationSuite = suites['validation']
    validationSuite.addTest(BuoyancyTest('validationEulerian'))
    validationSuite.addTest(AdjointVMSSensitivity2D('testCylinder'))
    validationSuite.addTest(AdjointVMSSensitivity2D('testSteadyCylinder'))
    validationSuite.addTest(AdjointVMSSensitivity2D('testSlipNormCylinder'))
    validationSuite.addTest(
        AdjointVMSSensitivity2D('testSlipSteadyNormCylinder'))
    validationSuite.addTest(
        ManufacturedSolutionTest('testManufacturedSolution'))
    #FIXME: MOVE BACK THE SOD TO NIGHT ONCE WE FIX THE NIGHTLY BUILD ISSUE
    validationSuite.addTest(SodShockTubeTest('testSodShockTubeExplicitASGS'))
    validationSuite.addTest(
        SodShockTubeTest('testSodShockTubeExplicitASGSShockCapturing'))
    validationSuite.addTest(SodShockTubeTest('testSodShockTubeExplicitOSS'))
    validationSuite.addTest(
        SodShockTubeTest('testSodShockTubeExplicitOSSShockCapturing'))

    # Create a test suite that contains all the tests:
    allSuite = suites['all']
    allSuite.addTests(nightSuite)

    return suites