summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/patchtest6
-rw-r--r--scripts/patchtest.README10
2 files changed, 10 insertions, 6 deletions
diff --git a/scripts/patchtest b/scripts/patchtest
index 9525a2be17..b25ef18321 100755
--- a/scripts/patchtest
+++ b/scripts/patchtest
@@ -142,7 +142,7 @@ def _runner(resultklass, prefix=None):
142 loader.testMethodPrefix = prefix 142 loader.testMethodPrefix = prefix
143 143
144 # create the suite with discovered tests and the corresponding runner 144 # create the suite with discovered tests and the corresponding runner
145 suite = loader.discover(start_dir=PatchTestInput.startdir, pattern=PatchTestInput.pattern, top_level_dir=PatchTestInput.topdir) 145 suite = loader.discover(start_dir=PatchTestInput.testdir, pattern=PatchTestInput.pattern, top_level_dir=PatchTestInput.topdir)
146 ntc = suite.countTestCases() 146 ntc = suite.countTestCases()
147 147
148 # if there are no test cases, just quit 148 # if there are no test cases, just quit
@@ -220,9 +220,9 @@ if __name__ == '__main__':
220 if PatchTestInput.debug: 220 if PatchTestInput.debug:
221 logger.setLevel(logging.DEBUG) 221 logger.setLevel(logging.DEBUG)
222 222
223 # if topdir not define, default it to startdir 223 # if topdir not define, default it to testdir
224 if not PatchTestInput.topdir: 224 if not PatchTestInput.topdir:
225 PatchTestInput.topdir = PatchTestInput.startdir 225 PatchTestInput.topdir = PatchTestInput.testdir
226 226
227 try: 227 try:
228 ret = main() 228 ret = main()
diff --git a/scripts/patchtest.README b/scripts/patchtest.README
index 689d513df5..ad46b02ad6 100644
--- a/scripts/patchtest.README
+++ b/scripts/patchtest.README
@@ -79,15 +79,19 @@ To run patchtest on the host, do the following:
79 or patchtest-get-series 79 or patchtest-get-series
803. Run patchtest on a patch file by doing the following: 803. Run patchtest on a patch file by doing the following:
81 81
82 patchtest --patch /path/to/patch/file /path/to/target/repo /path/to/tests/directory 82 patchtest --patch /path/to/patch/file
83 83
84 or, if you have stored the patch files in a directory, do: 84 or, if you have stored the patch files in a directory, do:
85 85
86 patchtest --directory /path/to/patch/directory /path/to/target/repo /path/to/tests/directory 86 patchtest --directory /path/to/patch/directory
87 87
88 For example, to test `master-gcc-Fix--fstack-protector-issue-on-aarch64.patch` against the oe-core test suite: 88 For example, to test `master-gcc-Fix--fstack-protector-issue-on-aarch64.patch` against the oe-core test suite:
89 89
90 patchtest --patch master-gcc-Fix--fstack-protector-issue-on-aarch64.patch /path/to/openembedded-core /path/to/openembedded-core/meta/lib/patchtest/tests 90 patchtest --patch master-gcc-Fix--fstack-protector-issue-on-aarch64.patch
91
92 If you want to use a different test suite or target repository, you can use the --testdir and --repodir flags:
93
94 patchtest --patch /path/to/patch/file --repodir /path/to/repo --testdir /path/to/test/dir
91 95
92### Guest Mode 96### Guest Mode
93 97