← Back to team overview

ayatana-commits team mailing list archive

[Branch ~indicator-applet-developers/dbus-test-runner/trunk] Rev 18: Switching the tests to use autotest. Better output.

 

------------------------------------------------------------
revno: 18
committer: Ted Gould <ted@xxxxxxxx>
branch nick: trunk
timestamp: Wed 2009-12-02 16:58:02 -0600
message:
  Switching the tests to use autotest.  Better output.
modified:
  src/dbus-test-runner.c
  tests/Makefile.am


--
lp:dbus-test-runner
https://code.launchpad.net/~indicator-applet-developers/dbus-test-runner/trunk

Your team ayatana-commits is subscribed to branch lp:dbus-test-runner.
To unsubscribe from this branch go to https://code.launchpad.net/~indicator-applet-developers/dbus-test-runner/trunk/+edit-subscription.
=== modified file 'src/dbus-test-runner.c'
--- src/dbus-test-runner.c	2009-06-17 21:07:49 +0000
+++ src/dbus-test-runner.c	2009-12-02 22:58:02 +0000
@@ -118,6 +118,8 @@
 
 	g_print("DBus address: %s\n", line);
 	g_setenv("DBUS_SESSION_BUS_ADDRESS", line, TRUE);
+	g_setenv("DBUS_STARTER_ADDRESS", line, TRUE);
+	g_setenv("DBUS_STARTER_BUS_TYPE", "session", TRUE);
 	g_free(line);
 
 	g_list_foreach(tasks, start_task, NULL);

=== modified file 'tests/Makefile.am'
--- tests/Makefile.am	2009-06-17 21:26:09 +0000
+++ tests/Makefile.am	2009-12-02 22:58:02 +0000
@@ -1,27 +1,47 @@
-check: tests
 
 DBUS_RUNNER=../src/dbus-test-runner --dbus-config $(srcdir)/../data/session.conf
-
-tests: test-simple test-manytask test-ignore test-ignore-second test-invert test-invert-second test-param
-
+TESTS = 
+DISTCLEANFILES = $(TESTS)
+
+TESTS += test-simple
 test-simple:
-	$(DBUS_RUNNER) --task true
+	@echo "#!/bin/sh" > $@
+	@echo $(DBUS_RUNNER) --task true >> $@
+	@chmod +x $@
 
+TESTS += test-manytask
 test-manytask:
-	$(DBUS_RUNNER) --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true
+	@echo "#!/bin/sh" > $@
+	@echo $(DBUS_RUNNER) --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true --task true >> $@
+	@chmod +x $@
 
+TESTS += test-ignore
 test-ignore:
-	$(DBUS_RUNNER) --task false --ignore-return
+	@echo "#!/bin/sh" > $@
+	@echo $(DBUS_RUNNER) --task false --ignore-return >> $@
+	@chmod +x $@
 
+TESTS += test-ignore-second
 test-ignore-second:
-	$(DBUS_RUNNER) --task true --task false --ignore-return
+	@echo "#!/bin/sh" > $@
+	@echo $(DBUS_RUNNER) --task true --task false --ignore-return >> $@
+	@chmod +x $@
 
+TESTS += test-invert
 test-invert:
-	$(DBUS_RUNNER) --task false --invert-return
+	@echo "#!/bin/sh" > $@
+	@echo $(DBUS_RUNNER) --task false --invert-return >> $@
+	@chmod +x $@
 
+TESTS += test-invert-second
 test-invert-second:
-	$(DBUS_RUNNER) --task true --task false --invert-return
+	@echo "#!/bin/sh" > $@
+	@echo $(DBUS_RUNNER) --task true --task false --invert-return >> $@
+	@chmod +x $@
 
+TESTS += test-param
 test-param:
-	$(DBUS_RUNNER) --task rm --parameter bob --task touch --parameter bob --ignore-return
+	@echo "#!/bin/sh" > $@
+	@echo $(DBUS_RUNNER) --task rm --parameter bob --task touch --parameter bob --ignore-return >> $@
+	@chmod +x $@