[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-schemafuzz] branch master updated: added cleanup mec
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-schemafuzz] branch master updated: added cleanup mechanism, created Objects to store the response Vector |
Date: |
Thu, 12 Jul 2018 17:04:52 +0200 |
This is an automated email from the git hooks/post-receive script.
erwan-ulrich pushed a commit to branch master
in repository schemafuzz.
The following commit(s) were added to refs/heads/master by this push:
new ad6fb89 added cleanup mechanism, created Objects to store the
response Vector
ad6fb89 is described below
commit ad6fb89f89c9fb064433bc4b704c1cf21ce04fe6
Author: Feideus <address@hidden>
AuthorDate: Thu Jul 12 17:04:45 2018 +0200
added cleanup mechanism, created Objects to store the response Vector
---
cleanup.sh | 5 ++
errorReports/parsedStackTrace_test_c_crash | 72 ----------------------
src/main/java/org/schemaspy/DBFuzzer.java | 9 +++
.../org/schemaspy/cli/CommandLineArguments.java | 9 +++
.../java/org/schemaspy/model/ReportVector.java | 39 ++++++++++++
.../java/org/schemaspy/model/StackTraceLine.java | 38 ++++++++++++
stackTraceCParser.sh | 9 +--
7 files changed, 105 insertions(+), 76 deletions(-)
diff --git a/cleanup.sh b/cleanup.sh
new file mode 100644
index 0000000..3dc205e
--- /dev/null
+++ b/cleanup.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+rm errorReports/parsedStackTrace_*
+
+
diff --git a/errorReports/parsedStackTrace_test_c_crash
b/errorReports/parsedStackTrace_test_c_crash
deleted file mode 100644
index 4ace6c1..0000000
--- a/errorReports/parsedStackTrace_test_c_crash
+++ /dev/null
@@ -1,72 +0,0 @@
-tmpfun2 tmpfun main
-test_c_crash.c test_c_crash.c
-21 16
-tmpfun2 tmpfun main
-test_c_crash.c test_c_crash.c
-21 16
-tmpfun2 tmpfun main
-test_c_crash.c test_c_crash.c
-21 16
-tmpfun2 tmpfun main
-test_c_crash.c test_c_crash.c
-21 16
-tmpfun2 tmpfun main
-test_c_crash.c test_c_crash.c
-21 16
-tmpfun2 tmpfun main
-test_c_crash.c test_c_crash.c
-21 16
-tmpfun2 tmpfun main
-test_c_crash.c test_c_crash.c
-21 16
-tmpfun2 tmpfun main
-test_c_crash.c test_c_crash.c
-21 16
-tmpfun2 tmpfun main
-test_c_crash.c test_c_crash.c
-21 16
-tmpfun2 tmpfun main
-test_c_crash.c test_c_crash.c
-21 16
-tmpfun2 tmpfun main
-test_c_crash.c test_c_crash.c
-21 16
-tmpfun2 tmpfun main
-test_c_crash.c test_c_crash.c
-21 16
-tmpfun2 tmpfun main
-test_c_crash.c test_c_crash.c
-21 16
-tmpfun2 tmpfun main
-test_c_crash.c test_c_crash.c
-21 16
-tmpfun2 tmpfun main
-test_c_crash.c test_c_crash.c
-21 16
-tmpfun2 tmpfun main
-test_c_crash.c test_c_crash.c
-21 16
-tmpfun2 tmpfun main
-test_c_crash.c test_c_crash.c
-21 16
-tmpfun2 tmpfun main
-test_c_crash.c test_c_crash.c
-21 16
-tmpfun2 tmpfun main
-test_c_crash.c test_c_crash.c
-21 16
-tmpfun2 tmpfun main
-test_c_crash.c test_c_crash.c
-21 16
-tmpfun2 tmpfun main
-test_c_crash.c test_c_crash.c
-21 16
-tmpfun2 tmpfun main
-test_c_crash.c test_c_crash.c
-21 16
-tmpfun2 tmpfun main
-test_c_crash.c test_c_crash.c
-21 16
-tmpfun2 tmpfun main
-test_c_crash.c test_c_crash.c
-21 16
diff --git a/src/main/java/org/schemaspy/DBFuzzer.java
b/src/main/java/org/schemaspy/DBFuzzer.java
index cb1b085..a78b9db 100644
--- a/src/main/java/org/schemaspy/DBFuzzer.java
+++ b/src/main/java/org/schemaspy/DBFuzzer.java
@@ -204,6 +204,15 @@ public class DBFuzzer
removeTemporaryCascade();
printMutationTree();
+ if(analyzer.getCommandLineArguments().getReport().equals("y") ||
analyzer.getCommandLineArguments().getReport().equals("yes"))
+ {
+ LOGGER.info("CLEAN UP");
+ try {
+ Process evaluatorProcess = new ProcessBuilder("/bin/bash",
"./cleanup.sh").start();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
System.out.println("ending process");
return returnStatus;
}
diff --git a/src/main/java/org/schemaspy/cli/CommandLineArguments.java
b/src/main/java/org/schemaspy/cli/CommandLineArguments.java
index 87f36d6..973e0e5 100644
--- a/src/main/java/org/schemaspy/cli/CommandLineArguments.java
+++ b/src/main/java/org/schemaspy/cli/CommandLineArguments.java
@@ -130,6 +130,13 @@ public class CommandLineArguments {
)
private String target;
+ @Parameter(
+ names = {
+ "-nr", "--no-report"
+ }
+ )
+ private String report; // Needs to be modified so that no futher argument
is needed (currently requires a "y" after the "-nr")
+
/* TODO Password handling is more complex, see Config class (prompt for
password, fallback to Environment variable, multiple schemas, etc.)
@Parameter(
names = {
@@ -219,4 +226,6 @@ public class CommandLineArguments {
public String getTarget() {return target; }
+ public String getReport() {return report; }
+
}
diff --git a/src/main/java/org/schemaspy/model/ReportVector.java
b/src/main/java/org/schemaspy/model/ReportVector.java
new file mode 100644
index 0000000..595c9a9
--- /dev/null
+++ b/src/main/java/org/schemaspy/model/ReportVector.java
@@ -0,0 +1,39 @@
+package org.schemaspy.model;
+
+import java.util.ArrayList;
+
+public class ReportVector {
+ private ArrayList<StackTraceLine> stackTrace;
+ private int codeCoverage; //unused right now
+ GenericTreeNode parentMutation;
+
+ public ReportVector(ArrayList<StackTraceLine> stackTrace, int
codeCoverage, GenericTreeNode parentMutation) {
+ this.stackTrace = stackTrace;
+ this.codeCoverage = codeCoverage;
+ this.parentMutation = parentMutation;
+ }
+
+ public ArrayList<StackTraceLine> getStackTrace() {
+ return stackTrace;
+ }
+
+ public void setStackTrace(ArrayList<StackTraceLine> stackTrace) {
+ this.stackTrace = stackTrace;
+ }
+
+ public int getCodeCoverage() {
+ return codeCoverage;
+ }
+
+ public void setCodeCoverage(int codeCoverage) {
+ this.codeCoverage = codeCoverage;
+ }
+
+ public GenericTreeNode getParentMutation() {
+ return parentMutation;
+ }
+
+ public void setParentMutation(GenericTreeNode parentMutation) {
+ this.parentMutation = parentMutation;
+ }
+}
diff --git a/src/main/java/org/schemaspy/model/StackTraceLine.java
b/src/main/java/org/schemaspy/model/StackTraceLine.java
new file mode 100644
index 0000000..36271cb
--- /dev/null
+++ b/src/main/java/org/schemaspy/model/StackTraceLine.java
@@ -0,0 +1,38 @@
+package org.schemaspy.model;
+
+public class StackTraceLine {
+
+ private String functionname;
+ private String fileName;
+ private int lineNumber;
+
+ public StackTraceLine(String functionname, String fileName, int
lineNumber) {
+ this.functionname = functionname;
+ this.fileName = fileName;
+ this.lineNumber = lineNumber;
+ }
+
+ public String getFunctionname() {
+ return functionname;
+ }
+
+ public void setFunctionname(String functionname) {
+ this.functionname = functionname;
+ }
+
+ public String getFileName() {
+ return fileName;
+ }
+
+ public void setFileName(String fileName) {
+ this.fileName = fileName;
+ }
+
+ public int getLineNumber() {
+ return lineNumber;
+ }
+
+ public void setLineNumber(int lineNumber) {
+ this.lineNumber = lineNumber;
+ }
+}
diff --git a/stackTraceCParser.sh b/stackTraceCParser.sh
index 069ab45..b49e2f3 100644
--- a/stackTraceCParser.sh
+++ b/stackTraceCParser.sh
@@ -58,11 +58,12 @@ echo "line numbers : " "address@hidden"
var=`shuf -i 1-10000 -n 1`;
reportFileName=parsedStackTrace_$binaryWithoutExtention_$var
-touch $reportFileName
+touch errorReports/$reportFileName
-echo "address@hidden" >> errorReports/$reportFileName
-echo "address@hidden" >> errorReports/$reportFileName
-echo "address@hidden" >> errorReports/$reportFileName
+echo "address@hidden" >> errorReport/$reportFileName
+echo "address@hidden" >> errorReport/$reportFileName
+echo "address@hidden" >> errorReport/$reportFileName
rm errorReports/core
rm errorReports/stackTrace_$binaryWithoutExtention
+
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-schemafuzz] branch master updated: added cleanup mechanism, created Objects to store the response Vector,
gnunet <=