Permalink
Browse files

tests: Reduce time needed for a make check

  • Loading branch information...
1 parent 27abcc5 commit 249a81db9dc4bc1c2d27c2fec7194e53eb665f30 @mkbosmans committed Oct 4, 2011
Showing with 9 additions and 12 deletions.
  1. +1 −6 src/tests/interpol-test.c
  2. +4 −4 src/tests/lock-autospawn-test.c
  3. +1 −1 src/tests/once-test.c
  4. +3 −1 src/tests/rtpoll-test.c
@@ -174,12 +174,7 @@ int main(int argc, char *argv[]) {
pa_assert_se(pa_threaded_mainloop_start(m) >= 0);
-/* #ifdef CORK */
- for (k = 0; k < 20000; k++)
-/* #else */
-/* for (k = 0; k < 2000; k++) */
-/* #endif */
- {
+ for (k = 0; k < 4000; k++) {
pa_bool_t success = FALSE, changed = FALSE;
pa_usec_t t, rtc, d;
struct timeval now, tv;
@@ -38,9 +38,9 @@ static void thread_func(void*k) {
pa_assert_se(pa_autospawn_lock_acquire(TRUE) > 0);
- pa_log("%i, Got the lock!, Sleeping for 5s", PA_PTR_TO_INT(k));
+ pa_log("%i, Got the lock!, Sleeping for 2s", PA_PTR_TO_INT(k));
- pa_msleep(5000);
+ pa_msleep(2000);
pa_log("%i, Releasing", PA_PTR_TO_INT(k));
@@ -74,9 +74,9 @@ static void thread_func2(void *k) {
pa_log("%i, woke up", PA_PTR_TO_INT(k));
}
- pa_log("%i, Got the lock!, Sleeping for 5s", PA_PTR_TO_INT(k));
+ pa_log("%i, Got the lock!, Sleeping for 2s", PA_PTR_TO_INT(k));
- pa_msleep(5000);
+ pa_msleep(2000);
pa_log("%i, Releasing", PA_PTR_TO_INT(k));
View
@@ -40,7 +40,7 @@ static pthread_barrier_t barrier;
#endif
static unsigned n_cpu;
-#define N_ITERATIONS 500
+#define N_ITERATIONS 200
#define N_THREADS 100
static void once_func(void) {
View
@@ -23,6 +23,8 @@
#include <signal.h>
+#include <pulse/timeval.h>
+
#include <pulsecore/poll.h>
#include <pulsecore/log.h>
#include <pulsecore/rtpoll.h>
@@ -59,7 +61,7 @@ int main(int argc, char *argv[]) {
w = pa_rtpoll_item_new(p, PA_RTPOLL_NORMAL, 0);
pa_rtpoll_item_set_before_callback(w, worker);
- pa_rtpoll_set_timer_relative(p, 10000000); /* 10 s */
+ pa_rtpoll_set_timer_relative(p, 4 * PA_USEC_PER_SEC);
pa_rtpoll_run(p, 1);

0 comments on commit 249a81d

Please sign in to comment.