From 159717ce08a7c50b8c8ad3500fc2a48cd8563773 Mon Sep 17 00:00:00 2001
From: "Andre Moreira Magalhaes (andrunko)" <andre.magalhaes@collabora.co.uk>
Date: Fri, 9 Nov 2018 11:42:17 -0200
Subject: [PATCH] Allow running run-aa-test outside testdir

Signed-off-by: Andre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>
---
 run-aa-test | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/run-aa-test b/run-aa-test
index d1a5276..347676e 100755
--- a/run-aa-test
+++ b/run-aa-test
@@ -8,7 +8,8 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-. common/common-apparmor.sh
+PWD=$(cd $(dirname $0); pwd; cd - >/dev/null 2>&1)
+. ${PWD}/common-apparmor.sh
 
 ALTERNATIVE_SEPARATOR="## alternative ##"
 END=2
@@ -81,7 +82,7 @@ else
 	CMD="$*"
 fi
 
-CMDLINE="common/run-test-in-systemd"
+CMDLINE="${PWD}/run-test-in-systemd"
 if [ ! -x $CMDLINE ]; then
 	echo "common/run-test-in-systemd not found"
 	exit 1
-- 
GitLab