Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests #80

Merged
merged 8 commits into from Oct 16, 2014
Merged

Tests #80

merged 8 commits into from Oct 16, 2014

Conversation

chinchliff
Copy link
Member

Changing tests as requested in #79, and general cleanup of installation/testing scripts.

@jar398
Copy link
Member

jar398 commented Oct 9, 2014

./test.sh: line 8: nosetests: command not found

tests/run_unit_tests.sh

count=$?
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jar398, here's the line in question

@chinchliff
Copy link
Member Author

I'm not sure how you got that using the latest version of tests.sh, nosetests used to be called on line 8, but now it isn't called until inside run_service_tests.sh, and on line 19 of tests.sh it is checked for and installed by virtualenv if it is missing...

@jar398
Copy link
Member

jar398 commented Oct 16, 2014

I just updated taxomachine to the tests branch, and ran the top level test.sh. It still says
./test.sh: line 8: nosetests: command not found
as of course it should since it's not making any effort to make sure that nosetests is defined. It's test.sh that needs to be fixed.

@chinchliff
Copy link
Member Author

I am confused. test.sh should not be doing anything related to nosetests on line 8, and it does indeed make an effort to check make sure that nosetests is defined, on line 19, which is also the first occurrence of the string 'nose' in the file. Am I overlooking something? As I indicated earlier in this comment thread, line 8 in the current version of test.sh in this branch should be accessing the count of failed unit tests, not doing anything related to nosetests. E.g.

Meconopsis:taxomachine cody$ pwd
/Users/cody/phylo/taxomachine
Meconopsis:taxomachine cody$ git status
On branch tests
nothing to commit, working directory clean
Meconopsis:taxomachine cody$ git pull origin tests
From github.com:opentreeoflife/taxomachine
 * branch            tests      -> FETCH_HEAD
Already up-to-date.
Meconopsis:taxomachine cody$ head -n 8 test.sh 
## java unit tests
echo "Running Java unit tests"

type mvn >/dev/null 2>&1 || { echo >&2 "maven is required for testing but could not be found. Aborting."; exit 1; }

tests/run_unit_tests.sh

count=$?
Meconopsis:taxomachine cody$ grep -n nose test.sh 
19:type nosetests >/dev/null 2>&1 || { echo "installing test dependencies"; ./install_dependencies_for_tests.sh; }
Meconopsis:taxomachine cody$ 

@jar398
Copy link
Member

jar398 commented Oct 16, 2014

Did you push your tests branch to github? Here's what I see:

bash-3.2$ ot17
Linux ip-10-17-6-84 3.2.0-4-amd64 #1 SMP Debian 3.2.57-3 x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Oct 9 21:05:43 2014 from 128.30.16.206
opentree@ip-10-17-6-84:$ cd repo/taxomachine
opentree@ip-10-17-6-84:
/repo/taxomachine$ ./test.sh
./test.sh: line 8: nosetests: command not found
opentree@ip-10-17-6-84:/repo/taxomachine$ git pull
Already up-to-date.
opentree@ip-10-17-6-84:
/repo/taxomachine$ cat test.sh

set the TAXOMACHINE_SERVER environment variable in your shell to point

the script at the right location, e.g.:

TAXOMACHINE_SERVER=devapi.opentreeoflife.org/taxomachine # to run

remotely against devapi

TAXOMACHINE_SERVER=localhost:7476/db/data # to run locally on devapi

[ -z "$TAXOMACHINE_SERVER" ] && TAXOMACHINE_SERVER='localhost:7474/db/data'
&& export TAXOMACHINE_SERVER
cd tests && nosetests -vs curl_tests.pyopentree@ip-10-17-6-84
:~/repo/taxomachine$

On Thu, Oct 16, 2014 at 2:40 PM, Cody Hinchliff notifications@github.com
wrote:

I am confused. test.sh should not be doing anything related to nosetests
on line 8, and it does indeed make an effort to check make sure that
nosetests is defined, on line 19, which is also the first occurrence of the
string 'nose' in the file. Am I overlooking something? As I indicated
earlier in this comment thread, line 8 in the current version of test.sh in
this branch should be accessing the count of failed unit tests, not doing
anything related to nosetests. E.g.

