Skip to content

Commit e331265

Browse files
authored
Remove set -e to continue tests even on failures
2 parents da04bcd + 0cc67d6 commit e331265

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/run_pytorch.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
#!/bin/bash
2-
set -e
32
. ~/miniconda3/etc/profile.d/conda.sh
43
conda activate base
54

65
ALL_FILE=$(find *.md ! -name README.md)
76
TEMP_PY="temp.py"
87
CUDAS="nvidia"
98

9+
declare -i error_code=0
10+
1011
for f in $ALL_FILE
1112
do
1213
echo "Running pytorch example in $f"
@@ -27,9 +28,12 @@ do
2728
else
2829
sed -n '/^```python/,/^```/ p' < $f | sed '/^```/ d' > $TEMP_PY
2930
python $TEMP_PY
31+
error_code+=$?
3032

3133
if [ -f "$TEMP_PY" ]; then
3234
rm $TEMP_PY
3335
fi
3436
fi
3537
done
38+
39+
exit $error_code

0 commit comments

Comments
 (0)