mktest 1.21 KB
Newer Older
1 2 3 4 5 6 7 8
#!/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
9
61_fltk         AnyEvent::Impl::FLTK
10 11 12 13 14 15 16 17
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
18
70_uv           AnyEvent::Impl::UV
19
71_prima	AnyEvent::Impl::Prima
20 21 22 23 24 25 26
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.*/\\
27
         BEGIN { $^W = 0 }\\
28 29 30 31 32 33 34 35
         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

36 37 38 39 40 41 42 43
if false; then
   (
      grep -v ^t/6._ MANIFEST
      for t in t/6?_*; do
         echo $t
      done
   ) >MANIFEST~ && mv MANIFEST~ MANIFEST
fi