[bazel] test_on_env.sh: Fix bug preventing Go tests from running.

Bug: skia:11111
Change-Id: Ibbf92d8a90833bf851eeae995e555ba5c9df4815
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/353446
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Leandro Lovisolo <lovisolo@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Auto-Submit: Leandro Lovisolo <lovisolo@google.com>
diff --git a/bazel/test_on_env/test_on_env.sh b/bazel/test_on_env/test_on_env.sh
index fc25fad..5d54cc0 100755
--- a/bazel/test_on_env/test_on_env.sh
+++ b/bazel/test_on_env/test_on_env.sh
@@ -94,7 +94,11 @@
   done
 
   # Run tests.
-  "$TEST_BIN"
+  #
+  # For some unknown reason, Go tests fail with "fork/exec [...]: no such file or directory" when
+  # invoked from this script via $TEST_BIN, which holds the path to a symlink created by Bazel.
+  # Invoking the test binary via its real path, as opposed to a symlink, prevents this error.
+  "$(realpath $TEST_BIN)"
   local test_exit_code=$?
   log "Test exit code: $test_exit_code"