-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
148 additions
and
37 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 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,49 @@ | ||
#!/bin/env bash | ||
|
||
cd "$(dirname "$0")" || exit 1 | ||
|
||
all_clear() { | ||
echo ".pytest_cache" | ||
find -type d -name ".pytest_cache" -exec rm -rf {} \; | ||
echo "__pycache__" | ||
find -type d -name "__pycache__" -exec rm -rf {} \; | ||
echo ".cache" | ||
rm -rf alist_sync/.cache alist_sync.egg-info | ||
} | ||
|
||
case $1 in | ||
install ) | ||
pip install -U pip | ||
pip install -e . | ||
;; | ||
|
||
alist-init ) | ||
pkill alist | ||
rm -rf tests/alist | ||
tests/init_alist.sh | ||
;; | ||
|
||
alist-run ) | ||
cd tests/alist || { | ||
echo "未初始化 - 执行 alist-init" | ||
exit 2 | ||
} | ||
./alist restart | ||
;; | ||
|
||
alist-stop ) | ||
./tests/alist/alist stop || pkill alist | ||
;; | ||
|
||
clear ) | ||
all_clear | ||
;; | ||
|
||
test ) | ||
whereis pytest || pip install pytest | ||
clear | ||
pkill alist | ||
all_clear | ||
pytest -v | ||
;; | ||
esac |
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
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