Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Narvaez <dwnarvaez@gmail.com>2012-11-16 09:53:35 (GMT)
committer Daniel Narvaez <dwnarvaez@gmail.com>2012-11-16 09:53:35 (GMT)
commit61765e0aaae479b94a3fddd01e4e12eae76bb8da (patch)
tree4c00c5555c77d70db6bd8cae2768d365d12c6702 /scripts
parent76d6fad87094008bc25e3b4e090fb79631414fec (diff)
Move the remaining scripts to commands
Diffstat (limited to 'scripts')
-rw-r--r--scripts/find-free-display.c25
-rwxr-xr-xscripts/get-screen-dpi6
-rw-r--r--scripts/list-outputs.c33
-rwxr-xr-xscripts/run-ui-tests47
-rwxr-xr-xscripts/run-with-keyring12
-rwxr-xr-xscripts/shell/start-sugar40
-rw-r--r--scripts/xinitrc62
7 files changed, 0 insertions, 225 deletions
diff --git a/scripts/find-free-display.c b/scripts/find-free-display.c
deleted file mode 100644
index 4a07131..0000000
--- a/scripts/find-free-display.c
+++ /dev/null
@@ -1,25 +0,0 @@
-#include <stdio.h>
-#include <X11/extensions/Xrandr.h>
-
-int main(int argc, char **argv)
-{
- int port;
-
- for (port = 99; port < 1000; port++) {
- char display_name[255];
-
- sprintf(display_name, ":%d", port);
- Display *dpy = XOpenDisplay(display_name);
-
- if (!dpy) {
- printf(display_name);
- return 0;
- } else {
- XCloseDisplay(dpy);
- }
- }
-
- printf("No free display found");
-
- return 0;
-}
diff --git a/scripts/get-screen-dpi b/scripts/get-screen-dpi
deleted file mode 100755
index 8165920..0000000
--- a/scripts/get-screen-dpi
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/python
-
-from gi.repository import Gtk
-
-settings = Gtk.Settings.get_default()
-print settings.get_property('gtk-xft-dpi') / 1024
diff --git a/scripts/list-outputs.c b/scripts/list-outputs.c
deleted file mode 100644
index 183258c..0000000
--- a/scripts/list-outputs.c
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <stdio.h>
-#include <X11/extensions/Xrandr.h>
-
-int main(int argc, char **argv)
-{
- Display *dpy = XOpenDisplay(NULL);
- XRRScreenResources *rr;
- XRROutputInfo *output;
- int i;
-
- XSynchronize(dpy, 1);
-
- rr = XRRGetScreenResources(dpy, DefaultRootWindow(dpy));
-
- if (rr != NULL) {
- for (i = 0; i < rr->noutput; i++) {
- output = XRRGetOutputInfo(dpy, rr, rr->outputs[i]);
-
- if (output->connection == RR_Connected) {
- printf("%s\n", output->name);
- }
-
- XRRFreeOutputInfo(output);
- }
- }
-
- XRRFreeScreenResources(rr);
-
- XSync(dpy, 1);
- XCloseDisplay(dpy);
-
- return 0;
-}
diff --git a/scripts/run-ui-tests b/scripts/run-ui-tests
deleted file mode 100755
index 5a38fb6..0000000
--- a/scripts/run-ui-tests
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/sh
-
-scriptsdir=`dirname "$0"`
-rootdir=`dirname "$scriptsdir"`
-testsdir=$rootdir/tests
-scriptsdir=$rootdir/scripts
-logsdir=$rootdir/logs
-display=`$scriptsdir/find-free-display`
-resolution=1024x768x16
-
-xvfb=`which Xvfb`
-xserver="$xvfb $display -ac -noreset -shmem -screen 0 $resolution"
-
-if [ -z "$SUGAR_BUILDBOT" ]; then
- xserver=$display
-fi
-
-export SUGAR_LOGGER_LEVEL=debug
-export GTK_MODULES=gail:atk-bridge
-export SUGAR_UI_TESTS=yes
-
-xinit $scriptsdir/xinitrc -- $xserver &
-xinitpid=$!
-
-sleep 5
-
-DISPLAY=$display python -u $testsdir/shell.py
-result=$?
-
-kill $xinitpid
-
-if [ -z "$SUGAR_BUILDBOT" ]; then
- LOGFILE=$logsdir/test-`date +%Y%m%d-%H%M%S`.log
-else
- LOGFILE=$logsdir/test.log
-fi
-
-cd ~/.sugar/ui-tests/logs
-
-for logfile in *.log
-do
- echo -e "===== $logfile =====\n" >> $LOGFILE
- cat $logfile >> $LOGFILE
- echo >> $LOGFILE
-done
-
-exit $result
diff --git a/scripts/run-with-keyring b/scripts/run-with-keyring
deleted file mode 100755
index 2925d2f..0000000
--- a/scripts/run-with-keyring
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-eval `gnome-keyring-daemon --start --components=secrets,pkcs11,ssh,gpg`
-
-export SSH_AUTH_SOCK
-export GNOME_KEYRING_CONTROL
-export GPG_AGENT_INFO
-export GNOME_KEYRING_PID
-
-exec $1
-
-kill $GNOME_KEYRING_PID
diff --git a/scripts/shell/start-sugar b/scripts/shell/start-sugar
deleted file mode 100755
index 5f5d3d4..0000000
--- a/scripts/shell/start-sugar
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/bash
-
-shelldir=`dirname "$0"`
-scriptsdir=`dirname "$shelldir"`
-rootdir=`dirname "$scriptsdir"`
-display=`$scriptsdir/find-free-display`
-
-if [ -f $rootdir/config ]; then
- source $rootdir/config
-fi
-
-if [ -n $SUGAR_DISPLAY ]; then
- SUGAR_XKBCONFIG=`mktemp -t sugar-xkbconfig-XXXXXX`
- setxkbmap -print > $SUGAR_XKBCONFIG
- export SUGAR_XKBCONFIG
-fi
-
-if [ ! -z $SUGAR_PROFILE ]; then
- grep -q PROFILE $rootdir/config
- if [ $? -eq 1 ]; then
- randomstring=`</dev/urandom tr -cd A-Za-z0-9 | head -c10`
- echo "PROFILE=$randomstring" >> $ROOT_DIR/config
- fi
-fi
-
-if [ -z $DISPLAY ]; then
- tty_num=`tty | grep -oE '[0-9]+$'`
- x_options="vt$tty_num"
-
- xinit $scriptsdir/xinitrc -- $display $x_options
-else
- screen_dpi=`$scriptsdir/get-screen-dpi`
- xephyr_options="-dpi $screen_dpi"
-
- if [ -z $RUN_IN_WINDOW ]; then
- xephyr_options="$xephyr_options -fullscreen"
- fi
-
- xinit $scriptsdir/xinitrc -- /usr/bin/Xephyr $display $xephyr_options
-fi
diff --git a/scripts/xinitrc b/scripts/xinitrc
deleted file mode 100644
index c0339aa..0000000
--- a/scripts/xinitrc
+++ /dev/null
@@ -1,62 +0,0 @@
-unset GPG_AGENT_INFO
-unset SSH_AUTH_SOCK
-unset GNOME_KEYRING_CONTROL
-unset GNOME_KEYRING_PID
-unset SESSION_MANAGER
-
-SCRIPTS_DIR=`dirname "$0"`
-ROOT_DIR=`dirname "$SCRIPTS_DIR"`
-COMMANDS_DIR=$ROOT_DIR/commands
-
-if [ ! -z $SUGAR_PROFILE ]; then
- grep -q PROFILE $ROOT_DIR/config
- if [ $? -ne 0 ]; then
- randomstring=`</dev/urandom tr -cd A-Za-z0-9 | head -c10`
- echo "PROFILE=$randomstring" >> $ROOT_DIR/config
- fi
-fi
-
-if [ -f $ROOT_DIR/config ]; then
- source $ROOT_DIR/config
-fi
-
-# Sugar doesn't handle multiple outputs properly. To avoid issues we keep the
-# first output in the list returned by xrandr and turn off everything else.
-
-OUTPUTS=`$SCRIPTS_DIR/list-outputs`
-
-for output in $OUTPUTS
-do
- # Default to the first output in the list
- if [ -z $OUTPUT ]; then
- OUTPUT=$output
- fi
-
- if [ $OUTPUT != $output ]; then
- xrandr --output $output --off
- fi
-done
-
-if [ ! -z $RESOLUTION ]; then
- xrandr -s $RESOLUTION
-fi
-
-if [ ! -z $SUGAR_UI_TESTS ]; then
- rm -rf ~/.sugar/ui-tests
- export SUGAR_PROFILE=ui-tests
-elif [ ! -z $PROFILE ]; then
- export SUGAR_PROFILE=$PROFILE
-fi
-
-if [ ! -z $SUGAR_XKBCONFIG ]; then
- cat $SUGAR_XKBCONFIG | xkbcomp - $DISPLAY 2> /dev/null
- rm $SUGAR_XKBCONFIG
-fi
-
-RUN_COMMAND="dbus-launch --exit-with-session $SCRIPTS_DIR/run-with-keyring sugar"
-
-if [ -z $SUGAR_BUILD_SHELL ]; then
- $COMMANDS_DIR/run $RUN_COMMAND
-else
- $RUN_COMMAND
-fi