-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add multi-shell test harness to run on each distro
More eventually should be done with this but the basic operation of changing /bin/sh, running the tests, and making it so the test results can be parsed is there. Adds shell installation instructions to provision process.
- Loading branch information
1 parent
5da0c88
commit 6c06369
Showing
9 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
if [ $# -eq 0 ] | ||
then set bash dash zsh csh ksh | ||
fi | ||
|
||
############################################################################# | ||
target_shell () { | ||
ls -la $1 | awk '{ print $NF }' | ||
} | ||
|
||
if ! [ -e /bin/sh.bak ] | ||
then sudo ln -sf $(target_shell /bin/sh) /bin/sh.bak | ||
fi | ||
|
||
for shell in "$@" | ||
do | ||
echo $shell | ||
if [ -e /bin/$shell ] | ||
then | ||
sudo ln -sf $shell /bin/sh | ||
./test/suite 2>&1 | sed -e 's/^/ /' | ||
else | ||
printf " skip\n" | ||
fi | ||
done | ||
|
||
sudo ln -sf $(target_shell /bin/sh.bak) /bin/sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
sudo yum install -y bash zsh csh ksh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
sudo apt-get install -y bash zsh csh ksh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
sudo yum install -y bash zsh csh ksh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
sudo zypper install -y bash zsh ksh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
sudo apt-get install -y bash zsh csh ksh |