@@ -16,9 +16,6 @@ usage() {
16 echo "Script to run the shell.\n" >&2
16 echo "Script to run the shell.\n" >&2
17 echo "OPTIONS:" >&2
17 echo "OPTIONS:" >&2
18 echo " -f, --fake Force use of fake Qml modules." >&2
18 echo " -f, --fake Force use of fake Qml modules." >&2
19− echo " -p, --pinlock Use a pin protected user." >&2
20− echo " -k, --keylock Use a passphrase protected user." >&2
21− echo " -l, --lightdm Use the specified lightdm mock." >&2
22 echo " -g, --gdb Run through gdb." >&2
19 echo " -g, --gdb Run through gdb." >&2
23 echo " -h, --help Show this help." >&2
20 echo " -h, --help Show this help." >&2
24 echo " -m, --nomousetouch Run without -mousetouch argument." >&2
21 echo " -m, --nomousetouch Run without -mousetouch argument." >&2
@@ -26,7 +23,7 @@ usage() {
29−ARGS=`getopt -n$0 -u -a --longoptions="fake,pinlock,keylock,gdb,help,lightdm:,nomousetouch" -o "fpkl:ghm" -- "$@"`
26+ARGS=`getopt -n$0 -u -a --longoptions="fake,gdb,help:,nomousetouch" -o "fpkl:ghm" -- "$@"`
30[ $? -ne 0 ] && usage
27[ $? -ne 0 ] && usage
31eval set -- "$ARGS"
28eval set -- "$ARGS"
@@ -34,12 +31,6 @@ while [ $# -gt 0 ]
35 case "$1" in
32 case "$1" in
36 -f|--fake) USE_MOCKS=true;;
33 -f|--fake) USE_MOCKS=true;;
37− -p|--pinlock) USE_MOCKS=true; LIGHTDM_MOCK=single-pin;;
38− -k|--keylock) USE_MOCKS=true; LIGHTDM_MOCK=single-passphrase;;
39− -l|--lightdm) LIGHTDM_MOCK=$2; shift;
40− if [ -z "$LIGHTDM_MOCK" ]; then
41− echo "Please specify an argument to --lightdm"
43 -g|--gdb) GDB=true;;
34 -g|--gdb) GDB=true;;
44 -h|--help) usage;;
35 -h|--help) usage;;
45 -m|--nomousetouch) MOUSE_TOUCH=false;;
36 -m|--nomousetouch) MOUSE_TOUCH=false;;
@@ -52,19 +43,13 @@ if [ -z "$LIGHTDM_MOCK" ]; then
52 LIGHTDM_MOCK=single
43 LIGHTDM_MOCK=single
55−# Even without USE_MOCKS set, we want to fake our lightdm backend, because it's
56−# annoying to be prompted for your password when testing. To get the same
57−# backend used in production, pass '--lightdm=demo'.
58−export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/builddir/tests/mocks/LightDM/$LIGHTDM_MOCK
60if $USE_MOCKS; then
47if $USE_MOCKS; then
61 rm -f $PWD/builddir/nonmirplugins/LightDM # undo symlink (from below) for cleanliness
48 rm -f $PWD/builddir/nonmirplugins/LightDM # undo symlink (from below) for cleanliness
62 export QML2_IMPORT_PATH=$QML2_IMPORT_PATH:$PWD/builddir/tests/mocks:$PWD/builddir/plugins:$PWD/builddir/modules
49 export QML2_IMPORT_PATH=$QML2_IMPORT_PATH:$PWD/builddir/tests/mocks:$PWD/builddir/plugins:$PWD/builddir/modules
63− export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/builddir/tests/mocks/libusermetrics
50+ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/builddir/tests/mocks/libusermetrics:$PWD/builddir/tests/mocks/LightDM/liblightdm
65− # Just link our LightDM mock into the nonmirplugins folder. We don't want
52+ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/builddir/plugins/LightDM/liblightdm
66− # the rest of our plugins to be used.
67− ln -sf $PWD/builddir/tests/mocks/LightDM $PWD/builddir/nonmirplugins/
70QML_PHONE_SHELL_ARGS=""
55QML_PHONE_SHELL_ARGS=""