summaryrefslogtreecommitdiffstats
path: root/solenv/qa
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2016-10-13 23:24:44 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2016-10-13 23:25:40 +0200
commitfcb7ee7aad1c798157bc84e418742a42cb625ae6 (patch)
treed11326d693681073c974a0216750909750669096 /solenv/qa
parentgbuildtoide does not need deps (diff)
downloadcore-fcb7ee7aad1c798157bc84e418742a42cb625ae6.tar.gz
core-fcb7ee7aad1c798157bc84e418742a42cb625ae6.zip
use tempdir for test
Change-Id: Ie218f87dc2f1c1b6031cc08f2027cfcf392c6c21
Diffstat (limited to 'solenv/qa')
-rw-r--r--solenv/qa/python/gbuildtoide.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/solenv/qa/python/gbuildtoide.py b/solenv/qa/python/gbuildtoide.py
index 6184f9170115..71c67754e6ab 100644
--- a/solenv/qa/python/gbuildtoide.py
+++ b/solenv/qa/python/gbuildtoide.py
@@ -21,17 +21,19 @@ import unittest
import json
import os
import os.path
+import tempfile
class CheckGbuildToIde(unittest.TestCase):
def test_gbuildtoide(self):
+ tempwork = tempfile.mkdtemp()
os.chdir(os.path.join(os.environ['SRCDIR'], 'solenv', 'qa', 'python', 'selftest'))
- subprocess.check_call(['make', 'gbuildtoide'])
- jsonfiles = os.listdir(os.path.join(os.environ['WORKDIR'], 'GbuildToIde', 'Library'))
+ subprocess.check_call(['make', 'gbuildtoide', 'WORKDIR=%s' % tempwork])
+ jsonfiles = os.listdir(os.path.join(tempwork, 'GbuildToIde', 'Library'))
gbuildlibs = []
for jsonfilename in jsonfiles:
- with open(os.path.join(os.environ['WORKDIR'], 'GbuildToIde', 'Library', jsonfilename), 'r') as f:
+ with open(os.path.join(tempwork, 'GbuildToIde', 'Library', jsonfilename), 'r') as f:
print('loading %s' % jsonfilename)
gbuildlibs.append(json.load(f))
foundlibs = set()