-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild_ios_ng.py
56 lines (46 loc) · 1.86 KB
/
build_ios_ng.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import unittest
from core.osutils.command import run
from core.osutils.file import File
from core.osutils.folder import Folder
from core.settings.settings import IOS_RUNTIME_SYMLINK_PATH, TNS_PATH
from core.tns.tns import Tns
from core.xcode.xcode import Xcode
class BuildiOSNG(unittest.TestCase):
@classmethod
def setUpClass(cls):
Xcode.cleanup_cache()
Folder.cleanup('./TNS_App')
output = run(TNS_PATH + " create TNS_App --ng")
assert "successfully created" in output
Tns.platform_add(
platform="ios",
path="TNS_App",
framework_path=IOS_RUNTIME_SYMLINK_PATH, symlink=True)
def setUp(self):
print ""
print "#####"
print self.id()
print "#####"
print ""
def tearDown(self):
pass
@classmethod
def tearDownClass(cls):
Folder.cleanup('./TNS_App')
def test_010_build_ios_ng_project(self):
output = run(TNS_PATH + " build ios --path TNS_App")
assert "Project successfully prepared" in output
assert "build/emulator/TNSApp.app" in output
assert "** BUILD SUCCEEDED **" in output
assert "Project successfully built" in output
assert File.exists("TNS_App/platforms/ios/build/emulator/TNSApp.app")
def test_210_build_ios_ng_project_release_fordevice(self):
output = run(TNS_PATH +
" build ios --path TNS_App --for-device --release")
assert "Project successfully prepared" in output
assert "CONFIGURATION Release" in output
assert "CodeSign" in output
assert "build/device/TNSApp.app" in output
assert "** BUILD SUCCEEDED **" in output
assert "Project successfully built" in output
assert File.exists("TNS_App/platforms/ios/build/device/TNSApp.ipa")