11 Commits

Author SHA1 Message Date
Joel Brobecker
6c66db746b Stop adding gnatpython to the PATH used by the hooks
This makes sure that we no longer force the use of this version
of Python if it happens to be available on the machine where
the hooks are being run. Using gnatpython is no longer desirable
since it does not support Python 3.x.

Change-Id: I0505e455e3319b78502acbc79c359b79ca555b92
TN: U530-006
2021-10-19 13:18:00 -07:00
Joel Brobecker
dc09109dca pre_receive.py, update, post_receive.py: Turn buffering off
While testing the behavior of the git-hooks under Python 3.x,
I noticed that the order of some output was not the same as
when running it with Python 2.x. When investigating further,
I found that the order with Python 2.x made better sense, and
that the different order was caused by stdout/stderr buffering.

This commit turns buffering off entirely in an effort to make
sure that output sent to stdout & stderr gets seen in the order
that it was sent.

As it happens, while this commit was aimed at Python 3.x,
running the testsuite showed that we had one testcase where
the order when using Python 2.x was also incorrect, and
therefore misleading, for a couple of tests. The tests'
expected output was double-checked, and adjusted accordingly,
with additional comments explaining what each part was about.

TN: U530-006
Change-Id: Iaf2c5266e13a645dab006e1f7f4cb553cbd5704f
2021-07-11 14:56:38 -07:00
Joel Brobecker
228cf0682c post-receive, update: Update hardcoded path to Git & Python.
sourceware now provides a more central location where specific versions
of some tools can be installed. Git and Python have now been installed
there, so update the scripts accordingly.
2014-12-26 18:46:09 +04:00
Joel Brobecker
253acaa618 post-receive, update: Add hardcoded path to Git & Python.
Unfortunately, both git and Python are too old on sourceware.org, so
a local install has been made as a workaround, and this patch updates
the PATH to use them from the two scripts that our hooks define.

Note that this is not completely exhaustive, since other operations
get performed by git outside of hooks, and those can still cause
trouble during the testsuite run. But, for now, things seem to be
relatively in control, as the number of failures associated to that
are fairly small, and can be controlled by hand.
2014-12-21 15:51:25 -05:00
Joel Brobecker
709c49a11a update: Add path to python-checker.sh...
... and various other scripts used by cvs_check (?).

Part of M130-007.
2013-02-01 08:00:18 -08:00
Joel Brobecker
90df19cf92 update: Search cvs_check from a couple of locations.
These hooks are deployed on two different machines where the location
of the cvs_check program is different, depending on the machine.
Allow either location.

Get rid of the location that references /jouy.a, and use /svn/Dev/hooks
instead.

For M130-007.
2013-01-31 16:59:02 -08:00
Joel Brobecker
fc1f0d9e74 update: Minor reformatting. 2013-01-31 16:52:47 -08:00
Joel Brobecker
81d42d6cf9 Adjust path to gnatpython.
The previous location was the one used on kani, but wasn't canonical.
We're now switching over to moorea, where the incorrect path has been
fixed.

M130-007.
2013-01-31 09:10:19 -08:00
Joel Brobecker
f242916191 update: Adjust location to cvs_check.
Part of M130-007.
2013-01-31 09:10:16 -08:00
Joel Brobecker
e31076a21a update: Add path to cvs_check.
For LC27-004.
2012-12-27 10:10:22 +04:00
Joel Brobecker
5810363c92 Partial implementation, with a testsuite infrastructure.
Very little is currently implemented, but this should be a good start.
2012-04-27 13:44:51 -07:00