Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Prasetya, S.W.B. (Wishnu)
t3
Commits
740134f5
Commit
740134f5
authored
Feb 21, 2019
by
ISWB Prasetya
Browse files
updating G2 for SBST contest
parent
fd82c632
Changes
5
Hide whitespace changes
Inline
Side-by-side
build.xml
View file @
740134f5
...
...
@@ -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"
/>
...
...
libs/.DS_Store
View file @
740134f5
No preview for this file type
libs/junit/junit_4.12.jar
0 → 100644
View file @
740134f5
File added
libs/junit/org.hamcrest.core_1.3.jar
0 → 100644
View file @
740134f5
File added
src/Sequenic/T3/DerivativeSuiteGens/Gen2/G2_forSBST
2016
.java
→
src/Sequenic/T3/DerivativeSuiteGens/Gen2/G2_forSBST.java
View file @
740134f5
...
...
@@ -8,7 +8,7 @@ import Sequenic.T3.CONSTANTS;
import
Sequenic.T3.ReplayCmd
;
import
Sequenic.T3.DerivativeSuiteGens.Gen2.G2.TimeBudgetException
;
public
class
G2_forSBST
2016
{
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 --r
unall
"
+
traceDir
)
;
ReplayCmd
.
main
(
"--bulk=trace(.*)"
+
CUTname
+
"(.*)tr --r
egressionmode
"
+
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
!=
1
2
)
throw
new
IllegalArgumentException
()
;
if
(
args
.
length
!=
1
1
)
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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment