Skip to content

Commit a3e128d

Browse files
committed
kernel_patch_verify: Provide commits explicitly to patchwise
Provide the list of commits we want to test explicitly to patchwise. patchwise in this version, just tests one single patch at a time rather than use the full series and maintain the dependency order, which makes it less useful, but at least the result log will follow the pattern of the patches as desired. Signed-off-by: Nishanth Menon <[email protected]>
1 parent 1ca84d9 commit a3e128d

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

kernel_patch_verify

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,14 +1218,6 @@ done
12181218
tests_end
12191219

12201220
if [ "$PATCHWISE" -eq 1 ]; then
1221-
PATCHWISE_ARGS=""
1222-
if [ "$OPENAI_API_PROVIDER" ]; then
1223-
PATCHWISE_ARGS="$PATCHWISE_ARGS --provider=$OPENAI_API_PROVIDER"
1224-
fi
1225-
if [ "$OPENAI_API_MODEL" ]; then
1226-
PATCHWISE_ARGS="$PATCHWISE_ARGS --model=$OPENAI_API_MODEL"
1227-
fi
1228-
PATCHWISE_ARGS="$PATCHWISE_ARGS --repo-path . --commits=HEAD...HEAD~$PATCHCOUNT"
12291221
echo "Starting Patchwise for $PATCHCOUNT patches.. Please be patient"
12301222
if [ -n "$CURRENT_BRANCH" ]; then
12311223
echo "Restoring to $CURRENT_BRANCH branch"
@@ -1235,6 +1227,15 @@ if [ "$PATCHWISE" -eq 1 ]; then
12351227
if [ -d '/tmp/patchwise/sandbox/kernel' ]; then
12361228
rm -rf /tmp/patchwise/sandbox/kernel
12371229
fi
1230+
PATCHWISE_ARGS=""
1231+
if [ "$OPENAI_API_PROVIDER" ]; then
1232+
PATCHWISE_ARGS="$PATCHWISE_ARGS --provider=$OPENAI_API_PROVIDER"
1233+
fi
1234+
if [ "$OPENAI_API_MODEL" ]; then
1235+
PATCHWISE_ARGS="$PATCHWISE_ARGS --model=$OPENAI_API_MODEL"
1236+
fi
1237+
COMMITS=`git log --abbrev=40 --oneline HEAD...HEAD~$PATCHCOUNT|tac|cut -d ' ' -f1|xargs echo`
1238+
PATCHWISE_ARGS="$PATCHWISE_ARGS --repo-path . --commits $COMMITS"
12381239
patchwise $PATCHWISE_ARGS --log-file "$LOG_DIR/patch-wise.log"
12391240
fi
12401241

0 commit comments

Comments
 (0)