-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #840 from gugod/more-e2e-tests
More e2e tests
- Loading branch information
Showing
5 changed files
with
172 additions
and
51 deletions.
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,29 +1,73 @@ | ||
PERLBREW_E2E=/tmp/e2e | ||
export PERLBREW_ROOT=$PERLBREW_E2E/root | ||
export PERLBREW_HOME=$PERLBREW_E2E/home | ||
|
||
PERLBREW=$PERLBREW_ROOT/bin/perlbrew | ||
|
||
e2e-begin() { | ||
mkdir $PERLBREW_E2E | ||
mkdir $PERLBREW_ROOT | ||
mkdir $PERLBREW_HOME | ||
echo 'E2E BEGIN -- preapre $PERLBREW_E2E' | ||
} | ||
|
||
e2e-end() { | ||
rm -rf $PERLBREW_E2E | ||
echo 'E2E END -- cleanup $PERLBREW_E2E' | ||
} | ||
|
||
test-perlbrew-self-install() { | ||
echo 'TEST - perlbrew self-install' | ||
|
||
assert-file-missing ~/perl5/perlbrew/bin/perlbrew | ||
assert-file-missing $PERLBREW_ROOT/bin/perlbrew | ||
|
||
assert-ok ./perlbrew self-install | ||
|
||
assert-file-exists ~/perl5/perlbrew/bin/perlbrew | ||
assert-file-exists $PERLBREW_ROOT/bin/perlbrew | ||
|
||
$PERLBREW_ROOT/bin/perlbrew install-patchperl | ||
assert-file-exists $PERLBREW_ROOT/bin/patchperl | ||
|
||
eval "$($PERLBREW init-in-bash)" | ||
} | ||
|
||
test-perlbrew-install-skaji-relocatable-perl() { | ||
echo 'TEST - perlbrew install skaji-relocatable-perl' | ||
test-perlbrew-install() { | ||
local installation=$1 | ||
shift | ||
|
||
local PERLBREW=~/perl5/perlbrew/bin/perlbrew | ||
echo "TEST - perlbrew install $installation" | ||
|
||
assert-file-exists $PERLBREW | ||
|
||
assert-dir-missing ~/perl5/perlbrew/perls/skaji-relocatable-perl-5.40.0.1 | ||
assert-dir-missing $PERLBREW_ROOT/perls/$installation | ||
|
||
if [[ -n "$PERLBREW_E2E_INSTALL_NOTEST" ]] | ||
then | ||
$PERLBREW install --verbose --notest $installation | ||
else | ||
$PERLBREW install --verbose $installation | ||
fi | ||
|
||
assert-dir-exists $PERLBREW_ROOT/perls/$installation | ||
assert-file-exists $PERLBREW_ROOT/perls/$installation/bin/perl | ||
|
||
assert-ok $PERLBREW_ROOT/perls/$installation/bin/perl -v | ||
|
||
echo "OK - perlbrew install $installation" | ||
} | ||
|
||
test-perlbrew-uninstall() { | ||
local installation=$1 | ||
shift | ||
|
||
echo "TEST - perlbrew uninstall $installation" | ||
|
||
$PERLBREW install skaji-relocatable-perl-5.40.0.1 | ||
assert-dir-exists $PERLBREW_ROOT/perls/$installation | ||
assert-file-exists $PERLBREW_ROOT/perls/$installation/bin/perl | ||
|
||
assert-dir-exists ~/perl5/perlbrew/perls/skaji-relocatable-perl-5.40.0.1 | ||
assert-file-exists ~/perl5/perlbrew/perls/skaji-relocatable-perl-5.40.0.1/bin/perl | ||
$PERLBREW uninstall --verbose --yes $installation | ||
|
||
assert-ok ~/perl5/perlbrew/perls/skaji-relocatable-perl-5.40.0.1/bin/perl -v | ||
assert-dir-missing $PERLBREW_ROOT/perls/$installation | ||
|
||
echo 'OK - perlbrew install skaji-relocatable-perl-5.40.0.1' | ||
echo "OK - perlbrew uninstall $installation" | ||
} |
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