Skip to content

Commit

Permalink
Commenting out JAVA SHIM code for ppc64le & s390x arch
Browse files Browse the repository at this point in the history
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 <sriramsh@in.ibm.com>
  • Loading branch information
SriramaSharma committed Nov 30, 2016
1 parent a89b8cc commit 68b95ec
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
13 changes: 10 additions & 3 deletions core/chaincode/shim/java/javabuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
#
#
set -e
PARENTDIR=$(pwd)
PARENTDIR=$(pwd)
ARCH=`uname -m`

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

gradle -q -b ${PARENTDIR}/core/chaincode/shim/java/build.gradle clean
gradle -q -b ${PARENTDIR}/core/chaincode/shim/java/build.gradle build
if [ x$ARCH == xx86_64 ]
then
gradle -q -b ${PARENTDIR}/core/chaincode/shim/java/build.gradle clean
gradle -q -b ${PARENTDIR}/core/chaincode/shim/java/build.gradle build
else
echo "FIXME: Java Shim code needs work on ppc64le and s390x."
echo "Commenting it for now."
fi
2 changes: 1 addition & 1 deletion images/javaenv/Dockerfile.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openjdk:8
FROM hyperledger/fabric-baseimage:_BASE_TAG_
RUN wget https://services.gradle.org/distributions/gradle-2.12-bin.zip -P /tmp --quiet
RUN unzip -q /tmp/gradle-2.12-bin.zip -d /opt && rm /tmp/gradle-2.12-bin.zip
RUN ln -s /opt/gradle-2.12/bin/gradle /usr/bin
Expand Down
8 changes: 8 additions & 0 deletions unit-test/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

set -e
ARCH=`uname -m`

echo -n "Obtaining list of tests to run.."
# Some examples don't play nice with `go test`
Expand All @@ -11,6 +12,13 @@ PKGS=`go list github.com/hyperledger/fabric/... 2> /dev/null | \
grep -v /examples/chaincode/go/asset_management | \
grep -v /examples/chaincode/go/utxo | \
grep -v /examples/chaincode/go/rbac_tcerts_no_attrs`

if [ x$ARCH == xppc64le -o x$ARCH == xs390x ]
then
PKGS=`echo $PKGS | sed 's@'github.com/hyperledger/fabric/core/chaincode/platforms/java/test'@@g'`
PKGS=`echo $PKGS | sed 's@'github.com/hyperledger/fabric/core/chaincode/platforms/java'@@g'`
fi

echo "DONE!"

echo "Running tests..."
Expand Down

0 comments on commit 68b95ec

Please sign in to comment.