Skip to content

Commit 6b63b9d

Browse files
tanquerfacebook-github-bot
authored andcommitted
Skip MemPoolTest on github workflow
Differential Revision: D88655756
1 parent 7d8b4f8 commit 6b63b9d

File tree

2 files changed

+38
-2
lines changed

2 files changed

+38
-2
lines changed

.github/workflows/build_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,5 @@ jobs:
6262
python -c "import torchcomms; import torchcomms._transport"
6363
6464
# Run tests
65-
comms/torchcomms/scripts/run_tests_integration_py.sh
65+
comms/torchcomms/scripts/run_tests_integration_py.sh -s MemPoolTest.py
6666
pytest -v comms/torchcomms/tests/unit/py

comms/torchcomms/scripts/run_tests_integration_py.sh

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,45 @@ set -ex
99

1010
cd "$(dirname "$0")/../tests/integration/py"
1111

12+
SKIP_TESTS=""
13+
14+
# Function to display usage
15+
usage() {
16+
echo "Usage: $0 [options]"
17+
echo "Options:"
18+
echo " --skips, -s Comma-separated list of tests to skip"
19+
exit 1
20+
}
21+
22+
# Parse command line arguments
23+
while [[ $# -gt 0 ]]; do
24+
key="$1"
25+
case $key in
26+
--skip|-s)
27+
SKIP_TESTS="$2"
28+
shift 2
29+
;;
30+
*)
31+
echo "Unknown option: $1"
32+
usage
33+
;;
34+
esac
35+
done
36+
1237
run_tests () {
38+
# Convert comma-separated skip tests to array
39+
IFS=',' read -ra SKIP_TESTS_ARRAY <<< "$SKIP_TESTS"
1340
for file in *Test.py; do
14-
torchrun --nnodes 1 --nproc_per_node 4 "$file" --verbose
41+
skip=false
42+
for skip_file in "${SKIP_TESTS_ARRAY[@]}"; do
43+
if [[ "$file" == "$skip_file" ]]; then
44+
skip=true
45+
break
46+
fi
47+
done
48+
if ! $skip; then
49+
torchrun --nnodes 1 --nproc_per_node 4 "$file" --verbose
50+
fi
1551
done
1652
}
1753

0 commit comments

Comments
 (0)