// server ready, spawn client
Pid client_pid;
- Process.spawn_async (null, { "test", "/dbus/arrays/client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
+ Process.spawn_async (null, { "dbus_arrays_client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
ChildWatch.add (client_pid, client_exit);
main_loop = new MainLoop ();
// server ready, spawn client
Pid client_pid;
- Process.spawn_async (null, { "test", "/dbus/async-errors/client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
+ Process.spawn_async (null, { "dbus_async_errors_client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
ChildWatch.add (client_pid, client_exit);
main_loop = new MainLoop ();
// server ready, spawn client
Pid client_pid;
- Process.spawn_async (null, { "test", "/dbus/async/client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
+ Process.spawn_async (null, { "dbus_async_client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
ChildWatch.add (client_pid, client_exit);
main_loop = new MainLoop ();
// server ready, spawn client
Pid client_pid;
- Process.spawn_async (null, { "test", "/dbus/basic-types/client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
+ Process.spawn_async (null, { "dbus_basic_types_client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
ChildWatch.add (client_pid, client_exit);
main_loop = new MainLoop ();
// server ready, spawn client
Pid client_pid;
- Process.spawn_async (null, { "test", "/dbus/bug602003/client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
+ Process.spawn_async (null, { "dbus_bug602003_client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
ChildWatch.add (client_pid, client_exit);
main_loop = new MainLoop ();
// server ready, spawn client
Pid client_pid;
- Process.spawn_async (null, { "test", "/dbus/bug735437/client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
+ Process.spawn_async (null, { "dbus_bug735437_client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
ChildWatch.add (client_pid, client_exit);
main_loop = new MainLoop ();
// server ready, spawn client
Pid client_pid;
- Process.spawn_async (null, { "test", "/dbus/bug782719/client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
+ Process.spawn_async (null, { "dbus_bug782719_client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
ChildWatch.add (client_pid, client_exit);
main_loop = new MainLoop ();
assert ((uint) request_result.get_child_value (0) == 1);
Pid client_pid;
- Process.spawn_async (null, { "test", "/dbus/bug783002/client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
+ Process.spawn_async (null, { "dbus_bug783002_client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
ChildWatch.add (client_pid, on_client_exit);
main_loop = new MainLoop ();
// server ready, spawn client
Pid client_pid;
- Process.spawn_async (null, { "test", "/dbus/dicts/client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
+ Process.spawn_async (null, { "dbus_dicts_client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
ChildWatch.add (client_pid, client_exit);
main_loop = new MainLoop ();
public interface Test : GLib.Object {
public abstract async void test1 (FooEnum e) throws DBusError;
public abstract void test2 (FooEnum e) throws DBusError;
- public abstract void test3 (FooEnum e1, UnixOutputStream output_stream, FooEnum e2) throws DBusError;
+ public abstract void test3 (FooEnum e1, int fd, FooEnum e2) throws DBusError;
public abstract void test4 (FooEnum e);
public abstract async void test5 (FooEnum e);
}
// server ready, spawn client
Pid client_pid;
- Process.spawn_async (null, { "test", "/dbus/errors/client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
+ Process.spawn_async (null, { "dbus_errors_client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
ChildWatch.add (client_pid, client_exit);
main_loop = new MainLoop ();
// server ready, spawn client
Pid client_pid;
- Process.spawn_async (null, { "test", "/dbus/filedescriptor-async/client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
+ Process.spawn_async (null, { "dbus_filedescriptor_async_client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
ChildWatch.add (client_pid, client_exit);
main_loop = new MainLoop ();
// server ready, spawn client
Pid client_pid;
- Process.spawn_async (null, { "test", "/dbus/filedescriptor-errors/client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
+ Process.spawn_async (null, { "dbus_filedescriptor_errors_client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
ChildWatch.add (client_pid, client_exit);
main_loop = new MainLoop ();
// server ready, spawn client
Pid client_pid;
- Process.spawn_async (null, { "test", "/dbus/filedescriptor/client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
+ Process.spawn_async (null, { "dbus_filedescriptor_client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
ChildWatch.add (client_pid, client_exit);
main_loop = new MainLoop ();
// server ready, spawn client
Pid client_pid;
- Process.spawn_async (null, { "test", "/dbus/rawvariants/client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
+ Process.spawn_async (null, { "dbus_rawvariants_client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
ChildWatch.add (client_pid, client_exit);
main_loop = new MainLoop ();
// server ready, spawn client
Pid client_pid;
- Process.spawn_async (null, { "test", "/dbus/signals/client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
+ Process.spawn_async (null, { "dbus_signals_client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
ChildWatch.add (client_pid, client_exit);
main_loop = new MainLoop ();
// server ready, spawn client
Pid client_pid;
- Process.spawn_async (null, { "test", "/dbus/structs/client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
+ Process.spawn_async (null, { "dbus_structs_client" }, null, SpawnFlags.DO_NOT_REAP_CHILD, null, out client_pid);
ChildWatch.add (client_pid, client_exit);
main_loop = new MainLoop ();
-X -O0 \
-X -pipe \
-X -lm \
- -X -DGETTEXT_PACKAGE=\"valac\" \
+ -X -DGETTEXT_PACKAGE=\\\"valac\\\" \
-X -Werror=return-type \
-X -Werror=init-self \
-X -Werror=implicit \
INVALIDCODE=1
INHEADER=0
testpath=${testfile/.test/}
- ns=${testpath//\//.}
- ns=${ns//-/_}
+ ns=${testpath//\//_}
+ ns=${ns//-/_}\_invalid
SOURCEFILE=$ns.vala
elif [ "$1" = "D-Bus" ]; then
+ DBUSTEST=1
run_prefix="dbus-run-session -- $run_prefix"
elif [ "$1" = "GIR" ]; then
GIRTEST=1
function sourceheader() {
if [ "$1" = "Program:" ]; then
+ if [ "$2" = "server" ]; then
+ ISSERVER=1
+ fi
testpath=${testfile/.test/}/$2
- ns=${testpath//\//.}
+ ns=${testpath//\//_}
ns=${ns//-/_}
SOURCEFILE=$ns.vala
SOURCEFILES="$SOURCEFILES $SOURCEFILE"
- echo " case \"/$testpath\": $ns.main (); break;" >> main.vala
- echo "namespace $ns {" > $SOURCEFILE
elif [ $GIRTEST -eq 1 ]; then
if [ "$1" = "Input:" ]; then
testpath=${testfile/.test/}
- ns=${testpath//\//.}
+ ns=${testpath//\//_}
ns=${ns//-/_}
SOURCEFILE=$ns.gir
cat <<EOF > $SOURCEFILE
EOF
elif [ "$1" = "Output:" ]; then
testpath=${testfile/.test/}
- ns=${testpath//\//.}
+ ns=${testpath//\//_}
ns=${ns//-/_}
SOURCEFILE=$ns.vapi.ref
fi
fi
echo "$VAPIGEN $VAPIGENFLAGS --library $ns $ns.gir && tail -n +5 $ns.vapi|sed '\$d'|diff -wu $ns.vapi.ref -" > check
else
- echo "}" >> $SOURCEFILE
- echo "./test$EXEEXT /$testpath" > check
+ PACKAGEFLAGS=$([ -z "$PACKAGES" ] || echo $PACKAGES | xargs -n 1 echo -n " --pkg")
+ echo "$VALAC $VALAFLAGS $PACKAGEFLAGS -o $ns$EXEEXT $SOURCEFILE" >> prepare
+ if [ $DBUSTEST -eq 1 ]; then
+ if [ $ISSERVER -eq 1 ]; then
+ echo "G_DEBUG=fatal-warnings ./$ns$EXEEXT" >> check
+ fi
+ else
+ echo "G_DEBUG=fatal-warnings ./$ns$EXEEXT" >> check
+ fi
fi
fi
}
mkdir $testdir
cd $testdir
-echo -n -e "TEST: Building...\033[72G"
+echo -n -e "TEST: Preparing...\033[72G"
cat << "EOF" > checkall
all=0
fail=0
EOF
-cat << "EOF" > main.vala
-void main (string[] args) {
- switch (args[1]) {
-EOF
-
PACKAGES=gio-2.0
-SOURCEFILES=
for testfile in "$@"; do
rm -f prepare check
echo 'set -e' >> prepare
case "$testfile" in
*.vala)
testpath=${testfile/.vala/}
- ns=${testpath//\//.}
+ ns=${testpath//\//_}
ns=${ns//-/_}
SOURCEFILE=$ns.vala
- SOURCEFILES="$SOURCEFILES $SOURCEFILE"
- echo " case \"/$testpath\": $ns.main (); break;" >> main.vala
- echo "namespace $ns {" > $SOURCEFILE
cat "$srcdir/$testfile" >> $SOURCEFILE
- echo "}" >> $SOURCEFILE
- echo "G_DEBUG=fatal-warnings ./test$EXEEXT /$testpath" > check
+ PACKAGEFLAGS=$([ -z "$PACKAGES" ] || echo $PACKAGES | xargs -n 1 echo -n " --pkg")
+ echo "$VALAC $VALAFLAGS $PACKAGEFLAGS -o $ns$EXEEXT $SOURCEFILE" >> prepare
+ echo "G_DEBUG=fatal-warnings ./$ns$EXEEXT" >> check
;;
*.test)
PART=0
INHEADER=1
INVALIDCODE=0
GIRTEST=0
+ DBUSTEST=0
+ ISSERVER=0
testpath=
while IFS="" read -r line; do
if [ $PART -eq 0 ]; then
fi
EOF
-cat << "EOF" >> main.vala
- default: assert_not_reached ();
- }
-}
-EOF
-
-cat $SOURCEFILES >> main.vala
-
-if $VALAC $VALAFLAGS -o test$EXEEXT $([ -z "$PACKAGES" ] || echo $PACKAGES | xargs -n 1 echo -n " --pkg") main.vala &>log; then
- echo -e "\033[0;32mOK\033[m"
-else
- echo -e "\033[0;31mFAIL\033[m"
- cat log
-
- cd $builddir
- exit 1
-fi
+echo -e "\033[0;33mDONE\033[m"
if bash checkall; then
cd $builddir