bazel: add a test asserting java and java proto (#63927)

This commit is contained in:
Wael Nasreddine
2019-07-01 21:18:02 -07:00
committed by GitHub
parent 4c86deee99
commit 7f69cab8a6
3 changed files with 79 additions and 10 deletions
@@ -5,6 +5,7 @@
, fetchurl
, gccStdenv
, lib
, openjdk8
, runLocal
, runtimeShell
, writeScript
@@ -77,6 +78,8 @@ let
personProto = writeText "person.proto" ''
syntax = "proto3";
package person;
message Person {
string name = 1;
int32 id = 2;
@@ -134,10 +137,15 @@ let
name = "bazel-test-protocol-buffers";
inherit workspaceDir;
bazelPkg = bazel;
buildInputs = [ openjdk8 ];
bazelScript = ''
${bazel}/bin/bazel \
build --verbose_failures \
//person:person_proto
build \
--host_javabase='@local_jdk//:jdk' \
--java_toolchain='@bazel_tools//tools/jdk:toolchain_hostjdk8' \
--javabase='@local_jdk//:jdk' \
--verbose_failures \
//...
'';
};