]> SALOME platform Git repositories - tools/sat.git/blobdiff - test/log/launch_browser.py
Salome HOME
Add test for the compilation commands
[tools/sat.git] / test / log / launch_browser.py
index 369deef01bb664ba08b93511fb7c672d32281adc..9d62d861008aa4b6031a23bb67b136e74e24ded3 100644 (file)
@@ -32,36 +32,14 @@ sys.path.append(os.path.join(testdir, '..', '..','commands'))
 
 from salomeTools import Sat
 from tools import check_proc_existence_and_kill
-from tools import outRedirection
 import HTMLTestRunner
-import src.xmlManager
 
-sleep_time = 3
+sleep_time = 2
 
 class TestLog(unittest.TestCase):
     '''Test of log command: launch of browser
     '''
-    
-    def test_launch_browser(self):
-        '''Test the launch of browser when invoking the log command
-        '''
-
-        OK = "KO"
-
-        sat = Sat("-oUSER.browser='konqueror'")
-        cmd_log = threading.Thread(target=sat.log, args=('',))
-        cmd_log.start()
-
-        time.sleep(sleep_time)
-
-        browser = sat.cfg.USER.browser
-        pid = check_proc_existence_and_kill(browser + ".*" + "xml")
-
-        if pid:
-            OK = "OK"
-        # pyunit method to compare 2 str
-        self.assertEqual(OK, "OK")
-        
+           
     def test_write_xmllog(self):
         '''Test the write of xml log when invoking a command
         '''
@@ -100,7 +78,7 @@ class TestLog(unittest.TestCase):
             OK = "OK"
             sys.stdin = sys.__stdin__
         except:
-            pass
+            sys.stdin = sys.__stdin__
         
         # pyunit method to compare 2 str
         self.assertEqual(OK, "OK")
@@ -120,7 +98,7 @@ class TestLog(unittest.TestCase):
         sys.stdin = io.StringIO(one)
         
         try:
-            sat.log('appli-test --last')
+            sat.log('appli-test -t --last')
             OK = "OK"
             sys.stdin = sys.__stdin__
         except:
@@ -240,7 +218,7 @@ class TestLog(unittest.TestCase):
         
         # pyunit method to compare 2 str
         self.assertEqual(OK, "OK")
-
+    
     def test_option_last(self):
         '''Test the option --last
         '''
@@ -252,6 +230,8 @@ class TestLog(unittest.TestCase):
               
         sat.config('appli-test -v VARS.python')
         
+        
+        time.sleep(sleep_time)
         cmd_log = threading.Thread(target=sat.log, args=('appli-test --last',))
         cmd_log.start()
         
@@ -265,7 +245,7 @@ class TestLog(unittest.TestCase):
         
         # pyunit method to compare 2 str
         self.assertEqual(OK, "OK")
-
+    
     def test_option_clean(self):
         '''Test the option --clean
         '''
@@ -318,7 +298,8 @@ class TestLog(unittest.TestCase):
         
         # pyunit method to compare 2 str
         self.assertEqual(OK, "OK")
-
+    
+    """
     def test_option_full(self):
         '''Test the option --full
         '''
@@ -326,13 +307,14 @@ class TestLog(unittest.TestCase):
         OK = "KO"
 
         sat = Sat("-oUSER.browser='konqueror'")
+        time.sleep(sleep_time)
         cmd_log = threading.Thread(target=sat.log, args=('--full',))
         cmd_log.start()
 
         time.sleep(sleep_time)
 
         browser = sat.cfg.USER.browser
-        check_proc_existence_and_kill(browser + ".*" + "xml")
+        check_proc_existence_and_kill(browser + ".*" + "hat\.xml")
         
         # Read and check the hat.xml file contains at least one log file corresponding to log
         hatFilePath = os.path.join(sat.cfg.SITE.log.log_dir, "hat.xml")
@@ -344,7 +326,7 @@ class TestLog(unittest.TestCase):
 
         # pyunit method to compare 2 str
         self.assertEqual(OK, "OK")
-
+    """
     def test_description(self):
         '''Test the sat -h log
         '''