summaryrefslogtreecommitdiff
path: root/source3/printing/tests
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-05-11 17:29:48 -0700
committerJeremy Allison <jra@samba.org>2009-05-11 17:29:48 -0700
commit14c1e9fae2a34d77b0ba21ffb570e84b6e433a14 (patch)
tree90be4b0f743cc004d913017d8ced6bfe35d3d748 /source3/printing/tests
parentd0865aeb5dfcb21f7fd525129a59834556c94b27 (diff)
downloadsamba-14c1e9fae2a34d77b0ba21ffb570e84b6e433a14.tar.gz
samba-14c1e9fae2a34d77b0ba21ffb570e84b6e433a14.tar.bz2
samba-14c1e9fae2a34d77b0ba21ffb570e84b6e433a14.zip
Hopefully fix the buildfarm. Add some debug level 10 messages
I used to track down the vlp problem, change the vlp test printer not to use a static path of /tmp/vlp.tdb for the virtual print database (as this will eventually fill up). Cause it to use a virtual print database inside the cachepath. Jeremy.
Diffstat (limited to 'source3/printing/tests')
-rw-r--r--source3/printing/tests/vlp.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/source3/printing/tests/vlp.c b/source3/printing/tests/vlp.c
index 286e4a4b39..ec610d94e5 100644
--- a/source3/printing/tests/vlp.c
+++ b/source3/printing/tests/vlp.c
@@ -21,7 +21,6 @@
#include "includes.h"
-#define PRINT_TDB "/tmp/vlp.tdb"
#define PRINT_FIRSTJOB "100"
static TDB_CONTEXT *tdb;
@@ -376,6 +375,7 @@ static int lpresume_command(int argc, char **argv)
int main(int argc, char **argv)
{
/* Parameter check */
+ char *printdb_path = NULL;
if (argc == 1) {
usage();
@@ -384,15 +384,24 @@ int main(int argc, char **argv)
/* Initialise */
- if (!(tdb = tdb_open(PRINT_TDB, 0, 0, O_RDWR | O_CREAT,
+#if 0
+ printdb_path = "/tmp/vlp.tdb";
+#else
+ if (asprintf(&printdb_path, "%svlp.tdb",
+ cache_path("printing/"))) {
+ return 1;
+ }
+#endif
+
+ if (!(tdb = tdb_open(printdb_path, 0, 0, O_RDWR | O_CREAT,
0666))) {
- printf("%s: unable to open %s\n", argv[0], PRINT_TDB);
+ printf("%s: unable to open %s\n", argv[0], printdb_path);
return 1;
}
/* Ensure we are modes 666 */
- chmod(PRINT_TDB, 0666);
+ chmod(printdb_path, 0666);
/* Do commands */