From f4c6c6ee4ffb0049b0f088d9c427c46c9a4a7181 Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Thu, 21 Sep 2017 14:26:25 +0100
Subject: [PATCH] tests: Consistently use temporary directory from libtest.sh

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 debian/tests/symbols | 9 +++------
 debian/tests/version | 9 +++------
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/debian/tests/symbols b/debian/tests/symbols
index 7ea4e9796..cbe861093 100755
--- a/debian/tests/symbols
+++ b/debian/tests/symbols
@@ -25,12 +25,9 @@ if ! bwrap --ro-bind / / true; then
     skip_all "1..0 # SKIP - cannot run bwrap"
 fi
 
-scratch="$(mktemp -d)"
-echo_tap "# Working directory: $scratch"
-cd "$scratch"
-trap 'cd /; rm -fr $scratch' EXIT
-host="${scratch}/host"
-mkdir "${host}"
+echo_tap "# Working directory: $test_tempdir"
+cd "$test_tempdir"
+host="${test_tempdir}/host"
 
 CAPSULE_SYMBOLS="$(pkg-config --variable=libexecdir capsule)/capsule-symbols"
 
diff --git a/debian/tests/version b/debian/tests/version
index 4c6f97de2..3fbed7048 100755
--- a/debian/tests/version
+++ b/debian/tests/version
@@ -25,12 +25,9 @@ if ! bwrap --ro-bind / / true; then
     skip_all "1..0 # SKIP - cannot run bwrap"
 fi
 
-scratch="$(mktemp -d)"
-echo_tap "# Working directory: $scratch"
-cd "$scratch"
-trap 'cd /; rm -fr $scratch' EXIT
-host="${scratch}/host"
-mkdir "${host}"
+echo_tap "# Working directory: $test_tempdir"
+cd "$test_tempdir"
+host="${test_tempdir}/host"
 
 CAPSULE_VERSION="$(pkg-config --variable=libexecdir capsule)/capsule-version"
 
-- 
GitLab