Subversion Repositories DevTools

Rev

Rev 7081 | Rev 7094 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7081 Rev 7093
Line 848... Line 848...
848
                Package p = it.next();
848
                Package p = it.next();
849
                if (p.mBuildFile >= 0 &&  p.mBuildReason != null) {
849
                if (p.mBuildFile >= 0 &&  p.mBuildReason != null) {
850
                    testVersions.add(p);
850
                    testVersions.add(p);
851
                }
851
                }
852
            }
852
            }
-
 
853
 
853
                    
854
            mLogger.error("Determine new version numbers");
854
            for (Iterator<Package> it = testVersions.iterator(); it.hasNext(); )
855
            for (Iterator<Package> it = testVersions.iterator(); it.hasNext(); )
855
            {
856
            {
856
                Package p = it.next();
857
                Package p = it.next();
857
 
858
 
858
                if ( p.mBuildFile >= 0 )
859
                if ( p.mBuildFile >= 0 )
Line 1006... Line 1007...
1006
                //  Otherwise we use basic plan FOLLOWED by the a MODIFIED full plan (one without the natural ripples)
1007
                //  Otherwise we use basic plan FOLLOWED by the a MODIFIED full plan (one without the natural ripples)
1007
                //  Add the planned packages into the buildOrder
1008
                //  Add the planned packages into the buildOrder
1008
    
1009
    
1009
                if( !basicPlan.planCollection.isEmpty() && !fullPlan.planCollection.isEmpty() )
1010
                if( !basicPlan.planCollection.isEmpty() && !fullPlan.planCollection.isEmpty() )
1010
                {
1011
                {
1011
                    mLogger.info("Two plan selection: {} {}, {} <= {}", basicPlan.planTime,fullPlan.planTime, basicPlan.planTime * 12, fullPlan.planTime * 10);
1012
                    mLogger.error("Two plan selection: {} {}, {} <= {}", basicPlan.planTime,fullPlan.planTime, basicPlan.planTime * 12, fullPlan.planTime * 10);
1012
                    if ( (basicPlan.planTime * 12) <= (fullPlan.planTime * 10) )
1013
                    if ( (basicPlan.planTime * 12) <= (fullPlan.planTime * 10) )
1013
                    {
1014
                    {
1014
                        //  Use the basic plan FOLLOWED by a plan that does not include
1015
                        //  Use the basic plan FOLLOWED by a plan that does not include
1015
                        //      Ripples done by the basic plan
1016
                        //      Ripples done by the basic plan
1016
                        //      WIPs/RIPPLES done in the course of doing the basic plan
1017
                        //      WIPs/RIPPLES done in the course of doing the basic plan
1017
    
-
 
-
 
1018
                        mLogger.error("Use basic plan, then modified full plan");
1018
                        mBuildOrder.addAll(basicPlan.planCollection);
1019
                        mBuildOrder.addAll(basicPlan.planCollection);
1019
                        fullPlan = postRipplePlan("Full-Ripples", basicPlan, false);
1020
                        fullPlan = postRipplePlan("Full-Ripples", basicPlan, false);
1020
                        mBuildOrder.addAll(fullPlan.planCollection);
1021
                        mBuildOrder.addAll(fullPlan.planCollection);
1021
                        
1022
                        
1022
                    } else {
1023
                    } else {
1023
                        //  Use the full plan
1024
                        //  Use the full plan
-
 
1025
                        mLogger.error("Use full plan");
1024
                        mBuildOrder.addAll(fullPlan.planCollection);
1026
                        mBuildOrder.addAll(fullPlan.planCollection);
1025
                    }
1027
                    }
1026
                } else if (!basicPlan.planCollection.isEmpty() ) {
1028
                } else if (!basicPlan.planCollection.isEmpty() ) {
1027
                    // Use the basic plan
1029
                    // Use the basic plan
-
 
1030
                    mLogger.error("Use basic plan");
1028
                    mBuildOrder.addAll(basicPlan.planCollection);
1031
                    mBuildOrder.addAll(basicPlan.planCollection);
1029
                    
1032
                    
1030
                } else if ( !fullPlan.planCollection.isEmpty() ) {
1033
                } else if ( !fullPlan.planCollection.isEmpty() ) {
1031
                    // Use the full plan
1034
                    // Use the full plan
-
 
1035
                    mLogger.error("Use full plan");
1032
                    mBuildOrder.addAll(fullPlan.planCollection);
1036
                    mBuildOrder.addAll(fullPlan.planCollection);
1033
                    
1037
                    
1034
                } else {
1038
                } else {
1035
                    // Do not have a plan
1039
                    // Do not have a plan
1036
                    // May have tests requests
1040
                    // May have tests requests
-
 
1041
                    mLogger.error("Use NO plan");
1037
                }
1042
                }
1038
                
1043
                
1039
                //  Now have an mBuildOrder
1044
                //  Now have an mBuildOrder
1040
                //  Mark the first package in the build order as the one to be built
1045
                //  Mark the first package in the build order as the one to be built
1041
                //
1046
                //
Line 1056... Line 1061...
1056
                    
1061
                    
1057
                    //  Now that we know which package we are building
1062
                    //  Now that we know which package we are building
1058
                    //      Set the previously calculated nextVersion as the packages version number
1063
                    //      Set the previously calculated nextVersion as the packages version number
1059
                    //      Claim the version number to prevent other builds from using it. Even if doing a test build
1064
                    //      Claim the version number to prevent other builds from using it. Even if doing a test build
1060
                    //
1065
                    //
-
 
1066
                    mLogger.error("Update mVersion: {}", build);
1061
                    if (build.mNextVersion != null)
1067
                    if (build.mNextVersion != null)
1062
                    {
1068
                    {
1063
                        mReleaseManager.claimVersion(build.mPid, build.mNextVersion + build.mExtension, mBaseline);
1069
                        mReleaseManager.claimVersion(build.mPid, build.mNextVersion + build.mExtension, mBaseline);
1064
                        build.mVersion = build.mNextVersion;
1070
                        build.mVersion = build.mNextVersion;
-
 
1071
                        mLogger.error("Update mVersion: {} to {}", build, build.mVersion);
1065
                    }
1072
                    }
1066
                }
1073
                }
