~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/archive/concurrency_test.cc

Added the testsuite location finding code to support in-plugin-dir test suites.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
  Just a test application for threads.
22
22
  */
23
23
 
24
 
#include "config.h"
 
24
#include "drizzled/global.h"
25
25
 
26
26
#include "azio.h"
 
27
#include <mysys/my_getopt.h>
27
28
#include <stdio.h>
28
29
#include <stdlib.h>
29
30
#include <sys/types.h>
37
38
#ifndef __WIN__
38
39
#include <sys/wait.h>
39
40
#endif
40
 
#include <memory>
41
41
 
42
42
#ifdef __WIN__
43
43
#define srandom  srand
45
45
#define snprintf _snprintf
46
46
#endif
47
47
 
48
 
#include <boost/scoped_ptr.hpp>
49
 
 
50
48
#include "azio.h"
51
49
 
52
50
#define DEFAULT_INITIAL_LOAD 10000
104
102
{
105
103
 
106
104
  unsigned int method;
107
 
  drizzled::internal::my_init();
 
105
  my_init();
108
106
 
109
107
  MY_INIT(argv[0]);
110
108
 
139
137
{
140
138
  unsigned int x;
141
139
  uint64_t total;
142
 
  boost::scoped_ptr<azio_stream> writer_handle_ap(new azio_stream);
143
 
  azio_stream &writer_handle= *writer_handle_ap.get();
 
140
  azio_stream writer_handle;
144
141
  thread_context_st *context;
145
142
  pthread_t mainthread;            /* Thread descriptor */
146
143
  pthread_attr_t attr;          /* Thread attributes */
195
192
    if (pthread_create(&mainthread, &attr, timer_thread,
196
193
                       (void *)&opt_timer_length) != 0)
197
194
    {
198
 
      fprintf(stderr,"%s: Could not create timer thread\n", drizzled::internal::my_progname);
 
195
      fprintf(stderr,"%s: Could not create timer thread\n", my_progname);
199
196
      exit(1);
200
197
    }
201
198
  }
267
264
  uint64_t count;
268
265
  int ret;
269
266
  int error;
270
 
  boost::scoped_ptr<azio_stream> reader_handle_ap(new azio_stream);
271
 
  azio_stream &reader_handle= *reader_handle_ap.get();
 
267
  azio_stream reader_handle;
272
268
 
273
269
  if (!(ret= azopen(&reader_handle, TEST_FILENAME, O_RDONLY,
274
270
                    context->use_aio)))