diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2014-02-04 19:18:16 +0200 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2014-02-04 19:33:07 +0200 |
commit | 1512a046fb025dc512539680c2e95cf43572f353 (patch) | |
tree | bb8b69f706d1165f4e322ef26f16a2863d604644 | |
parent | 655461fefc31e1e404802149f83d171ba33a4c01 (diff) | |
download | aiaiai-1512a046fb025dc512539680c2e95cf43572f353.tar.gz |
test-patchset: stop using own copy of checkpatch.pl
Own copy of checkpatch.pl tends to be out-of-date. Start using
checkpatch.pl from the tree we test against instead.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-rwxr-xr-x | aiaiai-test-patchset | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/aiaiai-test-patchset b/aiaiai-test-patchset index 260d6b3..58287cc 100755 --- a/aiaiai-test-patchset +++ b/aiaiai-test-patchset @@ -110,7 +110,7 @@ test_checkpatch() formail +$n -1 -s < "$mbox" > "$tmp_mbox" truncate -s0 "$tmp_out" - checkpatch.pl $opts - < "$tmp_mbox" > "$tmp_out" ||: + "$checkpatch_pl" $opts - < "$tmp_mbox" > "$tmp_out" ||: n="$(($n+1))" [ -s "$tmp_out" ] || continue @@ -127,7 +127,7 @@ test_checkpatch() if [ "$patch_cnt" -gt 1 ]; then # Check the squashed patch truncate -s0 "$tmp_out" - checkpatch.pl --no-signoff $opts - < "$tmpdir/diff-for-checkpatch" > "$tmp_out" ||: + "$checkpatch_pl" --no-signoff $opts - < "$tmpdir/diff-for-checkpatch" > "$tmp_out" ||: [ -s "$tmp_out" ] || return 0 printf "\n" >> "$tmpdir/checkpatch.results" @@ -344,6 +344,7 @@ program_required "formail" "" program_required "python" "" program_required "perl" "" program_required "diff" "" +program_required "tar" "" for defconfig in $defconfigs; do cross="$(leave_third "$defconfig")"; @@ -400,7 +401,6 @@ verbose "Commit after applying the patch(es): $(git log -1 --oneline "$commit_id # Re-generate the patch. Note, we prefer to not use the input mbox directly # because it may be encoded (e.g., with quoted-printable). -# git format-patch -M --patience --stdout "$commit_id1".."$commit_id2" > "$mbox" # Generate a diff for aiaiai-diff-log @@ -409,6 +409,14 @@ git diff -U0 -M "$commit_id1".."$commit_id2" > "$tmpdir/diff-for-diff-log" # Generate a diff for checkpatch.pl git diff -M "$commit_id1".."$commit_id2" > "$tmpdir/diff-for-checkpatch" +# Make a copy of 'checlpatch.pl'. This is safer than using it directly from the +# git tree because we'll apply patches under test there, and the patches may +# also change 'checlpatch.pl'. +mkdir -p $verbose "$tmpdir/checkpatch" >&2 +checkpatch_pl="$tmpdir/checkpatch/checkpatch.pl" +git show "$commit_id1:scripts/checkpatch.pl" > "$checkpatch_pl" +chmod $verbose u+x "$checkpatch_pl" >&2 + # Run checkpatch.pl in backgound. test_checkpatch & pid_checkpatch="$!" |