1067
                
1074
                
1068
                //
1075
                //
1069
                //  Massage the package collection
1076
                //  Massage the package collection
Line 1478... Line 1485...
1478
                }
1485
                }
1479
                
1486
                
1480
                //  Sort the packages by buildOrder and buildTime
1487
                //  Sort the packages by buildOrder and buildTime
1481
                Collections.sort(ripplePlan, PlannedPackage.BuildOrderComparitor);
1488
                Collections.sort(ripplePlan, PlannedPackage.BuildOrderComparitor);
1482
                
1489
                
1483
                mLogger.info("Plan Build {} Time: {}", name, results.planTime);
1490
                mLogger.error("Plan Build {} Time: {}", name, results.planTime);
1484
                for (Iterator<PlannedPackage> it = ripplePlan.iterator(); it.hasNext(); )
1491
                for (Iterator<PlannedPackage> it = ripplePlan.iterator(); it.hasNext(); )
1485
                {
1492
                {
1486
                    PlannedPackage p = it.next();
1493
                    PlannedPackage p = it.next();
1487
                    mLogger.info("Plan: {} {}", p.mBuildLevel, p.mPkg.mAlias);
1494
                    mLogger.error("Plan: {} {} t:{}", p.mBuildLevel, p.mPkg.mAlias, p.mPkg.mBuildTime);
1488
                }
1495
                }
1489
            }
1496
            }
1490
            
1497
            
1491
            //  Daemon mode: Returning calculated plan
1498
            //  Daemon mode: Returning calculated plan
1492
            results.planCollection = ripplePlan;
1499
            results.planCollection = ripplePlan;
Line 1523... Line 1530...
1523
                        for (Iterator<PlannedPackage> it1 = basicPlan.planCollection.iterator(); it1.hasNext(); )
1530
                        for (Iterator<PlannedPackage> it1 = basicPlan.planCollection.iterator(); it1.hasNext(); )
1524
                        {
1531
                        {
1525
                            PlannedPackage pkg = it1.next();
1532
                            PlannedPackage pkg = it1.next();
1526
                            if (pkg.mPkg == p)
1533
                            if (pkg.mPkg == p)
1527
                            {
1534
                            {
1528
                                mLogger.info("Test Plan without {}", p.mAlias);
1535
                                mLogger.error("Test Plan without {}", p.mAlias);
1529
                                continue;
1536
                                continue;
1530
                            }
1537
                            }
1531
                        }
1538
                        }
1532
                    }
1539
                    }
1533
                    
1540
                    
1534
                    mLogger.info("Test Plan with {}", p.mAlias);
1541
                    mLogger.error("Test Plan with {}", p.mAlias);
1535
                    Package foundInRelease = mReleaseManager.findPackage(p.mAlias, fullPlanCollection);
1542
                    Package foundInRelease = mReleaseManager.findPackage(p.mAlias, fullPlanCollection);
1536
                    int foundIndex = mReleaseManager.findPackageLastIndex;
1543
                    int foundIndex = mReleaseManager.findPackageLastIndex;
1537
                    if (foundInRelease == ReleaseManager.NULL_PACKAGE)
1544
                    if (foundInRelease == ReleaseManager.NULL_PACKAGE)
1538
                    {
1545
                    {
1539
                        fullPlanCollection.add(p);
1546
                        fullPlanCollection.add(p);