~ubuntu-branches/debian/sid/subversion/sid

« back to all changes in this revision

Viewing changes to subversion/tests/libsvn_subr/named_atomic-test-proc.c

  • Committer: Package Import Robot
  • Author(s): James McCoy, Peter Samuelson, James McCoy
  • Date: 2014-01-12 19:48:33 UTC
  • mfrom: (0.2.10)
  • Revision ID: package-import@ubuntu.com-20140112194833-w3axfwksn296jn5x
Tags: 1.8.5-1
[ Peter Samuelson ]
* New upstream release.  (Closes: #725787) Rediff patches:
  - Remove apr-abi1 (applied upstream), rename apr-abi2 to apr-abi
  - Remove loosen-sqlite-version-check (shouldn't be needed)
  - Remove java-osgi-metadata (applied upstream)
  - svnmucc prompts for a changelog if none is provided. (Closes: #507430)
  - Remove fix-bdb-version-detection, upstream uses "apu-config --dbm-libs"
  - Remove ruby-test-wc (applied upstream)
  - Fix “svn diff -r N file” when file has svn:mime-type set.
    (Closes: #734163)
  - Support specifying an encoding for mod_dav_svn's environment in which
    hooks are run.  (Closes: #601544)
  - Fix ordering of “svnadmin dump” paths with certain APR versions.
    (Closes: #687291)
  - Provide a better error message when authentication fails with an
    svn+ssh:// URL.  (Closes: #273874)
  - Updated Polish translations.  (Closes: #690815)

[ James McCoy ]
* Remove all traces of libneon, replaced by libserf.
* patches/sqlite_3.8.x_workaround: Upstream fix for wc-queries-test test
  failurse.
* Run configure with --with-apache-libexecdir, which allows removing part of
  patches/rpath.
* Re-enable auth-test as upstream has fixed the problem of picking up
  libraries from the environment rather than the build tree.
  (Closes: #654172)
* Point LD_LIBRARY_PATH at the built auth libraries when running the svn
  command during the build.  (Closes: #678224)
* Add a NEWS entry describing how to configure mod_dav_svn to understand
  UTF-8.  (Closes: #566148)
* Remove ancient transitional package, libsvn-ruby.
* Enable compatibility with Sqlite3 versions back to Wheezy.
* Enable hardening flags.  (Closes: #734918)
* patches/build-fixes: Enable verbose build logs.
* Build against the default ruby version.  (Closes: #722393)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * named_atomic-test-proc.c:  a collection of svn_named_atomic__t tests
 
3
 *
 
4
 * ====================================================================
 
5
 *    Licensed to the Apache Software Foundation (ASF) under one
 
6
 *    or more contributor license agreements.  See the NOTICE file
 
7
 *    distributed with this work for additional information
 
8
 *    regarding copyright ownership.  The ASF licenses this file
 
9
 *    to you under the Apache License, Version 2.0 (the
 
10
 *    "License"); you may not use this file except in compliance
 
11
 *    with the License.  You may obtain a copy of the License at
 
12
 *
 
13
 *      http://www.apache.org/licenses/LICENSE-2.0
 
14
 *
 
15
 *    Unless required by applicable law or agreed to in writing,
 
16
 *    software distributed under the License is distributed on an
 
17
 *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 
18
 *    KIND, either express or implied.  See the License for the
 
19
 *    specific language governing permissions and limitations
 
20
 *    under the License.
 
21
 * ====================================================================
 
22
 */
 
23
 
 
24
/* ====================================================================
 
25
   To add tests, look toward the bottom of this file.
 
26
*/
 
27
 
 
28
 
 
29
#include <stdio.h>
 
30
 
 
31
/* shared test implementation */
 
32
#include "named_atomic-test-common.h"
 
33
 
 
34
/* Very simple process frame around the actual test code */
 
35
int
 
36
main(int argc, const char *argv[])
 
37
{
 
38
  svn_boolean_t got_error = FALSE;
 
39
  apr_pool_t *pool;
 
40
  svn_error_t *err;
 
41
 
 
42
  int id = 0;
 
43
  int count = 0;
 
44
  int iterations = 0;
 
45
 
 
46
  /* Initialize APR (Apache pools) */
 
47
  if (apr_initialize() != APR_SUCCESS)
 
48
    {
 
49
      printf("apr_initialize() failed.\n");
 
50
      exit(1);
 
51
    }
 
52
 
 
53
  pool = svn_pool_create(NULL);
 
54
 
 
55
  /* lean & mean parameter parsing */
 
56
  if (argc != 5)
 
57
    {
 
58
      if (argc == 1) /* used to test that this executable can be started */
 
59
        exit(0);
 
60
 
 
61
      printf("Usage: named_atomic-proc-test ID COUNT ITERATIONS NS.\n");
 
62
      exit(1);
 
63
    }
 
64
 
 
65
  id = (int)apr_atoi64(argv[1]);
 
66
  count = (int)apr_atoi64(argv[2]);
 
67
  iterations = (int)apr_atoi64(argv[3]);
 
68
  name_namespace = argv[4];
 
69
 
 
70
  /* run test routine */
 
71
 
 
72
  err = test_pipeline(id, count, iterations, pool);
 
73
  if (err)
 
74
  {
 
75
    const char *prefix = apr_psprintf(pool, "Process %d: ", id);
 
76
    got_error = TRUE;
 
77
    svn_handle_error2(err, stdout, FALSE, prefix);
 
78
    svn_error_clear(err);
 
79
  }
 
80
 
 
81
  /* Clean up APR */
 
82
  svn_pool_destroy(pool);
 
83
  apr_terminate();
 
84
 
 
85
  return got_error;
 
86
}