~brianaker/libmemcached/merge-of-1.0

« back to all changes in this revision

Viewing changes to libtest/framework.cc

  • Committer: Continuous Integration
  • Date: 2013-05-04 09:21:59 UTC
  • mfrom: (1102.1.1 libmemcached-1.2)
  • Revision ID: ci@tangent.org-20130504092159-z0z9cm0gnu15wxs0
Merge lp:~tangent-org/libmemcached/1.2-build/ Build: jenkins-Libmemcached-297

Show diffs side-by-side

added added

removed removed

Lines of Context:
107
107
       iter != _collection.end() and (_signal.is_shutdown() == false);
108
108
       ++iter)
109
109
  {
110
 
    if (_only_run.empty() == false and
111
 
        fnmatch(_only_run.c_str(), (*iter)->name(), 0))
112
 
    {
113
 
      continue;
114
 
    }
115
 
 
116
 
    _total++;
117
 
 
118
 
    try {
119
 
      switch ((*iter)->exec())
120
 
      {
121
 
      case TEST_FAILURE:
122
 
        _failed++;
123
 
        break;
124
 
 
125
 
      case TEST_SKIPPED:
126
 
        _skipped++;
127
 
        break;
128
 
 
129
 
        // exec() can return SUCCESS, but that doesn't mean that some tests did
130
 
        // not fail or get skipped.
131
 
      case TEST_SUCCESS:
132
 
        _success++;
133
 
        break;
134
 
      }
135
 
    }
136
 
    catch (const libtest::fatal& e)
137
 
    {
138
 
      _failed++;
139
 
      stream::cerr(e.file(), e.line(), e.func()) << e.what();
140
 
    }
141
 
    catch (const libtest::disconnected& e)
142
 
    {
143
 
      _failed++;
144
 
      Error << "Unhandled disconnection occurred:" << e.what();
145
 
      throw;
146
 
    }
147
 
    catch (...)
148
 
    {
149
 
      _failed++;
150
 
      throw;
 
110
    if (*iter)
 
111
    {
 
112
      if (_only_run.empty() == false and
 
113
          fnmatch(_only_run.c_str(), (*iter)->name(), 0))
 
114
      {
 
115
        continue;
 
116
      }
 
117
 
 
118
      _total++;
 
119
 
 
120
      try {
 
121
        switch ((*iter)->exec())
 
122
        {
 
123
          case TEST_FAILURE:
 
124
            _failed++;
 
125
            break;
 
126
 
 
127
          case TEST_SKIPPED:
 
128
            _skipped++;
 
129
            break;
 
130
 
 
131
            // exec() can return SUCCESS, but that doesn't mean that some tests did
 
132
            // not fail or get skipped.
 
133
          case TEST_SUCCESS:
 
134
            _success++;
 
135
            break;
 
136
        }
 
137
      }
 
138
      catch (const libtest::fatal& e)
 
139
      {
 
140
        _failed++;
 
141
        stream::cerr(e.file(), e.line(), e.func()) << e.what();
 
142
      }
 
143
      catch (const libtest::disconnected& e)
 
144
      {
 
145
        _failed++;
 
146
        Error << "Unhandled disconnection occurred:" << e.what();
 
147
        throw;
 
148
      }
 
149
      catch (...)
 
150
      {
 
151
        _failed++;
 
152
        throw;
 
153
      }
151
154
    }
152
155
  }
153
156