From: Rob Bradford <[email protected]>

This allows the test suite to strictly control the modules that get
loaded by the compositor.

https://bugs.freedesktop.org/show_bug.cgi?id=57636
---
 man/weston.man   |  3 ++-
 src/compositor.c | 11 +++++++----
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/man/weston.man b/man/weston.man
index 39d854b..04db1ec 100644
--- a/man/weston.man
+++ b/man/weston.man
@@ -128,7 +128,8 @@ instead of writing them to stderr.
 Load the comma-separated list of modules. Only used by the test
 suite. The file is searched for in
 .IR "__weston_modules_dir__" ,
-or you can pass an absolute path.
+or you can pass an absolute path. This overrides the loading of modules from
+the weston.ini file.
 .TP
 \fB\-\^S\fR\fIname\fR, \fB\-\-socket\fR=\fIname\fR
 Weston will listen in the Wayland socket called
diff --git a/src/compositor.c b/src/compositor.c
index 92d89a7..6dfa01e 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -3350,10 +3350,13 @@ int main(int argc, char *argv[])
 
        setenv("WAYLAND_DISPLAY", socket_name, 1);
 
-       if (load_modules(ec, modules, &argc, argv) < 0)
-               goto out;
-       if (load_modules(ec, option_modules, &argc, argv) < 0)
-               goto out;
+       if (option_modules) {
+               if (load_modules(ec, option_modules, &argc, argv) < 0)
+                       goto out;
+       } else {
+               if (load_modules(ec, modules, &argc, argv) < 0)
+                       goto out;
+       }
 
        for (i = 1; i < argc; i++)
                weston_log("fatal: unhandled option: %s\n", argv[i]);
-- 
1.8.3.1

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to