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.
Thomas Levine f8d98d9978 update shell cycling logic to match documentation
and I updated the documentation already because this new way seems
easier to think about
2016-02-29 12:29:49 +00:00

11 lines
274 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"
echo "$TEST_SHELL" | grep .special-shell