Skip to content

Commit

Permalink
Fixing CI testing errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
RockfordWei committed Nov 1, 2017
1 parent 6e237ff commit fe67385
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Tests/PerfectTensorFlowTests/PerfectTensorFlowTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,7 @@ class PerfectTensorFlowTests: XCTestCase {

override func setUp() {
do {
try TF.Open()
try TF.Open(library: "/tmp/testdata/lib/libtensorflow.so")
}catch {
XCTFail("\(error)")
}
Expand Down
4 changes: 3 additions & 1 deletion cleantest.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/bin/bash
# This script is for CI Server
echo "clean up"
rm -rf .build
rm -rf Package.pins
rm -rf Package.resolved
time swift build
echo "build release"
time swift build -c release
echo "perform test"
time swift test > test-results.txt
cat test-results.txt
8 changes: 7 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
#!/bin/bash
OSABR=$(echo $(uname)|tr '[:upper:]' '[:lower:]')
DWN=/tmp/libtensorflow.tgz
if [ -z "$1" ]
then
LOC=/usr/local
else
LOC=$1
fi
VERSION=`cat VERSION`
URL=https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-$OSABR-x86_64-$VERSION.tar.gz
echo $URL
curl $URL -o $DWN
echo "installing binaries ..."
tar xf $DWN -C /usr/local ./lib/libtensorflow.so ./lib/libtensorflow_framework.so
tar xf $DWN -C $LOC ./lib/libtensorflow.so ./lib/libtensorflow_framework.so
rm -f $DWN
1 change: 0 additions & 1 deletion prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ echo 'download AI model'
curl https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip -o /tmp/testdata/in.zip
echo 'unzip model file'
unzip /tmp/testdata/in.zip -d /tmp/testdata/

2 changes: 1 addition & 1 deletion test.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
# This script is for CI Server
./install.sh && ./prepare.sh && ./cleantest.sh
./prepare.sh && ./install.sh /tmp/testdata && ./cleantest.sh

0 comments on commit fe67385

Please sign in to comment.