Meconopsis:taxomachine cody$ pwd
/Users/cody/phylo/taxomachine
Meconopsis:taxomachine cody$ git status
On branch tests
nothing to commit, working directory clean
Meconopsis:taxomachine cody$ git pull origin tests
From github.com:opentreeoflife/taxomachine

  • branch tests -> FETCH_HEAD
    Already up-to-date.
    Meconopsis:taxomachine cody$ head -n 8 test.sh ## java unit testsecho "Running Java unit tests"
    type mvn >/dev/null 2>&1 || { echo >&2 "maven is required for testing but could not be found. Aborting."; exit 1; }

tests/run_unit_tests.sh
count=$?
Meconopsis:taxomachine cody$ grep -n nose test.sh
19:type nosetests >/dev/null 2>&1 || { echo "installing test dependencies"; ./install_dependencies_for_tests.sh; }
Meconopsis:taxomachine cody$


Reply to this email directly or view it on GitHub
#80 (comment)
.

@chinchliff
Copy link
Member Author

Yes, it has been pushed to github. That comment is attached to the test.sh
file in github. Perhaps your git is not set up to pull changes to that
branch using the generic pull command? What happens if you try 'git pull
origin tests'?

On Thu, Oct 16, 2014 at 2:54 PM, Jonathan A Rees notifications@github.com
wrote:

Did you push your tests branch to github? Here's what I see:

bash-3.2$ ot17
Linux ip-10-17-6-84 3.2.0-4-amd64 #1 SMP Debian 3.2.57-3 x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Oct 9 21:05:43 2014 from 128.30.16.206
opentree@ip-10-17-6-84:$ cd repo/taxomachine
opentree@ip-10-17-6-84:
/repo/taxomachine$ ./test.sh
./test.sh: line 8: nosetests: command not found
opentree@ip-10-17-6-84:/repo/taxomachine$ git pull
Already up-to-date.
opentree@ip-10-17-6-84:
/repo/taxomachine$ cat test.sh

set the TAXOMACHINE_SERVER environment variable in your shell to point

the script at the right location, e.g.:

TAXOMACHINE_SERVER=devapi.opentreeoflife.org/taxomachine # to run

remotely against devapi

TAXOMACHINE_SERVER=localhost:7476/db/data # to run locally on devapi

[ -z "$TAXOMACHINE_SERVER" ] &&
TAXOMACHINE_SERVER='localhost:7474/db/data'
&& export TAXOMACHINE_SERVER
cd tests && nosetests -vs curl_tests.pyopentree@ip-10-17-6-84
:~/repo/taxomachine$

On Thu, Oct 16, 2014 at 2:40 PM, Cody Hinchliff notifications@github.com

wrote:

I am confused. test.sh should not be doing anything related to nosetests
on line 8, and it does indeed make an effort to check make sure that
nosetests is defined, on line 19, which is also the first occurrence of
the
string 'nose' in the file. Am I overlooking something? As I indicated
earlier in this comment thread, line 8 in the current version of test.sh
in
this branch should be accessing the count of failed unit tests, not
doing
anything related to nosetests. E.g.

Meconopsis:taxomachine cody$ pwd
/Users/cody/phylo/taxomachine
Meconopsis:taxomachine cody$ git status
On branch tests
nothing to commit, working directory clean
Meconopsis:taxomachine cody$ git pull origin tests
From github.com:opentreeoflife/taxomachine

  • branch tests -> FETCH_HEAD
    Already up-to-date.
    Meconopsis:taxomachine cody$ head -n 8 test.sh ## java unit testsecho
    "Running Java unit tests"
    type mvn >/dev/null 2>&1 || { echo >&2 "maven is required for testing
    but could not be found. Aborting."; exit 1; }

tests/run_unit_tests.sh
count=$?
Meconopsis:taxomachine cody$ grep -n nose test.sh
19:type nosetests >/dev/null 2>&1 || { echo "installing test
dependencies"; ./install_dependencies_for_tests.sh; }
Meconopsis:taxomachine cody$


Reply to this email directly or view it on GitHub
<
https://github.com/OpenTreeOfLife/taxomachine/pull/80#issuecomment-59409299>

.


Reply to this email directly or view it on GitHub
#80 (comment)
.

@jar398
Copy link
Member

jar398 commented Oct 16, 2014

That was the problem, thanks. I've modified the git_refresh function in the
deployment system per your advice.

I don't fully understand how 'git pull' works. Or 'git fetch' for that
matter.

jar398 added a commit that referenced this pull request Oct 16, 2014
@jar398 jar398 merged commit 64752a3 into master Oct 16, 2014
@josephwb josephwb deleted the tests branch October 22, 2015 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants