Skip to content

Commit 6bc8a52

Browse files
committed
Disable crash reports before tests
1 parent 2e7b59e commit 6bc8a52

File tree

9 files changed

+16
-8
lines changed

9 files changed

+16
-8
lines changed

core/base_class/BaseClass.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@ def __copy_project_folder(cls, artifacts_folder):
2828
src = os.path.join(TEST_RUN_HOME, cls.app_name)
2929
dest = os.path.join(artifacts_folder, cls.app_name)
3030
if os.path.isdir(src):
31-
shutil.copytree(src, dest)
32-
shutil.rmtree(os.path.join(dest, "platforms"), ignore_errors=True)
33-
shutil.rmtree(os.path.join(dest, "node_modules"), ignore_errors=True)
31+
try:
32+
shutil.copytree(src, dest)
33+
shutil.rmtree(os.path.join(dest, "platforms"), ignore_errors=True)
34+
shutil.rmtree(os.path.join(dest, "node_modules"), ignore_errors=True)
35+
except Error:
36+
print "Failed to backup {0}".format(cls.app_name)
3437
else:
3538
print "No project " + src
3639

@@ -75,8 +78,8 @@ def setUpClass(cls, logfile=""):
7578
def setUp(self):
7679
print ""
7780
print "_________________________________TEST START_______________________________________"
78-
print "Test Method: ".format(self._testMethodName)
79-
print "Start Time: ".format(time.strftime("%X"))
81+
print "Test Method: {0}".format(self._testMethodName)
82+
print "Start Time: {0}".format(time.strftime("%X"))
8083
print ""
8184

8285
def tearDown(self):
@@ -98,9 +101,9 @@ def tearDown(self):
98101
self.__save_host_screen(artifacts_folder=artifacts_folder, test_method_name=test_name)
99102

100103
print ""
101-
print "Test Method: ".format(self._testMethodName)
102-
print "End Time: ".format(time.strftime("%X"))
103-
print "Outcome: ".format(outcome)
104+
print "Test Method: {0}".format(self._testMethodName)
105+
print "End Time: {0}".format(time.strftime("%X"))
106+
print "Outcome: {0}".format(outcome)
104107
print "_________________________________TEST END_______________________________________"
105108
print ""
106109

runNose.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ def __extract_archive(file_name, folder):
3939
print "Failed to extract {0}".format(file_name)
4040

4141

42+
def disable_crash_report():
43+
if CURRENT_OS == OSType.OSX:
44+
run("defaults write com.apple.CrashReporter DialogType none")
45+
4246
def clean_npm():
4347
"""Clean npm cache"""
4448
if CURRENT_OS == OSType.WINDOWS:
@@ -105,6 +109,7 @@ def get_repos():
105109

106110
# Copy test packages and cleanup
107111
if CURRENT_OS == OSType.OSX:
112+
disable_crash_report()
108113
get_test_packages(platform=Platform.BOTH)
109114
Simulator.stop()
110115
Simulator.delete(SIMULATOR_NAME)

tests/build/android/__init__.py

Whitespace-only changes.

tests/build/common/__init__.py

Whitespace-only changes.

tests/build/ios/__init__.py

Whitespace-only changes.

tests/device/__init__.py

Whitespace-only changes.

tests/e2e/__init__.py

Whitespace-only changes.

tests/emulator/__init__.py

Whitespace-only changes.

tests/simulator/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)