|
@@ -72,9 +72,9 @@ basically two things that can be done:
|
|
can be removed.
|
|
can be removed.
|
|
In the commit message of a patch fixing an autobuild failure, add a
|
|
In the commit message of a patch fixing an autobuild failure, add a
|
|
reference to the build result directory, as follows:
|
|
reference to the build result directory, as follows:
|
|
----------------------
|
|
|
|
|
|
+----
|
|
Fixes: http://autobuild.buildroot.org/results/51000a9d4656afe9e0ea6f07b9f8ed374c2e4069
|
|
Fixes: http://autobuild.buildroot.org/results/51000a9d4656afe9e0ea6f07b9f8ed374c2e4069
|
|
----------------------
|
|
|
|
|
|
+----
|
|
|
|
|
|
=== Reviewing and testing patches
|
|
=== Reviewing and testing patches
|
|
|
|
|
|
@@ -153,10 +153,10 @@ When browsing patches in the patchwork management interface, an +mbox+
|
|
link is provided at the top of the page. Copy this link address and
|
|
link is provided at the top of the page. Copy this link address and
|
|
run the following commands:
|
|
run the following commands:
|
|
|
|
|
|
----------------------
|
|
|
|
|
|
+----
|
|
$ git checkout -b <test-branch-name>
|
|
$ git checkout -b <test-branch-name>
|
|
$ wget -O - <mbox-url> | git am
|
|
$ wget -O - <mbox-url> | git am
|
|
----------------------
|
|
|
|
|
|
+----
|
|
|
|
|
|
Another option for applying patches is to create a bundle. A bundle is
|
|
Another option for applying patches is to create a bundle. A bundle is
|
|
a set of patches that you can group together using the patchwork
|
|
a set of patches that you can group together using the patchwork
|
|
@@ -306,24 +306,24 @@ Starting from the changes committed in your local git view, _rebase_
|
|
your development branch on top of the upstream tree before generating
|
|
your development branch on top of the upstream tree before generating
|
|
a patch set. To do so, run:
|
|
a patch set. To do so, run:
|
|
|
|
|
|
----------------------
|
|
|
|
|
|
+----
|
|
$ git fetch --all --tags
|
|
$ git fetch --all --tags
|
|
$ git rebase origin/master
|
|
$ git rebase origin/master
|
|
----------------------
|
|
|
|
|
|
+----
|
|
|
|
|
|
Now check the coding style for the changes you committed:
|
|
Now check the coding style for the changes you committed:
|
|
|
|
|
|
----------------------
|
|
|
|
|
|
+----
|
|
$ utils/docker-run make check-package
|
|
$ utils/docker-run make check-package
|
|
----------------------
|
|
|
|
|
|
+----
|
|
|
|
|
|
Now, you are ready to generate then submit your patch set.
|
|
Now, you are ready to generate then submit your patch set.
|
|
|
|
|
|
To generate it, run:
|
|
To generate it, run:
|
|
|
|
|
|
----------------------
|
|
|
|
|
|
+----
|
|
$ git format-patch -M -n -s -o outgoing origin/master
|
|
$ git format-patch -M -n -s -o outgoing origin/master
|
|
----------------------
|
|
|
|
|
|
+----
|
|
|
|
|
|
This will generate patch files in the +outgoing+ subdirectory,
|
|
This will generate patch files in the +outgoing+ subdirectory,
|
|
automatically adding the +Signed-off-by+ line.
|
|
automatically adding the +Signed-off-by+ line.
|
|
@@ -336,37 +336,37 @@ sent, called +get-developers+ (see xref:DEVELOPERS[] for more
|
|
information). This tool reads your patches and outputs the appropriate
|
|
information). This tool reads your patches and outputs the appropriate
|
|
+git send-email+ command to use:
|
|
+git send-email+ command to use:
|
|
|
|
|
|
----------------------
|
|
|
|
|
|
+----
|
|
$ ./utils/get-developers outgoing/*
|
|
$ ./utils/get-developers outgoing/*
|
|
----------------------
|
|
|
|
|
|
+----
|
|
|
|
|
|
Use the output of +get-developers+ to send your patches:
|
|
Use the output of +get-developers+ to send your patches:
|
|
|
|
|
|
----------------------
|
|
|
|
|
|
+----
|
|
$ git send-email --to buildroot@buildroot.org --cc bob --cc alice outgoing/*
|
|
$ git send-email --to buildroot@buildroot.org --cc bob --cc alice outgoing/*
|
|
----------------------
|
|
|
|
|
|
+----
|
|
|
|
|
|
Alternatively, +get-developers -e+ can be used directly with the
|
|
Alternatively, +get-developers -e+ can be used directly with the
|
|
+--cc-cmd+ argument to +git send-email+ to automatically CC the
|
|
+--cc-cmd+ argument to +git send-email+ to automatically CC the
|
|
affected developers:
|
|
affected developers:
|
|
|
|
|
|
----------------------
|
|
|
|
|
|
+----
|
|
$ git send-email --to buildroot@buildroot.org \
|
|
$ git send-email --to buildroot@buildroot.org \
|
|
--cc-cmd './utils/get-developers -e' origin/master
|
|
--cc-cmd './utils/get-developers -e' origin/master
|
|
----------------------
|
|
|
|
|
|
+----
|
|
|
|
|
|
+git+ can be configured to automatically do this out of the box with:
|
|
+git+ can be configured to automatically do this out of the box with:
|
|
|
|
|
|
----------------------
|
|
|
|
|
|
+----
|
|
$ git config sendemail.to buildroot@buildroot.org
|
|
$ git config sendemail.to buildroot@buildroot.org
|
|
$ git config sendemail.ccCmd "$(pwd)/utils/get-developers -e"
|
|
$ git config sendemail.ccCmd "$(pwd)/utils/get-developers -e"
|
|
----------------------
|
|
|
|
|
|
+----
|
|
|
|
|
|
And then just do:
|
|
And then just do:
|
|
|
|
|
|
----------------------
|
|
|
|
|
|
+----
|
|
$ git send-email origin/master
|
|
$ git send-email origin/master
|
|
----------------------
|
|
|
|
|
|
+----
|
|
|
|
|
|
Note that +git+ should be configured to use your mail account.
|
|
Note that +git+ should be configured to use your mail account.
|
|
To configure +git+, see +man git-send-email+ or https://git-send-email.io/.
|
|
To configure +git+, see +man git-send-email+ or https://git-send-email.io/.
|
|
@@ -427,10 +427,10 @@ should be based off the maintenance branch, and the patch subject prefix
|
|
must include the maintenance branch name (for example "[PATCH 2020.02.x]").
|
|
must include the maintenance branch name (for example "[PATCH 2020.02.x]").
|
|
This can be done with the +git format-patch+ flag +--subject-prefix+:
|
|
This can be done with the +git format-patch+ flag +--subject-prefix+:
|
|
|
|
|
|
----------------------
|
|
|
|
|
|
+----
|
|
$ git format-patch --subject-prefix "PATCH 2020.02.x" \
|
|
$ git format-patch --subject-prefix "PATCH 2020.02.x" \
|
|
-M -s -o outgoing origin/2020.02.x
|
|
-M -s -o outgoing origin/2020.02.x
|
|
----------------------
|
|
|
|
|
|
+----
|
|
|
|
|
|
Then send the patches with +git send-email+, as described above.
|
|
Then send the patches with +git send-email+, as described above.
|
|
|
|
|
|
@@ -458,7 +458,7 @@ be preserved forever in the +git+ history of the project.
|
|
|
|
|
|
Hereafter the recommended layout:
|
|
Hereafter the recommended layout:
|
|
|
|
|
|
----------------
|
|
|
|
|
|
+----
|
|
Patch title: short explanation, max 72 chars
|
|
Patch title: short explanation, max 72 chars
|
|
|
|
|
|
A paragraph that explains the problem, and how it manifests itself. If
|
|
A paragraph that explains the problem, and how it manifests itself. If
|
|
@@ -481,7 +481,7 @@ Changes v2 -> v3:
|
|
Changes v1 -> v2:
|
|
Changes v1 -> v2:
|
|
- alpha bravo (suggested by John)
|
|
- alpha bravo (suggested by John)
|
|
- charly delta
|
|
- charly delta
|
|
----------------
|
|
|
|
|
|
+----
|
|
|
|
|
|
Any patch revision should include the version number. The version number
|
|
Any patch revision should include the version number. The version number
|
|
is simply composed of the letter +v+ followed by an +integer+ greater or
|
|
is simply composed of the letter +v+ followed by an +integer+ greater or
|
|
@@ -490,17 +490,17 @@ equal to two (i.e. "PATCH v2", "PATCH v3" ...).
|
|
This can be easily handled with +git format-patch+ by using the option
|
|
This can be easily handled with +git format-patch+ by using the option
|
|
+--subject-prefix+:
|
|
+--subject-prefix+:
|
|
|
|
|
|
----------------------
|
|
|
|
|
|
+----
|
|
$ git format-patch --subject-prefix "PATCH v4" \
|
|
$ git format-patch --subject-prefix "PATCH v4" \
|
|
-M -s -o outgoing origin/master
|
|
-M -s -o outgoing origin/master
|
|
----------------------
|
|
|
|
|
|
+----
|
|
|
|
|
|
Since git version 1.8.1, you can also use +-v <n>+ (where <n> is the
|
|
Since git version 1.8.1, you can also use +-v <n>+ (where <n> is the
|
|
version number):
|
|
version number):
|
|
|
|
|
|
----------------------
|
|
|
|
|
|
+----
|
|
$ git format-patch -v4 -M -s -o outgoing origin/master
|
|
$ git format-patch -v4 -M -s -o outgoing origin/master
|
|
----------------------
|
|
|
|
|
|
+----
|
|
|
|
|
|
When you provide a new version of a patch, please mark the old one as
|
|
When you provide a new version of a patch, please mark the old one as
|
|
superseded in
|
|
superseded in
|
|
@@ -579,7 +579,7 @@ cases can be listed by executing +support/testing/run-tests -l+. These tests
|
|
can all be run individually during test development from the console. Both
|
|
can all be run individually during test development from the console. Both
|
|
one at a time and selectively as a group of a subset of tests.
|
|
one at a time and selectively as a group of a subset of tests.
|
|
|
|
|
|
----------------------
|
|
|
|
|
|
+----
|
|
$ support/testing/run-tests -l
|
|
$ support/testing/run-tests -l
|
|
List of tests
|
|
List of tests
|
|
test_run (tests.utils.test_check_package.TestCheckPackage)
|
|
test_run (tests.utils.test_check_package.TestCheckPackage)
|
|
@@ -606,11 +606,11 @@ test_run (tests.init.test_busybox.TestInitSystemBusyboxRwNet) ... ok
|
|
Ran 157 tests in 0.021s
|
|
Ran 157 tests in 0.021s
|
|
|
|
|
|
OK
|
|
OK
|
|
----------------------
|
|
|
|
|
|
+----
|
|
|
|
|
|
* Then, to run one test case:
|
|
* Then, to run one test case:
|
|
|
|
|
|
----------------------
|
|
|
|
|
|
+----
|
|
$ support/testing/run-tests -d dl -o output_folder -k tests.init.test_busybox.TestInitSystemBusyboxRw
|
|
$ support/testing/run-tests -d dl -o output_folder -k tests.init.test_busybox.TestInitSystemBusyboxRw
|
|
15:03:26 TestInitSystemBusyboxRw Starting
|
|
15:03:26 TestInitSystemBusyboxRw Starting
|
|
15:03:28 TestInitSystemBusyboxRw Building
|
|
15:03:28 TestInitSystemBusyboxRw Building
|
|
@@ -620,7 +620,7 @@ $ support/testing/run-tests -d dl -o output_folder -k tests.init.test_busybox.Te
|
|
Ran 1 test in 301.140s
|
|
Ran 1 test in 301.140s
|
|
|
|
|
|
OK
|
|
OK
|
|
----------------------
|
|
|
|
|
|
+----
|
|
|
|
|
|
The standard output indicates if the test is successful or not. By
|
|
The standard output indicates if the test is successful or not. By
|
|
default, the output folder for the test is deleted automatically
|
|
default, the output folder for the test is deleted automatically
|
|
@@ -674,12 +674,12 @@ be the maintainer of that test case.
|
|
|
|
|
|
When a test case runs, the +output_folder+ will contain the following:
|
|
When a test case runs, the +output_folder+ will contain the following:
|
|
|
|
|
|
----------------------
|
|
|
|
|
|
+----
|
|
$ ls output_folder/
|
|
$ ls output_folder/
|
|
TestInitSystemBusyboxRw/
|
|
TestInitSystemBusyboxRw/
|
|
TestInitSystemBusyboxRw-build.log
|
|
TestInitSystemBusyboxRw-build.log
|
|
TestInitSystemBusyboxRw-run.log
|
|
TestInitSystemBusyboxRw-run.log
|
|
----------------------
|
|
|
|
|
|
+----
|
|
|
|
|
|
+TestInitSystemBusyboxRw/+ is the Buildroot output directory, and it
|
|
+TestInitSystemBusyboxRw/+ is the Buildroot output directory, and it
|
|
is preserved only if the +-k+ option is passed.
|
|
is preserved only if the +-k+ option is passed.
|
|
@@ -721,28 +721,28 @@ arbitrary string you choose.
|
|
* To trigger all run-test test case jobs, push a branch that ends with
|
|
* To trigger all run-test test case jobs, push a branch that ends with
|
|
+-runtime-tests+:
|
|
+-runtime-tests+:
|
|
|
|
|
|
----------------------
|
|
|
|
|
|
+----
|
|
$ git push gitlab HEAD:<name>-runtime-tests
|
|
$ git push gitlab HEAD:<name>-runtime-tests
|
|
----------------------
|
|
|
|
|
|
+----
|
|
|
|
|
|
* To trigger one or several test case jobs, push a branch that ends
|
|
* To trigger one or several test case jobs, push a branch that ends
|
|
with the complete test case name
|
|
with the complete test case name
|
|
(+tests.init.test_busybox.TestInitSystemBusyboxRo+) or with the name
|
|
(+tests.init.test_busybox.TestInitSystemBusyboxRo+) or with the name
|
|
of a category of tests (+tests.init.test_busybox+):
|
|
of a category of tests (+tests.init.test_busybox+):
|
|
|
|
|
|
----------------------
|
|
|
|
|
|
+----
|
|
$ git push gitlab HEAD:<name>-<test case name>
|
|
$ git push gitlab HEAD:<name>-<test case name>
|
|
----------------------
|
|
|
|
|
|
+----
|
|
|
|
|
|
Example to run one test:
|
|
Example to run one test:
|
|
|
|
|
|
----------------------
|
|
|
|
|
|
+----
|
|
$ git push gitlab HEAD:foo-tests.init.test_busybox.TestInitSystemBusyboxRo
|
|
$ git push gitlab HEAD:foo-tests.init.test_busybox.TestInitSystemBusyboxRo
|
|
----------------------
|
|
|
|
|
|
+----
|
|
|
|
|
|
Examples to run several tests part of the same group:
|
|
Examples to run several tests part of the same group:
|
|
|
|
|
|
----------------------
|
|
|
|
|
|
+----
|
|
$ git push gitlab HEAD:foo-tests.init.test_busybox
|
|
$ git push gitlab HEAD:foo-tests.init.test_busybox
|
|
$ git push gitlab HEAD:foo-tests.init
|
|
$ git push gitlab HEAD:foo-tests.init
|
|
----------------------
|
|
|
|
|
|
+----
|