File: list_test_pkgs.sh

package info (click to toggle)
golang-mongodb-mongo-driver 1.8.1%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 18,500 kB
  • sloc: perl: 533; ansic: 491; python: 432; makefile: 187; sh: 72
file content (12 lines) | stat: -rwxr-xr-x 332 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh
# list_pkgs <directory>
directory="$1"
if [ -z "$directory" ]; then
    directory="."
fi

if [ "Windows_NT" = "$OS" ]; then
    find "$directory" -iname "*_test.go" | perl -ple 's{(.*)/[^/]+}{$1}' | sort -u
else
    go list -tags cse -test -f '{{.ForTest}}' $directory/... | sed -e "s/^go.mongodb.org\/mongo-driver/./"
fi