daos_server = daos_server_pid() while daos_server is None: if counter >= 120: raise ServerTimedOut("No DAOS server process detected before "\ "timeout") counter += 1 time.sleep(1) daos_server = daos_server_pid() # Give daos_io_server some time to get ready. time.sleep(10) print("DAOS server started") # Client operations client_prefix = binfo.get("OMPI_PREFIX") + \ "/bin/orterun --ompi-server " \ "file:{} {} --np 1 rdbt ".format( urifile, debug_cmds) client_suffix = " --group=daos_server" # orterun is called for the client four times: init, update, test, # and fini client_segments = ['init', 'update', 'test', 'fini'] try: for segment in client_segments: run_client(segment) print("SUCCESS\nrbd tests PASSED") except Exception as e: print("rbd tests FAILED") print("{}".format(e))
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. """A simple script to exercise the BuildInfo module""" import sys import os SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) sys.path.insert(0, os.path.dirname(SCRIPT_DIR)) from build_info import BuildInfo FILENAME = os.path.join(SCRIPT_DIR, "sl_test.info") INFO = BuildInfo(FILENAME) PREFIX = INFO.get("PREFIX") if not os.path.exists(PREFIX): print "PREFIX doesn't exist" os.unlink(FILENAME) sys.exit(-1) if SCRIPT_DIR not in PREFIX: print "PREFIX not at expected location" os.unlink(FILENAME) sys.exit(-1) if not os.path.exists(INFO.get("HWLOC_PREFIX")): print "No hwloc directory" os.unlink(FILENAME) sys.exit(-1)
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. """A simple script to exercise the BuildInfo module""" from __future__ import print_function import sys import os SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) sys.path.insert(0, os.path.dirname(SCRIPT_DIR)) from build_info import BuildInfo FILENAME = os.path.join(SCRIPT_DIR, "sl_test.info") INFO = BuildInfo(FILENAME) PREFIX = INFO.get("PREFIX") if not os.path.exists(PREFIX): print("PREFIX doesn't exist") os.unlink(FILENAME) sys.exit(-1) if SCRIPT_DIR not in PREFIX: print("PREFIX not at expected location") os.unlink(FILENAME) sys.exit(-1) SH_SCRIPT = os.path.join(SCRIPT_DIR, "sl_test.sh") INFO.gen_script(SH_SCRIPT) os.system("source %s" % SH_SCRIPT) os.unlink(SH_SCRIPT)
daos_server = daos_server_pid() while daos_server is None: if counter >= 120: raise ServerTimedOut("No DAOS server process detected before "\ "timeout") counter += 1 time.sleep(1) daos_server = daos_server_pid() # Give daos_io_server some time to get ready. time.sleep(10) print("DAOS server started") # Client operations client_prefix = binfo.get("OMPI_PREFIX") + \ "/bin/orterun --ompi-server " \ "file:{} {} --np 1 rdbt ".format( urifile, debug_cmds) client_suffix = " --group=daos_server" # orterun is called for the client four times: init, update, test, # and fini client_segments = ['init', 'update', 'test', 'fini'] try: for segment in client_segments: run_client(segment) print("SUCCESS\nrbd tests PASSED") except Exception as e: print("rbd tests FAILED") print("{}".format(e))