From 8278be029e0f2453613e48b8d2ad3ac9826fd478 Mon Sep 17 00:00:00 2001 From: Anthony Yeh Date: Thu, 12 Sep 2019 20:37:04 +0000 Subject: [PATCH 1/2] docker/bootstrap: Add back VT_MYSQL_ROOT. Without this, all tests fail because Vitess can't find mysqld: failed init mysql: mysqld not found in any of /vt/{sbin,bin,libexec,scripts} Signed-off-by: Anthony Yeh --- docker/bootstrap/Dockerfile.common | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/bootstrap/Dockerfile.common b/docker/bootstrap/Dockerfile.common index 8288a479eea..4b6a21beb49 100644 --- a/docker/bootstrap/Dockerfile.common +++ b/docker/bootstrap/Dockerfile.common @@ -47,6 +47,7 @@ ENV VTPORTSTART 15000 ENV PYTHONPATH $VTROOT/dist/grpc/usr/local/lib/python2.7/site-packages:$VTROOT/dist/py-mock-1.0.1/lib/python2.7/site-packages:$VTROOT/py-vtdb:$VTROOT/dist/selenium/lib/python2.7/site-packages ENV GOBIN $VTROOT/bin ENV PATH $VTROOT/bin:$VTROOT/dist/maven/bin:$VTROOT/dist/chromedriver:$PATH +ENV VT_MYSQL_ROOT /usr ENV PKG_CONFIG_PATH $VTROOT/lib ENV USER vitess ENV GO111MODULE on From f97a82bfe7a37f3a2cca2454f645fb2333050e48 Mon Sep 17 00:00:00 2001 From: Anthony Yeh Date: Thu, 12 Sep 2019 21:09:38 +0000 Subject: [PATCH 2/2] Use Go modules to run goyacc. Since all Go tools have been removed from bootstrap. Signed-off-by: Anthony Yeh --- go/vt/sqlparser/Makefile | 2 +- tools/check_make_parser.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go/vt/sqlparser/Makefile b/go/vt/sqlparser/Makefile index 215f422e624..a4ad16ce2bf 100644 --- a/go/vt/sqlparser/Makefile +++ b/go/vt/sqlparser/Makefile @@ -15,7 +15,7 @@ MAKEFLAGS = -s sql.go: sql.y - goyacc -o sql.go sql.y + go run golang.org/x/tools/cmd/goyacc -o sql.go sql.y gofmt -w sql.go clean: diff --git a/tools/check_make_parser.sh b/tools/check_make_parser.sh index 139e18199a8..d28d4f18f09 100755 --- a/tools/check_make_parser.sh +++ b/tools/check_make_parser.sh @@ -9,6 +9,7 @@ CUR="sql.go" TMP="/tmp/sql.$$.go" +set -e if ! cd go/vt/sqlparser/ ; then echo "ERROR: $0 must be run in the root project directory" @@ -16,7 +17,7 @@ if ! cd go/vt/sqlparser/ ; then fi mv $CUR $TMP -output=`goyacc -o $CUR sql.y` +output=$(go run golang.org/x/tools/cmd/goyacc -o $CUR sql.y) if [ -n "$output" ]; then echo "Expected empty output from goyacc, got:"