diff mbox

test-patchset: Make a copy of the typo dictionary

Message ID 1422007769-26355-1-git-send-email-daniel.thompson@linaro.org
State New
Headers show

Commit Message

Daniel Thompson Jan. 23, 2015, 10:09 a.m. UTC
Currently aiaiai issues the following warning for each patch under test:
No typos will be found - file '/tmp/aiaiai-test-patchset.32BU/checkpatch/spellin
g.txt': No such file or directory

In fact the problem can even more acute when testing older kernels that do not
have this patch:
  https://lkml.org/lkml/2014/10/22/609

This patch fixes the problem by copying out the typo dictionary if one is
found.

Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
---
 aiaiai-test-patchset | 7 +++++++
 1 file changed, 7 insertions(+)

--
1.9.3

Comments

Daniel Thompson Jan. 23, 2015, 10:15 a.m. UTC | #1
On 23/01/15 10:09, Daniel Thompson wrote:
> Currently aiaiai issues the following warning for each patch under test:
> No typos will be found - file '/tmp/aiaiai-test-patchset.32BU/checkpatch/spellin
> g.txt': No such file or directory
> 
> In fact the problem can even more acute when testing older kernels that do not
> have this patch:
>   https://lkml.org/lkml/2014/10/22/609
> 
> This patch fixes the problem by copying out the typo dictionary if one is
> found.
> 
> Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>

Got this by IRC just minutes after sending the patch...

Tested-by: Lee Jones <lee.jones@linaro.org>


> ---
>  aiaiai-test-patchset | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/aiaiai-test-patchset b/aiaiai-test-patchset
> index dee9f80be2a6..e984f3c98657 100755
> --- a/aiaiai-test-patchset
> +++ b/aiaiai-test-patchset
> @@ -476,6 +476,13 @@ if [ -n "$checkpatch" ]; then
>  		checkpatch_pl="$tmpdir/checkpatch/checkpatch.pl"
>  		git show "$commit_id1:scripts/checkpatch.pl" > "$checkpatch_pl"
>  		chmod $verbose u+x "$checkpatch_pl" >&2
> +
> +		# Also grab the typo corrections if the kernel under test has
> +		# one (no need to report errors... if something is weird
> +		# checkpatch will let us know).
> +		if git cat-file -e "$commit_id1:scripts/spelling.txt" 2>/dev/null; then
> +			git show "$commit_id1:scripts/spelling.txt" > "$tmpdir/checkpatch/spelling.txt"
> +		fi
>  	else
>  		verbose "Can't find checkpatch.pl.. disabling checkpatch tests."
>  		checkpatch=
> --
> 1.9.3
>
diff mbox

Patch

diff --git a/aiaiai-test-patchset b/aiaiai-test-patchset
index dee9f80be2a6..e984f3c98657 100755
--- a/aiaiai-test-patchset
+++ b/aiaiai-test-patchset
@@ -476,6 +476,13 @@  if [ -n "$checkpatch" ]; then
 		checkpatch_pl="$tmpdir/checkpatch/checkpatch.pl"
 		git show "$commit_id1:scripts/checkpatch.pl" > "$checkpatch_pl"
 		chmod $verbose u+x "$checkpatch_pl" >&2
+
+		# Also grab the typo corrections if the kernel under test has
+		# one (no need to report errors... if something is weird
+		# checkpatch will let us know).
+		if git cat-file -e "$commit_id1:scripts/spelling.txt" 2>/dev/null; then
+			git show "$commit_id1:scripts/spelling.txt" > "$tmpdir/checkpatch/spelling.txt"
+		fi
 	else
 		verbose "Can't find checkpatch.pl.. disabling checkpatch tests."
 		checkpatch=