def run_tests(self, nopass):
        """
        Run all tests.
        :param nopass:
        :return none
        """
        if self.terminated: return

        if self.perf:
            self.perf_file = os.path.join(self.output_dir, "perf.csv")

        if self.on_hadoop and self.hadoop_namenode is None:
            print("")
            print("ERROR: Must specify --hadoopNamenode when using --onHadoop option.")
            print("")
            sys.exit(1)

        if self.r_pkg_ver_chk:
            self._r_pkg_ver_chk()

        elif self.path_to_tar is not None:
            self._install_h2o_r_pkg(self.path_to_tar)

        elif self.path_to_whl is not None:
            self._install_h2o_py_whl(self.path_to_whl)

        num_tests = len(self.tests)
        num_nodes = self.num_clouds * self.nodes_per_cloud
        self._log("")
        if self.use_client:
            client_message = " (+ client mode)"
        else:
            client_message = ""
        if self.use_cloud:
            self._log("Starting {} tests...".format(num_tests))
        elif self.use_cloud2:
            self._log("Starting {} tests on {} clouds...".format(num_tests, len(self.clouds)))
        else:
            self._log("Starting {} tests on {} clouds with {} total H2O worker nodes{}...".format(num_tests,
                                                                                                  self.num_clouds,
                                                                                                  num_nodes,
                                                                                                  client_message))
        self._log("")

        # Start the first n tests, where n is the lesser of the total number of tests and the total number of clouds.
        start_count = min(len(self.tests_not_started), len(self.clouds), 30)
        if g_use_cloud2:
            start_count = min(start_count, 75)  # only open up 30 processes locally
        for i in range(start_count):
            cloud = self.clouds[i]
            ip = cloud.get_ip()
            port = cloud.get_port()
            self._start_next_test_on_ip_port(ip, port)

        # As each test finishes, send a new one to the cloud that just freed up.
        while len(self.tests_not_started) > 0:
            if self.terminated:
                return
            cld = self._wait_for_available_cloud(nopass)
            # Check if no cloud was found
            if cld is None:
                self._log('NO GOOD CLOUDS REMAINING...')
                self.terminate()
            available_ip, available_port = cld
            if self.terminated:
                return
            if self._h2o_exists_and_healthy(available_ip, available_port):
                self._start_next_test_on_ip_port(available_ip, available_port)

        # Wait for remaining running tests to complete.
        while len(self.tests_running) > 0:
            if self.terminated: return
            completed_test = self._wait_for_one_test_to_complete()
            if self.terminated: return
            self._report_test_result(completed_test, nopass)
def run_tests ( self , nopass ) : if self . terminated : return if self . perf : self . perf_file = os . path . join ( self . output_dir , "perf.csv" ) if self . on_hadoop and self . hadoop_namenode is None : print ( "" ) print ( "ERROR: Must specify --hadoopNamenode when using --onHadoop option." ) print ( "" ) sys . exit ( 1 ) if self . r_pkg_ver_chk : self . _r_pkg_ver_chk ( ) elif self . path_to_tar is not None : self . _install_h2o_r_pkg ( self . path_to_tar ) elif self . path_to_whl is not None : self . _install_h2o_py_whl ( self . path_to_whl ) num_tests = len ( self . tests ) num_nodes = self . num_clouds * self . nodes_per_cloud self . _log ( "" ) if self . use_client : client_message = " (+ client mode)" else : client_message = "" if self . use_cloud : self . _log ( "Starting {} tests..." . format ( num_tests ) ) elif self . use_cloud2 : self . _log ( "Starting {} tests on {} clouds..." . format ( num_tests , len ( self . clouds ) ) ) else : self . _log ( "Starting {} tests on {} clouds with {} total H2O worker nodes{}..." . format ( num_tests , self . num_clouds , num_nodes , client_message ) ) self . _log ( "" ) start_count = min ( len ( self . tests_not_started ) , len ( self . clouds ) , 30 ) if g_use_cloud2 : start_count = min ( start_count , 75 ) for i in range ( start_count ) : cloud = self . clouds [ i ] ip = cloud . get_ip ( ) port = cloud . get_port ( ) self . _start_next_test_on_ip_port ( ip , port ) while len ( self . tests_not_started ) > 0 : if self . terminated : return cld = self . _wait_for_available_cloud ( nopass ) if cld is None : self . _log ( 'NO GOOD CLOUDS REMAINING...' ) self . terminate ( ) available_ip , available_port = cld if self . terminated : return if self . _h2o_exists_and_healthy ( available_ip , available_port ) : self . _start_next_test_on_ip_port ( available_ip , available_port ) while len ( self . tests_running ) > 0 : if self . terminated : return completed_test = self . _wait_for_one_test_to_complete ( ) if self . terminated : return self . _report_test_result ( completed_test , nopass )
Run all tests.
        :param nopass:
        :return none