blob: 312ace28989a957ea8b38ca3996ccbab4f81bdd8 [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
Jiri Simsa7d1b28d2014-12-12 22:39:37 -08005source "$(go list -f {{.Dir}} veyron.io/veyron/shell/lib)/shell_test.sh"
Ryan Brown9d8aa9b2014-12-11 12:06:48 -08006
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
Jiri Simsa7d1b28d2014-12-12 22:39:37 -080021 "${AGENTD_BIN}" --no_passphrase --additional_principals="$(shell::tmp_dir)" bash "$(go list -f {{.Dir}} veyron.io/veyron/veyron/tools/vrun)/testchild.sh" || shell_test::fail "${LINENO}: testchild.sh failed"
Ryan Brown9d8aa9b2014-12-11 12:06:48 -080022
23 shell_test::pass
24}
25
26main "$@"