about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
-rw-r--r--test/Feature/KleeStatsColumns.test6
-rw-r--r--test/Feature/KleeStatsCsv.test8
-rw-r--r--test/Feature/KleeStatsEmpty.test6
3 files changed, 16 insertions, 4 deletions
diff --git a/test/Feature/KleeStatsColumns.test b/test/Feature/KleeStatsColumns.test
index 6fcbdf4b..1ebe1e37 100644
--- a/test/Feature/KleeStatsColumns.test
+++ b/test/Feature/KleeStatsColumns.test
@@ -1,4 +1,8 @@
-RUN: %klee-stats --print-all %S/klee-stats/missing_column %S/klee-stats/run %S/klee-stats/additional_column | FileCheck %s
+// sqlite databases must be opened with write permissions, so we copy the test cases to the output dir
+RUN: rm -rf %t.klee-stats
+RUN: mkdir %t.klee-stats
+RUN: cp -r %S/klee-stats/missing_column %S/klee-stats/run %S/klee-stats/additional_column %t.klee-stats/
+RUN %klee-stats --print-all %t.klee-stats/missing_column %t.klee-stats/run %t.klee-stats/additional_column | FileCheck %s
 
 // Path, Instrs, ..., extra_column
 CHECK: {{^}}| missing_column  |        |{{.*}}|             |{{$}}
diff --git a/test/Feature/KleeStatsCsv.test b/test/Feature/KleeStatsCsv.test
index 26bfac09..e923f68d 100644
--- a/test/Feature/KleeStatsCsv.test
+++ b/test/Feature/KleeStatsCsv.test
@@ -1,5 +1,9 @@
-RUN: %klee-stats --table-format=csv %S/klee-stats/run | FileCheck --check-prefix=CHECK-CSV %s
-RUN: %klee-stats --table-format=readable-csv %S/klee-stats/run | FileCheck --check-prefix=CHECK-READABLECSV %s
+// sqlite databases must be opened with write permissions, so we copy the test cases to the output dir
+RUN: rm -rf %t.klee-stats
+RUN: mkdir %t.klee-stats
+RUN: cp -r %S/klee-stats/run %t.klee-stats/
+RUN: %klee-stats --table-format=csv %t.klee-stats/run | FileCheck --check-prefix=CHECK-CSV %s
+RUN: %klee-stats --table-format=readable-csv %t.klee-stats/run | FileCheck --check-prefix=CHECK-READABLECSV %s
 
 CHECK-CSV: Path,Instrs,Time(s),ICov(%),BCov(%),ICount,TSolver(%)
 CHECK-CSV: klee-stats/run,3,0.00,100.00,100.00,3,0.00
diff --git a/test/Feature/KleeStatsEmpty.test b/test/Feature/KleeStatsEmpty.test
index aae1fee1..64524f38 100644
--- a/test/Feature/KleeStatsEmpty.test
+++ b/test/Feature/KleeStatsEmpty.test
@@ -1,4 +1,8 @@
-RUN: %klee-stats %S/klee-stats/empty | FileCheck %s
+// sqlite databases must be opened with write permissions, so we copy the test cases to the output dir
+RUN: rm -rf %t.klee-stats
+RUN: mkdir %t.klee-stats
+RUN: cp -r %S/klee-stats/empty %t.klee-stats/
+RUN: %klee-stats %t.klee-stats/empty | FileCheck %s
 
 CHECK: {{^}}|{{ *}}Path{{ *}}|{{$}}
 CHECK: {{^}}|{{.*}}empty{{ *}}|{{$}}