Skip to content

Commit 08bb143

Browse files
committed
Merge branch 'test_cect' of github.com:openworm/OpenWorm into test_cect
2 parents f0a0350 + 9f32916 commit 08bb143

File tree

3 files changed

+37
-4
lines changed

3 files changed

+37
-4
lines changed

.github/workflows/docker-image.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,5 @@ jobs:
3131
ls -alth
3232
ls -alth output
3333
ls -alth output/*
34+
35+
more output/*/report.json

master_openworm.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import shutil
66
from subprocess import Popen, PIPE, check_output, STDOUT
77
import os
8-
import pwd
98
import shlex
109
import sys
1110
import time
@@ -110,7 +109,7 @@ def execute_with_realtime_output(command, directory, env=None):
110109

111110
try:
112111
os.system("echo Granting permissions for xhost && xhost +")
113-
except:
112+
except Exception:
114113
print("Unexpected error: %s" % sys.exc_info()[0])
115114

116115
OW_OUT_DIR = os.environ["OW_OUT_DIR"]
@@ -122,7 +121,7 @@ def execute_with_realtime_output(command, directory, env=None):
122121
"sudo chown -R %s:%s %s"
123122
% (os.environ["USER"], os.environ["USER"], OW_OUT_DIR)
124123
)
125-
except:
124+
except Exception:
126125
print("Unexpected error: %s" % sys.exc_info()[0])
127126
raise
128127

@@ -190,7 +189,7 @@ def execute_with_realtime_output(command, directory, env=None):
190189
command += " -noc302"
191190

192191
execute_with_realtime_output(command, os.environ["SIBERNETIC_HOME"], env=my_env)
193-
except KeyboardInterrupt as e:
192+
except KeyboardInterrupt:
194193
pass
195194

196195
sibernetic_sim_dir = "%s/simulations" % os.environ["SIBERNETIC_HOME"]

test.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
set -ex
2+
3+
ruff format *.py
4+
ruff check *.py
5+
6+
quick_test=0
7+
8+
if [[ ($# -eq 1) && ($1 == '-q') ]]; then
9+
echo "Running quick test only..."
10+
quick_test=1
11+
else
12+
echo "Running full test..."
13+
fi
14+
15+
./stop.sh || true
16+
17+
if [ "$quick_test" == 1 ]; then
18+
19+
./build.sh
20+
21+
else
22+
./rebuild.sh
23+
fi
24+
25+
time ./run.sh
26+
27+
28+
echo
29+
echo " Done!"
30+
echo
31+
32+

0 commit comments

Comments
 (0)