Commit d925c930 authored by Cooper Johnson's avatar Cooper Johnson

Forward arguments to `go test` in `bin/run-test`

To enable race detection (`-race`) or run only specific tests (`-run $test`), it's useful to pass extra arguments to `go test`. Currently this means we must choose between filtering out noise and controlling how the tests are run. This change makes `bin/run-test` forward its arguments (if any) on to `go test`, giving the best of both worlds.

`$@` is the safe way to [forward script arguments](https://www.gnu.org/software/bash/manual/html_node/Special-Parameters.html); it is equivalent to `"$1" "$2" "$3"` and so on.
parent 3111bec0
#!/usr/bin/env bash #!/usr/bin/env bash
go test 2>&1 | grep -vE "^(paxos Dial\(\) failed|unexpected EOF|(read|write) unix|connection is shut down|.*method.*(reply type not a pointer|has wrong number of ins))" go test "$@" 2>&1 | grep -vE "^(paxos Dial\(\) failed|unexpected EOF|(read|write) unix|connection is shut down|.*method.*(reply type not a pointer|has wrong number of ins))"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment