summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKrzysztof Kowalczyk <kkowalczyk@gmail.com>2007-09-24 21:08:58 -0700
committerKrzysztof Kowalczyk <kkowalczyk@gmail.com>2007-09-24 21:08:58 -0700
commitbde8c9669ca6b43cb6a664bd14df164a718041ea (patch)
tree22f907ef1e445a28cb0c00cd031874569720a593 /test
parentbf9b46b012c64624818a2110af7c4b7e3b419728 (diff)
Con't copy the file unless COPY_FILE is defined.
Diffstat (limited to 'test')
-rw-r--r--test/perf-test.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/perf-test.cc b/test/perf-test.cc
index 068d2a01..fe02a743 100644
--- a/test/perf-test.cc
+++ b/test/perf-test.cc
@@ -22,6 +22,12 @@
#include <windows.h>
#endif
+// Define COPY_FILE if you want the file to be copied to a local disk first
+// before it's tested. This is desired if a file is on a slow drive.
+// Currently copying only works on Windows.
+// Not enabled by default.
+//#define COPY_FILE 1
+
#include <assert.h>
#include <config.h>
#include <stdio.h>
@@ -862,10 +868,13 @@ static void RenderPdf(const char *fileName)
const char *fileNameSplash = NULL;
PdfEnginePoppler * engineSplash = NULL;
+#ifdef COPY_FILE
// TODO: fails if file already exists and has read-only attribute
CopyFile(fileName, POPPLER_TMP_NAME, false);
fileNameSplash = POPPLER_TMP_NAME;
-
+#else
+ fileNameSplash = fileName;
+#endif
LogInfo("started: %s\n", fileName);
engineSplash = new PdfEnginePoppler();