This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/.github/workflows/scripts/test

32 lines
769 B
Text
Raw Normal View History

#!/usr/bin/env bash
2020-08-30 06:32:59 +00:00
## Testing script for Emacs Lisp files on GNU/Linux and MacOS
##
## Copyright (c) 2012-2014 Sylvain Benner
2020-08-30 05:00:45 +00:00
## Copyright (c) 2014-2020 Sylvain Benner & Contributors
##
## Author: Eugene Yaremenko
## URL: https://github.com/syl20bnr/spacemacs
##
## This file is not part of GNU Emacs.
##
## License: GPLv3
2020-08-30 05:00:45 +00:00
# realpath for OS X https://stackoverflow.com/a/3572105/1224362
abs_p() {
[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
}
2020-08-30 23:27:56 +00:00
ln -s "$(pwd)" $HOME/.emacs.d
2020-09-05 11:25:08 +00:00
cp .github/workflows/scripts/dot_lock.el ~/.emacs.d/.lock
2020-08-30 05:00:45 +00:00
testdir=$(abs_p tests/$1)
cd ..
echo "Running '$2' for '$1' in '$testdir' folder"
if [ -f $testdir/dotspacemacs.el ]; then
2020-09-01 16:14:02 +00:00
cp $testdir/dotspacemacs.el ~/.spacemacs
fi
cd $testdir && echo "Now in $(pwd)"
make $2
exit $?