File: mktest

package info (click to toggle)
libanyevent-perl 7.010-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,528 kB
  • sloc: perl: 6,349; sh: 108; makefile: 10
file content (38 lines) | stat: -rwxr-xr-x 1,105 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh

# this creates duplicate tests for each event loop, and then deletes those
# that fail due to bugs in them.
# also patches MANIFEST.

(
cat <<EOF
61_fltk         AnyEvent::Impl::FLTK
62_cocoa        AnyEvent::Impl::Cocoa
63_eventlib     AnyEvent::Impl::EventLib
64_glib         AnyEvent::Impl::Glib
65_event        AnyEvent::Impl::Event
66_ioasync      AnyEvent::Impl::IOAsync
67_tk           AnyEvent::Impl::Tk
68_poe          AnyEvent::Impl::POE $^W = 0;
69_ev           AnyEvent::Impl::EV
EOF
) | while read base module extra; do
   for test in 01 02 03 04 05 07 09; do
      set -- t/"$test"_*.t
      t=${1#t/}
      <t/"$t" \
      sed -e "s/.*require AnyEvent::Impl::Perl.*/\\
         BEGIN { \$ENV{PERL_ANYEVENT_LOOP_TESTS} or ((print qq{1..0 # SKIP PERL_ANYEVENT_LOOP_TESTS not true\\\\n}), exit 0) }\\
         BEGIN { eval q{use $module;1} or ((print qq{1..0 # SKIP $module not loadable\\\\n}), exit 0) }\\
         $extra\\
      /" \
      >t/"$base"_$t
   done
done

(
   grep -v ^t/6._ MANIFEST
   for t in t/6?_*; do
      echo $t
   done
) >MANIFEST~ && mv MANIFEST~ MANIFEST