Commit 740134f5 authored by ISWB Prasetya's avatar ISWB Prasetya
Browse files

updating G2 for SBST contest

parent fd82c632
......@@ -24,7 +24,16 @@
target="1.8">
<compilerarg value="-Xlint"/>
<classpath>
<fileset dir="${libs}">
<fileset dir="${libs}/junit">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${libs}/cli">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${libs}/asm">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${libs}/jacoco">
<include name="**/*.jar"/>
</fileset>
</classpath>
......@@ -40,7 +49,7 @@
<jar basedir="${build}/classes" destfile="${build}/${RELEASEname}_withoutdependencies.jar" />
</target>
<target name="jar" depends="compile" description="Jarring all T3 classes plus all dependencies.">
<target name="jar" depends="compile" description="Jarring all T3 classes plus all dependencies, except junit and hamcrest">
<echo>Copying licenses... </echo>
<copy file="license.txt" todir="${build}/T3/classes"/>
<copy file="gpl_license.txt" todir="${build}/T3/classes"/>
......
No preview for this file type
......@@ -8,7 +8,7 @@ import Sequenic.T3.CONSTANTS;
import Sequenic.T3.ReplayCmd;
import Sequenic.T3.DerivativeSuiteGens.Gen2.G2.TimeBudgetException;
public class G2_forSBST2016 {
public class G2_forSBST {
static class TimeOut extends Thread {
long TIMEOUT ;
......@@ -32,14 +32,13 @@ public class G2_forSBST2016 {
static void generate(
String CUTname,
String CUTrootDir,
String CUTrootDir, // the dir of the binaries
String traceDir,
String junitDir,
long timebudget,
String worklisttype,
String refinementHeuristic,
int maxNumberOfTargetRefinements,
int numberOfcores,
boolean turnOnCoverageGuidance,
boolean turnOnUseOfStaticInfo
......@@ -57,10 +56,14 @@ public class G2_forSBST2016 {
config.regressionMode = true ;
config.worklistType = worklisttype ;
config.refinementHeuristic = refinementHeuristic ;
config.generateJunitForEachSuite = true ;
config.maxNumberOfRefinements_ofEachTarget = maxNumberOfTargetRefinements ;
//config.numberOfCPUcores = numberOfcores ;
config.useCoverageGuidance = turnOnCoverageGuidance ;
config.useStaticInfo = turnOnUseOfStaticInfo ;
config.maxPrefixLength = 6 ;
config.maxSuffixLength = 1 ;
config.numberOfPrefixes = 10 ; // number of prefixes to generate whenever we want to increase them
config.includePrivateAndDefaultMembers = true ; // force private members to be tested as well...
G2.generateSuites(CUTname, config, timebudget) ;
System.exit(-1);
......@@ -70,7 +73,7 @@ public class G2_forSBST2016 {
* Not used, but maybe useful for debugging the deployment.
*/
static void replayAll(String CUTname, String traceDir) throws Throwable {
ReplayCmd.main("--bulk=trace(.*)" + CUTname + "(.*)tr --runall " + traceDir) ;
ReplayCmd.main("--bulk=trace(.*)" + CUTname + "(.*)tr --regressionmode " + traceDir) ;
}
......@@ -79,28 +82,30 @@ public class G2_forSBST2016 {
*
* If arg0 is generate, then:
* arg1 CUTname
* arg2 CUTroot-directory
* arg2 CUTroot-directory (binary)
* arg3 tracefile-directory
* arg4 junitDir
* arg5 time-budget
* arg6 worklist-type: standard/random/lowcovfirst
* arg7 trace-refinement-heuristic: random/evo
* arg8 the maximum number of times each test-target will be refined
* arg9 number of CPU cores
* arg10 whether or not to use code-coverage guidance
* arg11 whether or not to use staticinfo.txt
* arg9 whether or not to use code-coverage guidance
* arg10 whether or not to use staticinfo.txt
*
*
*if arg0 is replayall:
* arg1 CUTname
* arg2 tracefile-directory
*/
static public void main(String[] args) throws Throwable {
if (args[0].equals("generate")) {
if (args.length != 12) throw new IllegalArgumentException() ;
if (args.length != 11) throw new IllegalArgumentException() ;
long timebudget = Integer.parseInt(args[5]) ;
int maxNumberOfTargetRefinements = Integer.parseInt(args[8]) ;
int numOfCores = Integer.parseInt(args[9]) ;
boolean useCoverageGuide = Boolean.parseBoolean(args[10]) ;
boolean useStaticInfo = Boolean.parseBoolean(args[11]) ;
boolean useCoverageGuide = Boolean.parseBoolean(args[9]) ;
boolean useStaticInfo = Boolean.parseBoolean(args[10]) ;
generate(args[1],args[2],args[3],args[4],timebudget, args[6], args[7],
maxNumberOfTargetRefinements,
numOfCores,
useCoverageGuide,
useStaticInfo) ;
return ;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment