Commit f3ba4991 authored by Kevin Bi's avatar Kevin Bi
Browse files

"Moved the triangle dir to the src directory, updated the build.xml file to...

"Moved the triangle dir to the src directory, updated the build.xml file to have a target to run tarantula"
parent 9aada868
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -73,15 +73,16 @@ the dir to be evaluated and the tacoco directory, see the script for more inform
	- ./run-jacoco /absolute/path/to/repo/triangle triangle /absolute/path/to/repo/tacoco

4. Compile the Tarantula classes (in the tarantula dir)
	- ant compile-tarantula	
	- ant compile	

NOTE: currently the run target is not working, it is unable to find the second argument
5. Run Tarantula's Main: Main requires two args(see the file for more details), the first is the absolute path to the cov-matrix.json file, the second is the name of the Test class, if the test program belongs to a package make sure to specify the package, ex: Triangle.TestSuite. 
	-  ant -Darg0=/abs/path/to/triangle-compact-cov-matrix.json -Darg1=triangle.src.test.java.TestSuite run-tarantula
	-  ant -Darg0=/abs/path/to/triangle-compact-cov-matrix.json -Darg1=triangle.TestSuite run.tarantula

6. Clean the tacoco dir: Run clean-tacoco in order to clean the dir so it can be reused, this means tacoco will have to be recompiled
	- ./clean-tacoco
	- mvn clean package (in tacoco dir)
	- ant clean (in base dir)i

Directory Structure
-------------------
@@ -97,11 +98,11 @@ The directory structure is as follows
		|
		|--- tacoco:                    Repo, used to obtain per-test line coverage information
		|
		|--- src:                       Source files for tarantula java implementation
		|--- src:                       Source files
		    |
		    |--- triangle:              Test program, maven build


                    |
                    |--- tarantula:             Java implementation of tarantula            
	


+9 −4
Original line number Diff line number Diff line
@@ -4,27 +4,32 @@
<property name="tarantula.bin.dir" value ="./bin"/>

<!-- Target to clean up -->
    <target name="clean.tarantula" description="Clean">
    <target name="clean" description="Clean">
        <delete dir="./bin"/>
    </target>

<!-- Target to initialize build -->
    <target name="init.tarantula">
    <target name="init">
        <mkdir dir="./bin"/>
    </target>

<!-- Target to compile the project -->
    <target name="compile.tarantula" depends="init.tarantula" description="Compile">
    <target name="compile" depends="init" description="Compile">
        <javac includeantruntime="true" srcdir="${tarantula.src.dir}" destdir="${tarantula.bin.dir}" debug="yes" fork="no">
            <classpath>
                <pathelement path="lib/json-simple-1.1.1.jar"/>
                <pathelement path="lib/junit-4.11.jar"/>
            </classpath>
        </javac>
        <javac includeantruntime="true" srcdir="./src/triangle" destdir="${tarantula.bin.dir}" debug="yes" fork="no">
            <classpath>
                <pathelement path="lib/junit-4.11.jar"/>
            </classpath>
        </javac>
    </target>

<!-- Target to run the main-->
    <target name="run.tarantula" depends="compile.tarantula">
    <target name="run.tarantula" depends="compile">
        <java classname="tarantula.Main">
            <classpath>
               <pathelement path="lib/json-simple-1.1.1.jar"/>
+3 −3
Original line number Diff line number Diff line
tarantula
---------
Tarantula Java Implementation
----------------------------
The classes in the tarantula directory are used to take the information from the json file produced by tacoco and junit tests on the program and 
then use the information to caculate the supsciousness for the lines of a program using the tarantula technique. Refer to the documentation
in the classes for more information.
@@ -34,4 +34,4 @@ TarantulaMain Class
-------------------
The main class for the project. Requires two command line arguments
	-(1) absolute path to json file - This should be in the tacoco dir after running the scripts in fl-scripts
	-(2) the name of the test program - TestSuite (the class is in a package include the packace in the name ex: Triangle.TestSuite)
	-(2) the name of the test program - TestSuite (the class is in a package include the packace in the name ex: triangle.TestSuite)
+0 −0

File moved.

Loading