~aacid/ubuntu-ui-toolkit/nonsquareicons

« back to all changes in this revision

Viewing changes to tests/unit/runtest.sh

  • Committer: Tarmac
  • Author(s): Zsombor Egri
  • Date: 2014-12-05 16:36:12 UTC
  • mfrom: (1363.1.2 app-theming-to-staging)
  • Revision ID: tarmac-20141205163612-7yub32shpe3zm1e2
Theming fixes: application theming, binding loop fix, auto-theming moved into MainView and it is applicable only on Ambiance and SuruDark, SuruGradient is no longer auto-themed. Fixes: https://bugs.launchpad.net/bugs/1213043, https://bugs.launchpad.net/bugs/1277647, https://bugs.launchpad.net/bugs/1330510, https://bugs.launchpad.net/bugs/1356779, https://bugs.launchpad.net/bugs/1389792.

Approved by PS Jenkins bot, Christian Dywan.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
18
18
################################################################################
19
19
 
20
 
. `dirname $0`/../../build_paths.inc
21
 
 
22
20
_CMD=""
23
 
_TARGETPATH=$1
24
 
_TESTFILEPATH=$2
 
21
_TARGET=$1
 
22
_TESTFILE=$2
25
23
_MINIMAL=$3
26
 
 
27
 
_TARGET=$(basename $1)
28
 
_TESTFILE=$(basename $2)
29
 
_IMPORT_PATH="${BUILD_DIR}/modules:$QML2_IMPORT_PATH"
30
 
_THEMES_PATH="${BUILD_DIR}/modules"
31
 
_XML="${BUILD_DIR}/tests/test_$_TARGET_$_TESTFILE.xml"
32
 
 
 
24
_XML="../../test_$_TARGET_$_TESTFILE.xml"
33
25
_ARGS="-p -o -p $_XML,xunitxml -p -o -p -,txt"
34
 
 
35
26
set +e
36
27
 
37
28
function create_test_cmd {
38
 
        if [[ "$_TARGETPATH" = /* ]]; then
39
 
      _CMD="dbus-test-runner --task $_TARGETPATH -n $_TESTFILE -m 300"  
40
 
        else
41
 
      _CMD="dbus-test-runner --task ./$_TARGETPATH -n $_TESTFILE -m 300"
42
 
        fi
43
 
 
 
29
  _CMD="dbus-test-runner --task ./$_TARGET -n $_TESTFILE -m 300"
44
30
  if [ "$_MINIMAL" = "minimal" ]; then
45
31
      _CMD="$_CMD -p -platform -p minimal"
46
32
  fi
47
 
 
48
 
  if [ $_TARGETPATH != $_TESTFILEPATH ]; then
49
 
      _CMD="$_CMD -p -input -p $_TESTFILEPATH"
 
33
  if [ $_TARGET != $_TESTFILE ]; then
 
34
      _CMD="$_CMD -p -input -p $_TESTFILE"
50
35
  fi
51
36
  _CMD="$_CMD -p -maxwarnings -p 40"
52
37
}
53
38
 
54
39
function execute_test_cmd {
55
40
  echo "Executing $_CMD $_ARGS"
56
 
  echo "Working directory: $PWD"
57
 
  if [ ! -x $_TARGETPATH ]; then
 
41
  if [ ! -x $_TARGET ]; then
58
42
    echo "Error: $_TARGET wasn't built!"
59
43
    RESULT=2
60
44
  elif [ $DISPLAY ]; then
61
45
    # https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1256999
62
46
    # https://bugreports.qt-project.org/browse/QTBUG-36243
63
 
        
64
 
    QML2_IMPORT_PATH=${_IMPORT_PATH} UBUNTU_UI_TOOLKIT_THEMES_PATH=${_THEMES_PATH} \
 
47
    QML2_IMPORT_PATH=../../../modules:$QML2_IMPORT_PATH UBUNTU_UI_TOOLKIT_THEMES_PATH=../../../modules \
65
48
    ALARM_BACKEND=memory \
66
 
    SUPPRESS_SERVICEPROPERTIES_WARNINGS=yes \
67
49
    $_CMD $_ARGS 2>&1 | grep -v 'QFontDatabase: Cannot find font directory'
68
50
    # Note: Get first command before the pipe, $? would be ambiguous
69
51
    RESULT=${PIPESTATUS[0]}