Difference between revisions of "User:Minooz/RepoSyncProj"
(→Challenges) |
(→Challenges) |
||
Line 57: | Line 57: | ||
: For Hunk Failed message, first we need to make sure it's not applied before. Second thing to check is that bases are the same. All the revisions before that new changeset even with failed build should be applied before applying the successfully built change-set. | : For Hunk Failed message, first we need to make sure it's not applied before. Second thing to check is that bases are the same. All the revisions before that new changeset even with failed build should be applied before applying the successfully built change-set. | ||
*5- If there is an uncommited message, the script can not work properly, e.g. Rev is 18+. So, error should be displayed for the uncommited change-sets. | *5- If there is an uncommited message, the script can not work properly, e.g. Rev is 18+. So, error should be displayed for the uncommited change-sets. | ||
+ | *6- To run JUnit Tests from command line: | ||
+ | : add the JUnit installation directory and the junit.jar file and also QTjava to the CLASSPATH. e.g. <code>CLASSPATH=".;D:\cygwin\home\java\junit3.0.1\junit.jar;C:\Program Files\java\jre6\lib\ext\QTjava"</code> | ||
+ | : to run a sample AllTests class go to the installation directory and run: <code> java junit.textui.TestRunner nexj.core.util.MathUtilTest </code> |
Revision as of 10:25, 26 October 2010
Contents
Repositories' Syncing
Version Control Tool
- Basic Tutorial @ http://hginit.com/
- comparing popular version control tools [1]
- Mercurial My notes on -> Min Mercurial
- CVS
- SVN
- Git
Continuous Integration System
- Comparing Different CI Systems -> CI Feature Matrix
- Hudson My notes on -> Min Hudson
- Cruise Control My notes on -> Min Cruise Control
- Buildbot My notes on -> Min Buildbot
- Apache Continuum
- Maven
- Anthill
Scripting
- A new ant script is created e.g. buildHudson.xml that triggers the target(assign1.test) of main build file(build.xml) of the project. See below:
<project name="assign1" basedir="." default="myTarget">
<target name="assign1.build.call">
<!-- Call the target that does everything -->
<ant antfile="build.xml" target="assign1.test"/>
</target>
<target name="myTarget.check" depends="assign1.build.call">
<echo>The assign1.build was called!</echo>
</target>
</project>
- 2- Bash My notes on -> Min Bash
Challenges
- 1- I was receiving an error message while trying to do a new build on Hudson. It didn't let to clone the project on Hudson workspace. The error message is "Access is denied". So I had to delete the project and create a new one. Apparently one of the reasons is that Hudson doesn't let you queue the jobs. So, if you interrupt a job that is scheduled, you'll get the error message.
- 2- To run a bash script to build the project, there are 2 ways:
- Execute Windows Batch Command:
D:\cygwin\bin\bash /home/HudsonPrac/buildHudson.sh
- Invoke an Ant Script
<project name="assign1" basedir=".">
<target name="myTarget" >
<exec executable="D:\cygwin\bin\bash" newenvironment="false">
<arg value="/home/HudsonPrac/buildHudson.sh"/>
</exec>
</target>
</project>
- 3- Since the bash script is running in Windows platform through Cygwin, there are some conflicts,
so the PATH was changed to: PATH=/usr/bin:$PATH Read more about some conflicts here
- 4- If there was an error applying a patch to a repository e.g.
hg import patch12.patch
, there might be a problem with line numbers merging issue. So, there will be an error created with this message: "Hunk #1 Failed". There are some ways to remove the hunks manually or just ignore that patch, if the later versions are fixed.
- By "hunk" I mean a "snippet of change", i.e. a part of the "diff". TortoiseHg uses this terminology and so does darcs. – Deniz Dogan
- For Hunk Failed message, first we need to make sure it's not applied before. Second thing to check is that bases are the same. All the revisions before that new changeset even with failed build should be applied before applying the successfully built change-set.
- 5- If there is an uncommited message, the script can not work properly, e.g. Rev is 18+. So, error should be displayed for the uncommited change-sets.
- 6- To run JUnit Tests from command line:
- add the JUnit installation directory and the junit.jar file and also QTjava to the CLASSPATH. e.g.
CLASSPATH=".;D:\cygwin\home\java\junit3.0.1\junit.jar;C:\Program Files\java\jre6\lib\ext\QTjava"
- to run a sample AllTests class go to the installation directory and run:
java junit.textui.TestRunner nexj.core.util.MathUtilTest