]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: support selenium testing from mac OS X
authorbrian avery <avery.brian@gmail.com>
Wed, 23 Sep 2015 14:05:40 +0000 (15:05 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 23 Sep 2015 21:41:34 +0000 (22:41 +0100)
* added a mac section to the cfg file
* added mac specific screenshot code

Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/toaster/contrib/tts/toasteruitest/toaster_automation_test.py
lib/toaster/contrib/tts/toasteruitest/toaster_test.cfg

index 2a2078f08021e3050519b8ed365dad3022193f42..edd699bd3d94efbb8534f616b3ac608929b4e940 100755 (executable)
@@ -321,7 +321,10 @@ class toaster_cases_base(unittest.TestCase):
             log_path = log_dir + os.sep +  self.browser + '-' +\
                     item + '-' + add_name + '-' + str(self.screenshot_sequence) + '.png'
             if item == 'native':
-                os.system("scrot " + log_path)
+                if self.host_os == "linux":
+                    os.system("scrot " + log_path)
+                elif self.host_os=="darwin":
+                    os.system("screencapture -x " + log_path)
             elif item == 'selenium':
                 self.driver.get_screenshot_as_file(log_path)
             self.screenshot_sequence += 1
index 6405f9a8ef73817780aba5caaa235231bf167d1c..685a9ee6afb9dc82e86f79d2addc4bfdaaee4dec 100644 (file)
@@ -18,4 +18,8 @@ test_browser = ['ie', 'firefox', 'chrome']
 test_cases = [901, 902, 903]
 logging_level = 'DEBUG'
 
-
+[toaster_test_darwin]
+toaster_url = 'http://127.0.0.1:8000'
+test_browser = 'firefox'
+test_cases = [901, 902, 903, 904, 906, 910, 911, 912, 913, 914, 915, 916, 923, 924, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 955, 956]
+logging_level = 'INFO'