Просмотр исходного кода

add framework code to run the installed aptitude with the current
build library in the test environment

David Kalnischkies лет назад: 15
Родитель
Сommit
b6b5a542bd
1 измененных файлов с 9 добавлено и 0 удалено
  1. 9 0
      test/integration/framework

+ 9 - 0
test/integration/framework

@@ -78,6 +78,15 @@ aptkey() { runapt apt-key $*; }
 dpkg() {
 	$(which dpkg) --root=${TMPWORKINGDIRECTORY}/rootdir --force-not-root --force-bad-path --log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log $*
 }
+aptitude() {
+	if [ -f ./aptconfig.conf ]; then
+		APT_CONFIG=aptconfig.conf LD_LIBRARY_PATH=${BUILDDIRECTORY}  $(which aptitude) $*
+	elif [ -f ../aptconfig.conf ]; then
+		APT_CONFIG=../aptconfig.conf LD_LIBRARY_PATH=${BUILDDIRECTORY} $(which aptitude) $*
+	else
+		LD_LIBRARY_PATH=${BUILDDIRECTORY}  $(which aptitude) $*
+	fi
+}
 
 setupenvironment() {
 	TMPWORKINGDIRECTORY=$(mktemp -d)