blob: 005984ccaea59ca7e6685c3d416c11cc15d32e4d [file] [log] [blame]
Ryan Brown9d8aa9b2014-12-11 12:06:48 -08001#!/bin/bash
2
3# Test running an application using vrun under the agent.
4
5source "${VEYRON_ROOT}/scripts/lib/shell_test.sh"
6
7readonly WORKDIR="${shell_test_WORK_DIR}"
8
9build() {
10 AGENTD_BIN="$(shell_test::build_go_binary 'veyron.io/veyron/veyron/security/agent/agentd')"
11}
12
13main() {
14 cd "${WORKDIR}"
15 build
16
17 export VEYRON_CREDENTIALS="$(shell::tmp_dir)"
18
19 # Make sure the testchild.sh script gets the same shell_test_BIN_DIR as the main script.
20 export shell_test_BIN_DIR
21 "${AGENTD_BIN}" --no_passphrase --additional_principals="$(shell::tmp_dir)" bash "${VEYRON_ROOT}/veyron/go/src/veyron.io/veyron/veyron/tools/vrun/testchild.sh" || shell_test::fail "${LINENO}: testchild.sh failed"
22
23 shell_test::pass
24}
25
26main "$@"