@@ -93,13 +93,20 @@ void KleeRunner::runKlee(const std::vector<tests::TestMethod> &testMethods,
93
93
std::move (writeFunctor));
94
94
}
95
95
96
- fs::path KleeRunner::getKleeMethodOutFile (const TestMethod &method) {
96
+ fs::path KleeRunner::getKleeMethodOutDir (const TestMethod &method) {
97
97
fs::path kleeOutDir = Paths::getKleeOutDir (projectTmpPath);
98
98
fs::path relative =
99
99
Paths::removeExtension (fs::relative (method.sourceFilePath , projectContext.projectPath ));
100
100
return kleeOutDir / relative / (" klee_out_" + method.methodName );
101
101
}
102
102
103
+ fs::path KleeRunner::getKleeFileOutDir (const fs::path &filepath) {
104
+ fs::path kleeOutDir = Paths::getKleeOutDir (projectTmpPath);
105
+ fs::path relative = Paths::removeExtension (fs::relative (filepath, projectContext.projectPath ));
106
+ return kleeOutDir / relative / (" klee_out_" + Paths::removeExtension (filepath.filename ()).string ());
107
+ }
108
+
109
+
103
110
namespace {
104
111
void clearUnusedData (const fs::path &kleeDir) {
105
112
fs::remove (kleeDir / " assembly.ll" );
@@ -198,7 +205,7 @@ void KleeRunner::processBatchWithoutInteractive(MethodKtests &ktestChunk,
198
205
199
206
std::string entryPoint = KleeUtils::entryPointFunction (tests, testMethod.methodName , true );
200
207
std::string entryPointFlag = StringUtils::stringFormat (" --entry-point=%s" , entryPoint);
201
- auto kleeOut = getKleeMethodOutFile (testMethod);
208
+ auto kleeOut = getKleeMethodOutDir (testMethod);
202
209
fs::create_directories (kleeOut.parent_path ());
203
210
std::string outputDir = " --output-dir=" + kleeOut.string ();
204
211
std::vector<std::string> argvData = { " klee" ,
@@ -259,7 +266,7 @@ void KleeRunner::processBatchWithInteractive(const std::vector<tests::TestMethod
259
266
TestMethod testMethod = testMethods[0 ];
260
267
std::string entryPoint = KleeUtils::entryPointFunction (tests, testMethod.methodName , true );
261
268
std::string entryPointFlag = StringUtils::stringFormat (" --entry-point=%s" , entryPoint);
262
- auto kleeOut = getKleeMethodOutFile (testMethod );
269
+ auto kleeOut = getKleeFileOutDir (tests. sourceFilePath );
263
270
fs::create_directories (kleeOut.parent_path ());
264
271
265
272
fs::path entrypoints = kleeOut.parent_path () / " entrypoints.txt" ;
0 commit comments