Unable to run tests with git bisect run

54 views
Skip to first unread message

Vimarsh Chaturvedi

unread,
Dec 1, 2016, 10:46:20 AM12/1/16
to Django developers (Contributions to Django itself)

Hey folks, 

This is the first time I'm trying to contribute to Django. I am working on ticket #27554
In the comments, there was a link posted to "Bisecting the exact commit that introduced the regression" saying that it could be helpful. So I started going about it. 

The problem is when I was running the test suite for the first time the online docs said to run "./runtests.py" from inside the tests directory which didn't work out for me but the README inside the tests directory said to run 
"PYTHONPATH=..:$PYTHONPATH ./runtests.py" which ran the tests.

So once I started bisecting every time I was going back I was running  "PYTHONPATH=..:$PYTHONPATH ./runtests.py flattened-prefetch". flattened-prefetch being the name of the directory where I've written my tests. Once I reached where a commit where all tests were passing I tried running 
"git bisect run PYTHONPATH=..:$PYTHONPATH ./runtests.py flattened-prefetch" and it's giving me the following error:

"running PYTHONPATH=../ tests/runtests.py flattened-prefetch
/usr/local/Cellar/git/2.4.6/libexec/git-core/git-bisect: line 440: PYTHONPATH=../: No such file or directory"

yet it's still saying "bisect run success". Since it didn't find PYTHONPATH so I'm guessing it's wrong? 

Thanks






Tim Graham

unread,
Dec 1, 2016, 11:01:32 AM12/1/16
to Django developers (Contributions to Django itself)
Hi,

Try to get the tests working in a virtual environment as described in https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/ so you don't need the PYTHONPATH stuff. If you need help, join the #django-dev IRC channel.

Thanks for contributing.

Baptiste Mispelon

unread,
Dec 1, 2016, 11:04:29 AM12/1/16
to django-d...@googlegroups.com
Hi,


You need to put the `PYTHONPATH=...` thing at the beginning of the line, like so:

PYTHONPATH=..:$PYTHONPATH git bisect run ./runtests.py flattened-prefetch



Baptiste
--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/7785957f-927a-4c1f-a253-3d783468170d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Reply all
Reply to author
Forward
0 new messages