urchin/tests/Cross-shell testing/.test-run-by-specified-shell/With -s, the TEST_SHELL environment variable should be set to the specified shell too.
2016-02-29 02:01:27 +00:00

11 lines
278 B
Bash
Executable File

#!/bin/sh
# Assuming that urchin was invoked with `-s bash`, $TEST_SHELL should contain 'bash'.
this_shell=$(ps -o pid,comm | sed -n "s/^ *$$//p" | cut -d\ -f2)
echo "Running shell: $this_shell"
echo "\$TEST_SHELL: $TEST_SHELL"
basename "$this_shell" | grep .special-shell