File tree Expand file tree Collapse file tree 2 files changed +38
-2
lines changed
Expand file tree Collapse file tree 2 files changed +38
-2
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 99
1010cd " $( 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+
1237run_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
You can’t perform that action at this time.
0 commit comments