-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmktest
executable file
·41 lines (38 loc) · 1.14 KB
/
mktest
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
39
40
41
#!/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 { $^W = 0 }\\
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
if false; then
(
grep -v ^t/6._ MANIFEST
for t in t/6?_*; do
echo $t
done
) >MANIFEST~ && mv MANIFEST~ MANIFEST
fi