~nskaggs/help-app/functional-test-template

« back to all changes in this revision

Viewing changes to internals/tests/test_links.py

  • Committer: Daniel Holbach
  • Date: 2015-03-19 17:54:55 UTC
  • mfrom: (111.2.14 1429896)
  • Revision ID: daniel.holbach@canonical.com-20150319175455-sjwdzzy3aqaaiu9u
mergedĀ lp:~dholbach/help-app/1429896

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
from unittest import TestCase
8
8
import urllib.parse
9
9
 
 
10
from translations.utils import use_top_level_dir
 
11
 
10
12
 
11
13
def require_build(build):
12
14
    tempdir = tempfile.mkdtemp()
13
15
    env = {}
14
 
    if build == 'html':
15
 
        env = {'OUTPUTDIR': tempdir}
 
16
    if build == 'app':
 
17
        env = {'OUTPUTDIR_APP': tempdir}
16
18
    if build == 'web':
17
19
        env = {'OUTPUTDIR_WEB': tempdir}
 
20
    pwd = use_top_level_dir()
18
21
    ret = subprocess.call(['make', '-es', build], env=env)
 
22
    os.chdir(pwd)
19
23
    return (ret, tempdir)
20
24
 
21
25