On (02/09/15 14:39), Nikolai Kondrashov wrote:
On 09/02/2015 10:05 AM, Lukas Slebodnik wrote:
>On (01/09/15 15:36), Nikolai Kondrashov wrote:
>>On 08/31/2015 09:59 AM, Lukas Slebodnik wrote:
>>>diff --git a/src/tests/whitespace_test b/src/tests/whitespace_test
>>>new file mode 100755
>>>index
0000000000000000000000000000000000000000..508fe2d532cc6a3967af8eaa5c7dc4dccdc653f3
>>>--- /dev/null
>>>+++ b/src/tests/whitespace_test
>>>@@ -0,0 +1,32 @@
>>>+#!/bin/bash
>>>+
>>>+set -e -u -o pipefail
>>>+
>>>+# An AWK regex matching tracked file paths to be excluded from the search.
>>>+# Example: '.*\.po|README'
>>>+PATH_EXCLUDE_REGEX='.*\.po|.*\.patch|.*\.diff'
>>
>>I suggest we also add '|/debian/.*' here to keep the downstream happy.
>>Although it theoretically should be done in their own repo, we can make life
>>simpler to them.
>>
>Even though there isn't big problem with other files in debian
>Timo (debian maintainer) prefer the same.
>
>>>+
>>>+export GIT_DIR="$ABS_TOP_SRCDIR/.git"
>>>+export GIT_WORK_TREE="$ABS_TOP_SRCDIR"
>>>+
>>>+if [ ! -d "$GIT_DIR" ]; then
>>>+ echo "Git repository is required for this test!"
>>>+ exit 77
>>>+fi
>>
>>Strictly speaking, this message should be output to stderr, but that doesn't
>>make much difference here.
>>
>No problem.
>Updated.
>
>BTW test passed(was not skipped) even if builddir was outside of GIT_WORK_TREE.
Sure. I was concerned with the other git uses, i.e. the rpm* targets.
In case of "make rpms" or "make prerelease-rpms", we run
rpmbuild
for building packages. And rpmbuild uses tarball as a source so
ABS_TOP_SRCDIR would not be the same as GIT_WORK_TREE.
>Nikolai,
>Do you have any other ideas dow to improve the test?
>Or is there a use case which is covered only in your version?
Hmm, no, I don't think there is anything else to do here.
I haven't tested it, otherwise ACK.
Thank you for review. But It would be good if 3rd person
formally ACK the patch because we(both) are authors of 2nd patch :-)
LS