Skip to content

Commit 68b95ec

Browse files
committed
Commenting out JAVA SHIM code for ppc64le & s390x arch
The JAVA SHIM is currently broken on architectures other than x86_64. Hence commenting it out for now. Also, using hyperledger/fabric-baseimage as base image for javaenv as it is generally applicacable to all platforms. Change-Id: I356428b84e85a409a3630af8909c940ef43e252f Signed-off-by: Srirama Sharma <[email protected]>
1 parent a89b8cc commit 68b95ec

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

core/chaincode/shim/java/javabuild.sh

+10-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
#
1818
#
1919
set -e
20-
PARENTDIR=$(pwd)
20+
PARENTDIR=$(pwd)
21+
ARCH=`uname -m`
2122

2223
function getProxyHost {
2324
ADDR=${1#*://}
@@ -35,5 +36,11 @@ function getProxyPort {
3536
[ -n "$HTTPS_PROXY" ] && JAVA_OPTS="$JAVA_OPTS -Dhttps.proxyHost=$(getProxyHost $HTTPS_PROXY) -Dhttps.proxyPort=$(getProxyPort $HTTPS_PROXY)"
3637
export JAVA_OPTS
3738

38-
gradle -q -b ${PARENTDIR}/core/chaincode/shim/java/build.gradle clean
39-
gradle -q -b ${PARENTDIR}/core/chaincode/shim/java/build.gradle build
39+
if [ x$ARCH == xx86_64 ]
40+
then
41+
gradle -q -b ${PARENTDIR}/core/chaincode/shim/java/build.gradle clean
42+
gradle -q -b ${PARENTDIR}/core/chaincode/shim/java/build.gradle build
43+
else
44+
echo "FIXME: Java Shim code needs work on ppc64le and s390x."
45+
echo "Commenting it for now."
46+
fi

images/javaenv/Dockerfile.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM openjdk:8
1+
FROM hyperledger/fabric-baseimage:_BASE_TAG_
22
RUN wget https://services.gradle.org/distributions/gradle-2.12-bin.zip -P /tmp --quiet
33
RUN unzip -q /tmp/gradle-2.12-bin.zip -d /opt && rm /tmp/gradle-2.12-bin.zip
44
RUN ln -s /opt/gradle-2.12/bin/gradle /usr/bin

unit-test/run.sh

+8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22

33
set -e
4+
ARCH=`uname -m`
45

56
echo -n "Obtaining list of tests to run.."
67
# Some examples don't play nice with `go test`
@@ -11,6 +12,13 @@ PKGS=`go list github.com/hyperledger/fabric/... 2> /dev/null | \
1112
grep -v /examples/chaincode/go/asset_management | \
1213
grep -v /examples/chaincode/go/utxo | \
1314
grep -v /examples/chaincode/go/rbac_tcerts_no_attrs`
15+
16+
if [ x$ARCH == xppc64le -o x$ARCH == xs390x ]
17+
then
18+
PKGS=`echo $PKGS | sed 's@'github.com/hyperledger/fabric/core/chaincode/platforms/java/test'@@g'`
19+
PKGS=`echo $PKGS | sed 's@'github.com/hyperledger/fabric/core/chaincode/platforms/java'@@g'`
20+
fi
21+
1422
echo "DONE!"
1523

1624
echo "Running tests..."

0 commit comments

Comments
 (0)