mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-20 13:50:12 +01:00
made build.TestCase run independant of cwd
This commit is contained in:
parent
37e0dce73b
commit
f153a61277
@ -57,7 +57,7 @@ class BuildTest(unittest.TestCase):
|
|||||||
|
|
||||||
def test_force_gradle_build_tools(self):
|
def test_force_gradle_build_tools(self):
|
||||||
testdir = tempfile.mkdtemp(prefix=inspect.currentframe().f_code.co_name, dir=self.tmpdir)
|
testdir = tempfile.mkdtemp(prefix=inspect.currentframe().f_code.co_name, dir=self.tmpdir)
|
||||||
shutil.copytree(os.path.join(os.path.dirname(__file__), 'source-files'),
|
shutil.copytree(os.path.join('source-files'),
|
||||||
os.path.join(testdir, 'source-files'))
|
os.path.join(testdir, 'source-files'))
|
||||||
teststring = 'FAKE_VERSION_FOR_TESTING'
|
teststring = 'FAKE_VERSION_FOR_TESTING'
|
||||||
fdroidserver.build.force_gradle_build_tools(testdir, teststring)
|
fdroidserver.build.force_gradle_build_tools(testdir, teststring)
|
||||||
@ -73,6 +73,8 @@ class BuildTest(unittest.TestCase):
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
os.chdir(os.path.dirname(__file__))
|
||||||
|
|
||||||
parser = optparse.OptionParser()
|
parser = optparse.OptionParser()
|
||||||
parser.add_option("-v", "--verbose", action="store_true", default=False,
|
parser.add_option("-v", "--verbose", action="store_true", default=False,
|
||||||
help="Spew out even more information than normal")
|
help="Spew out even more information than normal")
|
||||||
|
Loading…
Reference in New Issue
Block a user