forked from pwndoc/pwndoc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_tests.sh
More file actions
executable file
·39 lines (33 loc) · 801 Bytes
/
Copy pathrun_tests.sh
File metadata and controls
executable file
·39 lines (33 loc) · 801 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
function usage {
echo "Usage: $0 -f [-h, --help]"
echo ""
echo "Options:"
echo " -h, --help Display help"
echo " -f Run full tests (Build with no cache)"
exit 1
}
function full_test {
docker-compose stop
docker-compose -f backend/docker-compose.dev.yml stop
docker-compose -f backend/docker-compose.test.yml build
docker-compose -f backend/docker-compose.test.yml run --rm backend-test
rc=$?
docker-compose -f backend/docker-compose.test.yml down
exit $rc
}
while getopts "hf" option
do
case $option in
h|--help)
usage
;;
f|--full)
full_test
;;
*)
usage
;;
esac
done
if [ $OPTIND -eq 1 ]; then usage; fi