~ubuntu-branches/ubuntu/trusty/wayland/trusty

« back to all changes in this revision

Viewing changes to tests/test-runner.c

  • Committer: Package Import Robot
  • Author(s): Hector Oron, Timo Aaltonen, Hector Oron
  • Date: 2013-10-11 11:23:38 UTC
  • mfrom: (1.1.15) (0.4.2 sid)
  • Revision ID: package-import@ubuntu.com-20131011112338-2jg0z6ncpm9qnots
Tags: 1.3.0-1
[ Timo Aaltonen ]
* control: Bump the libwayland0 C/R to (<< 1.1.0) so that it covers
  the ubuntu version too, and add it to -cursor.

[ Hector Oron ]
* New upstream stable release (1.3.0).
* Add myself to Uploaders.
* Switch to Debian source format 3.0 quilt.
* d/libwayland-dev.install:
  - install wayland documentation

Show diffs side-by-side

added added

removed removed

Lines of Context:
111
111
run_test(const struct test *t)
112
112
{
113
113
        int cur_alloc = num_alloc;
114
 
        int cur_fds;
 
114
        int cur_fds, num_fds;
115
115
 
116
116
        cur_fds = count_open_fds();
117
117
        t->run();
118
118
        if (leak_check_enabled) {
119
 
                assert(cur_alloc == num_alloc && "memory leak detected in test.");
120
 
                assert(cur_fds == count_open_fds() && "fd leak detected");
 
119
                if (cur_alloc != num_alloc) {
 
120
                        fprintf(stderr, "Memory leak detected in test. "
 
121
                                "Allocated %d blocks, unfreed %d\n", num_alloc,
 
122
                                num_alloc - cur_alloc);
 
123
                        abort();
 
124
                }
 
125
                num_fds = count_open_fds();
 
126
                if (cur_fds != num_fds) {
 
127
                        fprintf(stderr, "fd leak detected in test. "
 
128
                                "Opened %d files, unclosed %d\n", num_fds,
 
129
                                num_fds - cur_fds);
 
130
                        abort();
 
131
                }
121
132
        }
122
133
        exit(EXIT_SUCCESS);
123
134
}