-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[app][test] Revert monkey patch for sh -c
- rename test.sh -> travis-test.sh and change Makefile - add new test.sh to call from Ayi Issue #7
- Loading branch information
Showing
6 changed files
with
52 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,7 @@ build-all: | |
.PHONY: build-all | ||
|
||
test: | ||
./scripts/test.sh | ||
./scripts/travis-test.sh | ||
.PHONY: test | ||
|
||
install: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
# FIXME: should put this in makefile, but I don't know how to make $(glide novendor) works in make file | ||
|
||
# switch folder | ||
# get the script path http://stackoverflow.com/questions/4774054/reliable-way-for-a-bash-script-to-get-the-full-path-to-itself | ||
pushd `dirname $0` > /dev/null | ||
SCRIPTPATH=`pwd -P` | ||
popd > /dev/null | ||
# get current working directory | ||
ORIGINAL_WD=${PWD} | ||
# switch to script directory | ||
cd ${SCRIPTPATH} | ||
# switch to parent folder | ||
cd .. | ||
|
||
# run the test | ||
# FIXME: the backup seems to have folder issue, will generate a nested fixture folder | ||
|
||
echo "backup the fixture" | ||
cp -r fixture fixture-bak | ||
|
||
# TODO: only do this in travis | ||
# add glide to path | ||
export PATH=$PATH:${SCRIPTPATH}/linux-amd64 | ||
# show it is working | ||
glide -v | ||
|
||
# enable go vendor feature for 1.5 | ||
echo "enable go vendor feature" | ||
export GO15VENDOREXPERIMENT=1 | ||
|
||
go test -v -cover $(glide novendor) | ||
echo "recover the fixture" | ||
rm -r fixture | ||
mv fixture-bak fixture | ||
|
||
# go back to the old working directory | ||
cd ${ORIGINAL_WD} | ||
go test -v -cover $(glide novendor) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/usr/bin/env bash | ||
|
||
# FIXME: should put this in makefile, but I don't know how to make $(glide novendor) works in make file | ||
|
||
# switch folder | ||
# get the script path http://stackoverflow.com/questions/4774054/reliable-way-for-a-bash-script-to-get-the-full-path-to-itself | ||
pushd `dirname $0` > /dev/null | ||
SCRIPTPATH=`pwd -P` | ||
popd > /dev/null | ||
# get current working directory | ||
ORIGINAL_WD=${PWD} | ||
# switch to script directory | ||
cd ${SCRIPTPATH} | ||
# switch to parent folder | ||
cd .. | ||
|
||
# run the test | ||
# FIXME: the backup seems to have folder issue, will generate a nested fixture folder | ||
|
||
echo "backup the fixture" | ||
cp -r fixture fixture-bak | ||
|
||
# TODO: only do this in travis | ||
# add glide to path | ||
export PATH=$PATH:${SCRIPTPATH}/linux-amd64 | ||
# show it is working | ||
glide -v | ||
|
||
# enable go vendor feature for 1.5 | ||
echo "enable go vendor feature" | ||
export GO15VENDOREXPERIMENT=1 | ||
|
||
go test -v -cover $(glide novendor) | ||
echo "recover the fixture" | ||
rm -r fixture | ||
mv fixture-bak fixture | ||
|
||
# go back to the old working directory | ||
cd ${ORIGINAL_WD} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters