From: Martin Mares Date: Mon, 10 Sep 2007 15:17:38 +0000 (+0200) Subject: A subset of tests can be requested now. Also, the radix sort width X-Git-Tag: holmes-import~506^2~13^2~29 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=89e1c88c0d904e474f134cde37b78c8dedd4b9d1;p=libucw.git A subset of tests can be requested now. Also, the radix sort width can be overridden by making with `CEXTRA="-DFORCE_RADIX_BITS=n"'. --- diff --git a/lib/sorter/sort-test.c b/lib/sorter/sort-test.c index 71c6a12f..208de918 100644 --- a/lib/sorter/sort-test.c +++ b/lib/sorter/sort-test.c @@ -21,6 +21,13 @@ #include #include +/*** A hack for overriding radix-sorter configuration ***/ + +#ifdef FORCE_RADIX_BITS +#undef CONFIG_UCW_RADIX_SORTER_BITS +#define CONFIG_UCW_RADIX_SORTER_BITS FORCE_RADIX_BITS +#endif + /*** Time measurement ***/ static timestamp_t timer; @@ -663,9 +670,20 @@ main(int argc, char **argv) goto usage; break; case 't': - t = atol(optarg); - if (t >= TMAX) - goto usage; + { + char *w[32]; + int f = sepsplit(optarg, ',', w, ARRAY_SIZE(w)); + if (f < 0) + goto usage; + t = 0; + for (int i=0; i= TMAX) + goto usage; + t |= 1 << j; + } + } break; case 'v': sorter_trace++; @@ -678,10 +696,8 @@ main(int argc, char **argv) if (optind != argc) goto usage; - if (t != ~0U) - run_test(t, size); - else - for (uns i=0; i