#!/usr/bin/env bash # Expecting MESOS_SOURCE_DIR and MESOS_BUILD_DIR to be in environment. env | grep MESOS_SOURCE_DIR >/dev/null test $Status != 0 && \ echo "Failed to find MESOS_SOURCE_DIR in environment" && \ exit 1 env | grep MESOS_BUILD_DIR >/dev/null test $Status != 0 && \ echo "Failed to find MESOS_BUILD_DIR in environment" && \ exit 1 source $(MESOS_SOURCE_DIR)/support/colors.sh source $(MESOS_SOURCE_DIR)/support/atexit.sh source $(MESOS_HELPER_DIR)/colors.sh source $(MESOS_HELPER_DIR)/atexit.sh global MESOS_WORK_DIR := $[mktemp -d -t mesos-XXXXXX] atexit "rm -rf $(MESOS_WORK_DIR)" export MESOS_WORK_DIR=$(MESOS_WORK_DIR) global MESOS_RUNTIME_DIR := $[mktemp -d -t mesos-XXXXXX] atexit "rm -rf $(MESOS_RUNTIME_DIR)" export MESOS_RUNTIME_DIR=$(MESOS_RUNTIME_DIR) # Lower the authentication timeout to speed up the test (the master # may drop the authentication message while it is recovering). export MESOS_AUTHENTICATION_TIMEOUT=200ms # Set local Mesos runner to use 3 slaves export MESOS_NUM_SLAVES=3 # Set isolation for the slave. export MESOS_ISOLATION="filesystem/posix,posix/cpu,posix/mem" # Set launcher for the slave. export MESOS_LAUNCHER="posix" # Check that the framework executes without crashing (returns 0). exec $(MESOS_HELPER_DIR)/persistent-volume-framework --master=local (CommandList children: [ (Pipeline children: [ (C {(env)}) (SimpleCommand words: [{(grep)} {(MESOS_SOURCE_DIR)}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[16])] ) ] negated: False ) (AndOr children: [ (C {(test)} {($ VSub_QMark "$?")} {(KW_Bang "!") (Lit_Other "=")} {(0)}) (AndOr children: [ (C {(echo)} {(DQ ("Failed to find MESOS_SOURCE_DIR in environment"))}) (C {(exit)} {(1)}) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (Pipeline children: [ (C {(env)}) (SimpleCommand words: [{(grep)} {(MESOS_BUILD_DIR)}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[56])] ) ] negated: False ) (AndOr children: [ (C {(test)} {($ VSub_QMark "$?")} {(KW_Bang "!") (Lit_Other "=")} {(0)}) (AndOr children: [ (C {(echo)} {(DQ ("Failed to find MESOS_BUILD_DIR in environment"))}) (C {(exit)} {(1)}) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (C {(source)} {(${ VSub_Name MESOS_SOURCE_DIR) (/support/colors.sh)}) (C {(source)} {(${ VSub_Name MESOS_SOURCE_DIR) (/support/atexit.sh)}) (C {(source)} {(${ VSub_Name MESOS_HELPER_DIR) (/colors.sh)}) (C {(source)} {(${ VSub_Name MESOS_HELPER_DIR) (/atexit.sh)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:MESOS_WORK_DIR) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(mktemp)} {(-d)} {(-t)} {(mesos-XXXXXX)})]) left_token: spids: [119 127] ) } spids: [118] ) ] spids: [118] ) (C {(atexit)} {(DQ ("rm -rf ") (${ VSub_Name MESOS_WORK_DIR))}) (C {(export)} {(Lit_VarLike "MESOS_WORK_DIR=") (${ VSub_Name MESOS_WORK_DIR)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:MESOS_RUNTIME_DIR) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(mktemp)} {(-d)} {(-t)} {(mesos-XXXXXX)})]) left_token: spids: [148 156] ) } spids: [147] ) ] spids: [147] ) (C {(atexit)} {(DQ ("rm -rf ") (${ VSub_Name MESOS_RUNTIME_DIR))}) (C {(export)} {(Lit_VarLike "MESOS_RUNTIME_DIR=") (${ VSub_Name MESOS_RUNTIME_DIR)}) (C {(export)} {(Lit_VarLike "MESOS_AUTHENTICATION_TIMEOUT=") (200ms)}) (C {(export)} {(Lit_VarLike "MESOS_NUM_SLAVES=") (3)}) (C {(export)} {(Lit_VarLike "MESOS_ISOLATION=") (DQ ("filesystem/posix,posix/cpu,posix/mem"))}) (C {(export)} {(Lit_VarLike "MESOS_LAUNCHER=") (DQ (posix))}) (C {(exec)} {(${ VSub_Name MESOS_HELPER_DIR) (/persistent-volume-framework)} {(--master) (Lit_Other "=") (Assign_Local local)} ) ] )