Ryan Brown | 9d8aa9b | 2014-12-11 12:06:48 -0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # Test running an application using vrun under the agent. |
| 4 | |
| 5 | source "${VEYRON_ROOT}/scripts/lib/shell_test.sh" |
| 6 | |
| 7 | readonly WORKDIR="${shell_test_WORK_DIR}" |
| 8 | |
| 9 | build() { |
| 10 | AGENTD_BIN="$(shell_test::build_go_binary 'veyron.io/veyron/veyron/security/agent/agentd')" |
| 11 | } |
| 12 | |
| 13 | main() { |
| 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 | |
| 26 | main "$@" |