Skip to content

Commit aab8cf4

Browse files
committed
Fix list_test_pkgs.sh to work properly on Windows
Change-Id: I3799d93dcb5db28a693477e63ffbf0573aeab958
1 parent 284ed29 commit aab8cf4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

etc/list_test_pkgs.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,9 @@ directory="$1"
44
if [ -z "$directory" ]; then
55
directory="."
66
fi
7-
go list -test -f '{{.ForTest}}' $directory/... | sed -e "s/^github.com\/mongodb\/mongo-go-driver/./"
7+
8+
if [ "Windows_NT" = "$OS" ]; then
9+
find "$directory" -iname "*_test.go" | perl -ple 's{(.*)/[^/]+}{$1}' | sort -u
10+
else
11+
go list -test -f '{{.ForTest}}' $directory/... | sed -e "s/^github.com\/mongodb\/mongo-go-driver/./"
12+
fi

0 commit comments

Comments
 (0)