| Line 5... |
Line 5... |
| 5 |
import com.erggroup.buildtool.daemon.BuildThread;
|
5 |
import com.erggroup.buildtool.daemon.BuildThread;
|
| 6 |
import com.erggroup.buildtool.daemon.MasterThread;
|
6 |
import com.erggroup.buildtool.daemon.MasterThread;
|
| 7 |
import com.erggroup.buildtool.daemon.SlaveThread;
|
7 |
import com.erggroup.buildtool.daemon.SlaveThread;
|
| 8 |
import com.erggroup.buildtool.ripple.MutableString;
|
8 |
import com.erggroup.buildtool.ripple.MutableString;
|
| 9 |
import com.erggroup.buildtool.ripple.ReleaseManager;
|
9 |
import com.erggroup.buildtool.ripple.ReleaseManager;
|
| 10 |
|
- |
|
| - |
|
10 |
import com.erggroup.buildtool.ripple.Package;
|
| 11 |
import com.erggroup.buildtool.ripple.RippleEngine;
|
11 |
import com.erggroup.buildtool.ripple.RippleEngine;
|
| 12 |
|
12 |
|
| 13 |
import java.io.File;
|
13 |
import java.io.File;
|
| 14 |
import java.io.FileReader;
|
14 |
import java.io.FileReader;
|
| 15 |
import java.io.FileWriter;
|
15 |
import java.io.FileWriter;
|
| 16 |
import java.io.IOException;
|
16 |
import java.io.IOException;
|
| - |
|
17 |
import java.util.Vector;
|
| 17 |
|
18 |
|
| 18 |
import org.apache.log4j.Logger;
|
19 |
import org.apache.log4j.Logger;
|
| 19 |
import org.apache.log4j.xml.DOMConfigurator;
|
20 |
import org.apache.log4j.xml.DOMConfigurator;
|
| 20 |
|
21 |
|
| 21 |
import org.junit.AfterClass;
|
22 |
import org.junit.AfterClass;
|
| Line 658... |
Line 659... |
| 658 |
}
|
659 |
}
|
| 659 |
|
660 |
|
| 660 |
moreBuildFiles = rippleEngine.getFirstBuildFileContent(buildFileContent);
|
661 |
moreBuildFiles = rippleEngine.getFirstBuildFileContent(buildFileContent);
|
| 661 |
assertTrue(moreBuildFiles);
|
662 |
assertTrue(moreBuildFiles);
|
| 662 |
}
|
663 |
}
|
| - |
|
664 |
|
| - |
|
665 |
/**test method designed to test ripple field limits
|
| - |
|
666 |
* 1 tests applyPV returns 1 for package with version a.b.1.2.0
|
| - |
|
667 |
*/
|
| - |
|
668 |
@Test
|
| - |
|
669 |
public void TestRippleFieldLimits()
|
| - |
|
670 |
{
|
| - |
|
671 |
ReleaseManager rm = new ReleaseManager();
|
| - |
|
672 |
// for test purposes, p.mId will contain the return value of applyPV
|
| - |
|
673 |
// test applyPV returns 1 and leaves mVersion alone
|
| - |
|
674 |
Package p = new Package(rm, "a.b.1.2.0", 255, 255, 255, 255);
|
| - |
|
675 |
assertTrue( p.getId() == 1 );
|
| - |
|
676 |
assertTrue( p.getVersion().compareTo( "a.b.1.2.0" ) == 0);
|
| - |
|
677 |
|
| - |
|
678 |
// test applyPV returns 2 and leaves mVersion alone
|
| - |
|
679 |
p = new Package( rm, "1.0.0000", 0, 0, 0, 0 );
|
| - |
|
680 |
assertTrue( p.getId() == 2 );
|
| - |
|
681 |
assertTrue( p.getVersion().compareTo( "1.0.0000" ) == 0);
|
| - |
|
682 |
|
| - |
|
683 |
// test applyPV returns 2 and leaves mVersion alone
|
| - |
|
684 |
p = new Package( rm, "1.0.0009", 0, 0, 0, 9 );
|
| - |
|
685 |
assertTrue( p.getId() == 2 );
|
| - |
|
686 |
assertTrue( p.getVersion().compareTo( "1.0.0009" ) == 0);
|
| - |
|
687 |
|
| - |
|
688 |
// test applyPV returns 2 and leaves mVersion alone
|
| - |
|
689 |
p = new Package( rm, "1.0.9000", 0, 0, 9, 0 );
|
| - |
|
690 |
assertTrue( p.getId() == 2 );
|
| - |
|
691 |
assertTrue( p.getVersion().compareTo( "1.0.9000" ) == 0);
|
| - |
|
692 |
|
| - |
|
693 |
// test applyPV returns 2 and leaves mVersion alone
|
| - |
|
694 |
p = new Package( rm, "1.9.0000", 0, 9, 0, 0 );
|
| - |
|
695 |
assertTrue( p.getId() == 2 );
|
| - |
|
696 |
assertTrue( p.getVersion().compareTo( "1.9.0000" ) == 0);
|
| - |
|
697 |
|
| - |
|
698 |
// test applyPV returns 2 and leaves mVersion alone
|
| - |
|
699 |
p = new Package( rm, "1.0.0000", 1, 0, 0, 0 );
|
| - |
|
700 |
assertTrue( p.getId() == 2 );
|
| - |
|
701 |
assertTrue( p.getVersion().compareTo( "1.0.0000" ) == 0);
|
| - |
|
702 |
|
| - |
|
703 |
// test applyPV returns 2 and leaves mVersion alone - wince style limits
|
| - |
|
704 |
p = new Package( rm, "9.9.9000", 9, 9, 9, 0 );
|
| - |
|
705 |
assertTrue( p.getId() == 2 );
|
| - |
|
706 |
assertTrue( p.getVersion().compareTo( "9.9.9000" ) == 0);
|
| - |
|
707 |
|
| - |
|
708 |
// test applyPV returns 0 and sets mVersion from 8.8.8000 to 8.8.9000
|
| - |
|
709 |
p = new Package( rm, "8.8.8000", 9, 9, 9, 0 );
|
| - |
|
710 |
assertTrue( p.getId() == 0 );
|
| - |
|
711 |
assertTrue( p.getVersion().compareTo( "8.8.9000" ) == 0);
|
| - |
|
712 |
|
| - |
|
713 |
// test applyPV returns 0 and sets mVersion from 8.8.9000 to 8.9.0000
|
| - |
|
714 |
p = new Package( rm, "8.8.9000", 9, 9, 9, 0 );
|
| - |
|
715 |
assertTrue( p.getId() == 0 );
|
| - |
|
716 |
assertTrue( p.getVersion().compareTo( "8.9.0000" ) == 0);
|
| - |
|
717 |
|
| - |
|
718 |
// test applyPV returns 0 and sets mVersion from 8.9.9000 to 9.0.0000
|
| - |
|
719 |
p = new Package( rm, "8.9.9000", 9, 9, 9, 0 );
|
| - |
|
720 |
assertTrue( p.getId() == 0 );
|
| - |
|
721 |
assertTrue( p.getVersion().compareTo( "9.0.0000" ) == 0);
|
| - |
|
722 |
|
| - |
|
723 |
// test applyPV returns 2 and leaves mVersion alone - mos style limits
|
| - |
|
724 |
p = new Package( rm, "99.99.0000", 99, 99, 0, 0 );
|
| - |
|
725 |
assertTrue( p.getId() == 2 );
|
| - |
|
726 |
assertTrue( p.getVersion().compareTo( "99.99.0000" ) == 0);
|
| - |
|
727 |
|
| - |
|
728 |
// test applyPV returns 0 and sets mVersion from 98.98.0000 to 98.99.0000
|
| - |
|
729 |
p = new Package( rm, "98.98.0000", 99, 99, 0, 0 );
|
| - |
|
730 |
assertTrue( p.getId() == 0 );
|
| - |
|
731 |
assertTrue( p.getVersion().compareTo( "98.99.0000" ) == 0);
|
| - |
|
732 |
|
| - |
|
733 |
// test applyPV returns 0 and sets mVersion from 98.99.0000 to 99.0.0000
|
| - |
|
734 |
p = new Package( rm, "98.99.0000", 99, 99, 0, 0 );
|
| - |
|
735 |
assertTrue( p.getId() == 0 );
|
| - |
|
736 |
assertTrue( p.getVersion().compareTo( "99.0.0000" ) == 0);
|
| - |
|
737 |
|
| - |
|
738 |
}
|
| 663 |
}
|
739 |
}
|