src/tests: Fix runtest with simple.xml
Now simple.xml.in is replaced with simple.xml and modify runtest to copy simple.xml. BUG=https://github.com/ibus/ibus/issues/2153
This commit is contained in:
Родитель
37db75bf59
Коммит
6879879002
|
@ -91,6 +91,19 @@ func_copy_component () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func_copy_simple_xml () {
|
||||||
|
file=$1
|
||||||
|
base=`func_basename $file`
|
||||||
|
libexecdir=`func_dirname $file`
|
||||||
|
# top_srcdir != top_builddir in make dist
|
||||||
|
libexecdir=`echo "$libexecdir" | sed -e "s|$top_srcdir|$top_builddir|"`
|
||||||
|
if test -f $file; then
|
||||||
|
mkdir -p components
|
||||||
|
sed "s|\(<exec>\).*\(/ibus-engine-simple</exec>\)|\1$libexecdir\2|" \
|
||||||
|
< $file > components/$base
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
trap 'func_cleanup $tstdir' 1 2 3 15
|
trap 'func_cleanup $tstdir' 1 2 3 15
|
||||||
|
|
||||||
tst=$1; shift
|
tst=$1; shift
|
||||||
|
@ -127,7 +140,7 @@ run_test_case()
|
||||||
exit -1
|
exit -1
|
||||||
fi
|
fi
|
||||||
# func_copy_component replaces s/$top_srcdir/%top_builddir/
|
# func_copy_component replaces s/$top_srcdir/%top_builddir/
|
||||||
func_copy_component "../$top_srcdir/engine/simple.xml"
|
func_copy_simple_xml "../$top_srcdir/engine/simple.xml"
|
||||||
func_copy_component "../$top_srcdir/conf/memconf/memconf.xml"
|
func_copy_component "../$top_srcdir/conf/memconf/memconf.xml"
|
||||||
|
|
||||||
IBUS_COMPONENT_PATH=$PWD/components
|
IBUS_COMPONENT_PATH=$PWD/components
|
||||||
|
|
Загрузка…
Ссылка в новой задаче