Mercurial > repos > richard-burhans > ncbi_egapx
annotate test.bash @ 41:d129c3d0e920 draft default tip
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
| author | richard-burhans |
|---|---|
| date | Mon, 28 Jul 2025 14:35:28 +0000 |
| parents | |
| children |
| rev | line source |
|---|---|
|
41
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
1 #!/usr/bin/env bash |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
2 |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
3 set -o errexit |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
4 set -o nounset |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
5 set -o pipefail |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
6 #set -o xtrace |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
7 |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
8 export TMP=/scratch/rico/tmp |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
9 |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
10 #source "/scratch/rico/new/env.bash" |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
11 |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
12 export PLANEMO_GLOBAL_WORKSPACE=/scratch/rico/planemo |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
13 export PLANEMO_GLOBAL_CONFIG_PATH=${PLANEMO_GLOBAL_WORKSPACE}/.planemo.yml |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
14 CLEAN=0 |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
15 CLEAN=1 |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
16 |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
17 if [ -e "/scratch/rico/galaxy" ]; then |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
18 z_time=$(stat --format="%Z" "/scratch/rico/galaxy") |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
19 |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
20 w_time=$(stat --format="%W" "/scratch/rico/galaxy") |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
21 if [ $w_time -ne 0 ]; then |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
22 if [ $w_time -lt $z_time ]; then |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
23 z_time="$w_time" |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
24 fi |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
25 fi |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
26 |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
27 now=$(date +%s) |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
28 delta=$(( now - z_time )) |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
29 if [ $delta -ge 86400 ]; then |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
30 CLEAN=1 |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
31 fi |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
32 else |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
33 CLEAN=1 |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
34 fi |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
35 |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
36 if [ $CLEAN -ne 0 ]; then |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
37 rm -rf /scratch/rico/galaxy |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
38 rm -rf "$PLANEMO_GLOBAL_WORKSPACE" |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
39 rm -rf /scratch/rico/.npm |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
40 mkdir /scratch/rico/.npm |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
41 fi |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
42 |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
43 rm -rf /tmp/tmp* "$TMP/tmp*" |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
44 |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
45 export GALAXY_SLOTS=64 |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
46 export GALAXY_MEMORY_MB=262144 |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
47 |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
48 if [ $CLEAN -ne 0 ]; then |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
49 planemo test \ |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
50 --galaxy_root /scratch/rico/galaxy \ |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
51 --docker \ |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
52 --no_cleanup \ |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
53 2>&1 \ |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
54 | tee test.out |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
55 else |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
56 planemo test \ |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
57 --galaxy_root /scratch/rico/galaxy \ |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
58 --docker \ |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
59 --no_docker_sudo \ |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
60 --no_cleanup \ |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
61 2>&1 \ |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
62 | tee test.out |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
63 fi |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
64 |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
65 # Galaxy upload tool fails when using planemo server on galaxy release branch 24 |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
66 # |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
67 # rm -rf /scratch/rico/galaxy; planemo serve --galaxy_branch release_23.2 --galaxy_root /scratch/rico/galaxy |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
68 # rm -rf /scratch/rico/galaxy; planemo serve --galaxy_branch release_24.0 --galaxy_root /scratch/rico/galaxy |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
69 |
|
d129c3d0e920
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff
changeset
|
70 |
