Skip to content

Commit

Permalink
Updated for travis
Browse files Browse the repository at this point in the history
  • Loading branch information
pakozm committed May 20, 2014
1 parent cad4a4a commit 9dad7ad
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 20 deletions.
1 change: 1 addition & 0 deletions .travis.yml
@@ -1,6 +1,7 @@
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y liblua5.2-dev libboost-filesystem-dev libboost-filesystem-dev libboost-thread-dev
- lua -e "print('hola')"
- git clone https://github.com/mongodb/mongo-cxx-driver.git
- cd mongo-cxx-driver && sudo scons --prefix=/usr install-mongoclient && cd -
- wget https://github.com/moai/luamongo/archive/v0.4.1.tar.gz
Expand Down
3 changes: 1 addition & 2 deletions execute_example_worker.sh
@@ -1,3 +1,2 @@
#!/bin/bash
export lua=lua5.2
$lua execute_worker.lua localhost wordcount
lua execute_worker.lua localhost wordcount
27 changes: 9 additions & 18 deletions test.sh
@@ -1,7 +1,5 @@
#!/bin/bash
which lua
export lua=lua5.2
$lua mapreduce/test.lua
lua mapreduce/test.lua

if [[ $? -ne 0 ]]; then
echo "ERROR"
Expand All @@ -10,25 +8,18 @@ fi
for storage in gridfs shared sshfs; do
## COMBINER + ASSOCIATIVE COMMUTATIVE IDEMPOTENT REDUCER
screen -d -m ./execute_example_worker.sh
diff <($lua execute_server.lua localhost wordcount \
mapreduce.examples.WordCount.taskfn \
mapreduce.examples.WordCount.mapfn \
mapreduce.examples.WordCount.partitionfn \
mapreduce.examples.WordCount.reducefn \
mapreduce.examples.WordCount.finalfn \
mapreduce.examples.WordCount.reducefn \
$storage | awk '{ print $1,$2 }' | sort) \
diff <(./execute_example_server.sh $storage | awk '{ print $1,$2 }' | sort) \
<(cat mapreduce/server.lua \
mapreduce/worker.lua \
mapreduce/test.lua \
mapreduce/utils.lua | $lua misc/naive.lua | awk '{ print $1,$2 }' | sort) > /dev/null
mapreduce/utils.lua | lua misc/naive.lua | awk '{ print $1,$2 }' | sort) > /dev/null
if [[ $? -ne 0 ]]; then
echo "ERROR"
exit 1
fi
## NO COMBINER + ASSOCIATIVE COMMUTATIVE IDEMPOTENT REDUCER
screen -d -m ./execute_example_worker.sh
diff <($lua execute_server.lua localhost wordcount \
diff <(lua execute_server.lua localhost wordcount \
mapreduce.examples.WordCount.taskfn \
mapreduce.examples.WordCount.mapfn \
mapreduce.examples.WordCount.partitionfn \
Expand All @@ -38,14 +29,14 @@ for storage in gridfs shared sshfs; do
<(cat mapreduce/server.lua \
mapreduce/worker.lua \
mapreduce/test.lua \
mapreduce/utils.lua | $lua misc/naive.lua | awk '{ print $1,$2 }' | sort) > /dev/null
mapreduce/utils.lua | lua misc/naive.lua | awk '{ print $1,$2 }' | sort) > /dev/null
if [[ $? -ne 0 ]]; then
echo "ERROR"
exit 1
fi
## NO COMBINER + GENERAL REDUCER
screen -d -m ./execute_example_worker.sh
diff <($lua execute_server.lua localhost wordcount \
diff <(lua execute_server.lua localhost wordcount \
mapreduce.examples.WordCount.taskfn \
mapreduce.examples.WordCount.mapfn \
mapreduce.examples.WordCount.partitionfn \
Expand All @@ -55,14 +46,14 @@ for storage in gridfs shared sshfs; do
<(cat mapreduce/server.lua \
mapreduce/worker.lua \
mapreduce/test.lua \
mapreduce/utils.lua | $lua misc/naive.lua | awk '{ print $1,$2 }' | sort) > /dev/null
mapreduce/utils.lua | lua misc/naive.lua | awk '{ print $1,$2 }' | sort) > /dev/null
if [[ $? -ne 0 ]]; then
echo "ERROR"
exit 1
fi
## INIT SCRIPT
screen -d -m ./execute_example_worker.sh
diff <($lua execute_server.lua localhost wordcount \
diff <(lua execute_server.lua localhost wordcount \
mapreduce.examples.WordCount \
mapreduce.examples.WordCount \
mapreduce.examples.WordCount \
Expand All @@ -73,7 +64,7 @@ for storage in gridfs shared sshfs; do
<(cat mapreduce/server.lua \
mapreduce/worker.lua \
mapreduce/test.lua \
mapreduce/utils.lua | $lua misc/naive.lua | awk '{ print $1,$2 }' | sort) > /dev/null
mapreduce/utils.lua | lua misc/naive.lua | awk '{ print $1,$2 }' | sort) > /dev/null
if [[ $? -ne 0 ]]; then
echo "ERROR"
exit 1
Expand Down

0 comments on commit 9dad7ad

Please sign in to comment.