Skip to content

Commit 5475c3a

Browse files
committed
fix: enable web pack tests to run on linux
1 parent fb8b6b8 commit 5475c3a

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

tests/webpack/hello_world_js_tests.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,15 @@ def setUpClass(cls):
3535
BaseClass.setUpClass(cls.__name__)
3636
Emulator.stop()
3737
Emulator.ensure_available()
38-
Simulator.stop()
39-
cls.SIMULATOR_ID = Simulator.ensure_available(simulator_name=SIMULATOR_NAME)
38+
4039
Tns.create_app(cls.app_name, update_modules=True)
4140
Npm.install(package="nativescript-dev-webpack@next", option='--save-dev', folder=cls.app_name)
4241
Tns.platform_add_android(attributes={"--path": cls.app_name, "--frameworkPath": ANDROID_RUNTIME_PATH})
43-
Tns.platform_add_ios(attributes={'--path': cls.app_name, '--frameworkPath': IOS_RUNTIME_PATH})
42+
43+
if CURRENT_OS == OSType.OSX:
44+
Simulator.stop()
45+
cls.SIMULATOR_ID = Simulator.ensure_available(simulator_name=SIMULATOR_NAME)
46+
Tns.platform_add_ios(attributes={'--path': cls.app_name, '--frameworkPath': IOS_RUNTIME_PATH})
4447

4548
def setUp(self):
4649
Tns.kill()

tests/webpack/hello_world_ng_tests.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,16 @@ def setUpClass(cls):
3535
BaseClass.setUpClass(cls.__name__)
3636
Emulator.stop()
3737
Emulator.ensure_available()
38-
Simulator.stop()
39-
cls.SIMULATOR_ID = Simulator.ensure_available(simulator_name=SIMULATOR_NAME)
4038
Tns.create_app_ng(cls.app_name, update_modules=True)
4139
Npm.uninstall(package="nativescript-dev-typescript", option='--save-dev', folder=cls.app_name)
4240
Npm.install(package="nativescript-dev-typescript@next", option='--save-dev', folder=cls.app_name)
4341
Npm.install(package="nativescript-dev-webpack@next", option='--save-dev', folder=cls.app_name)
4442
Tns.platform_add_android(attributes={"--path": cls.app_name, "--frameworkPath": ANDROID_RUNTIME_PATH})
45-
Tns.platform_add_ios(attributes={'--path': cls.app_name, '--frameworkPath': IOS_RUNTIME_PATH})
43+
44+
if CURRENT_OS == OSType.OSX:
45+
Simulator.stop()
46+
cls.SIMULATOR_ID = Simulator.ensure_available(simulator_name=SIMULATOR_NAME)
47+
Tns.platform_add_ios(attributes={'--path': cls.app_name, '--frameworkPath': IOS_RUNTIME_PATH})
4648

4749
def setUp(self):
4850
Tns.kill()

tests/webpack/hello_world_ts_tests.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,16 @@ def setUpClass(cls):
3535
BaseClass.setUpClass(cls.__name__)
3636
Emulator.stop()
3737
Emulator.ensure_available()
38-
Simulator.stop()
39-
cls.SIMULATOR_ID = Simulator.ensure_available(simulator_name=SIMULATOR_NAME)
4038
Tns.create_app_ts(cls.app_name, update_modules=True)
4139
Npm.uninstall(package="nativescript-dev-typescript", option='--save-dev', folder=cls.app_name)
4240
Npm.install(package="nativescript-dev-typescript@next", option='--save-dev', folder=cls.app_name)
4341
Npm.install(package="nativescript-dev-webpack@next", option='--save-dev', folder=cls.app_name)
4442
Tns.platform_add_android(attributes={"--path": cls.app_name, "--frameworkPath": ANDROID_RUNTIME_PATH})
45-
Tns.platform_add_ios(attributes={'--path': cls.app_name, '--frameworkPath': IOS_RUNTIME_PATH})
43+
44+
if CURRENT_OS == OSType.OSX:
45+
Simulator.stop()
46+
cls.SIMULATOR_ID = Simulator.ensure_available(simulator_name=SIMULATOR_NAME)
47+
Tns.platform_add_ios(attributes={'--path': cls.app_name, '--frameworkPath': IOS_RUNTIME_PATH})
4648

4749
def setUp(self):
4850
Tns.kill()

0 commit comments

Comments
 (0)