summaryrefslogtreecommitdiffstats
path: root/utils
Commit message (Collapse)AuthorAgeFilesLines
...
* genrandconfig: replace kwargs with explicit argumentsArnout Vandecappelle2017-07-251-28/+16
| | | | | | | | | | | | | kwargs is a left-over from the use of docopt, it's better to use argparse's Namespace object directly. In addition, most functions use just one or two fields of args, so these can just as well be passed directly as arguments to the function. Particularly for outputdir it doesn't make sense to reconstruct it all the time. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* genrandconfig: fix (some) pep8 warningsArnout Vandecappelle2017-07-251-17/+36
| | | | | | | | | | | | | | | | | | | | | | Warnings fixed: E731 do not assign a lambda expression, use a def -> urlopen_closing is defined with a def. urlopen is not used elsewhere so inlined. E302 expected 2 blank lines E501 line too long -> long lines due to a long string are NOT split E701 multiple statements on one line (colon) E722 do not use bare except' -> use "except Exception", so KeyInterrupt and SystemExit are still passed. We never intended to catch those. E741 ambiguous variable name 'l' -> variable name is replaced with the much more descriptive toolchains_csv E271 multiple spaces after keyword E231 missing whitespace after ',' Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* genrandconfig: use subprocess.check_output instead of PopenArnout Vandecappelle2017-07-251-1/+1
| | | | | | | | | | Popen is more complicated and more difficult to understand. check_output raises an exception if the exit code is non-zero, but that's probably what we want if ldd can't be executed. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* utils/genrandconfig: new scriptArnout Vandecappelle2017-07-251-0/+445
| | | | | | | | | | | | | | | | | | | | | | | | | This script will be used by the autobuild-run script to generate the configuration to test. It is put in the utils directory because it can also be called directly to allow users to test things. For now, it is a direct copy of the relevant functions from the autobuild-run script. The only changes are: - unneeded import statements are removed; - code/decode wrappers are limited to decode_byte_list; - __main__ handling is added. For now, the only supported arguments are the ones needed for autobuild-run. Follow-up patches will refactor things and also change the way the script is called. In this version, it can be called from the autobuild-run script as: subprocess.call([os.path.join(srcdir, "utils/genrandconfig"), "-i", str(kwargs['instance']), "--toolchains-url", kwargs['toolchains_url']], stdout=log, stderr=log) Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/test-pkg: move minimal.config into a separate fileArnout Vandecappelle2017-07-211-7/+1
| | | | | | | | | This minimal configuration is also very useful outside test-pkg. In addition, it will simplify the config merge in a later patch. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Cc: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* utils/scanpypi: include LICENSE.RST to supported license filesAlexey Roslyakov2017-07-201-2/+2
| | | | | | Signed-off-by: Alexey Roslyakov <alexey.roslyakov@gmail.com> Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* utils/scanpypi: don't pass any arguments to main()Alexey Roslyakov2017-07-201-2/+2
| | | | | | | | | | | | 'if __name__ == "__main__"' idiom typically calls main function that doesn't take any arguments in most cases. We shouldn't pass any tuple to it. I've tested the script with python-idna-2.5 and now it works with this little change. Signed-off-by: Alexey Roslyakov <alexey.roslyakov@gmail.com> Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* utils/brmake: print the error code of the buildYann E. MORIN2017-07-051-1/+6
| | | | | | | | | | | | Since the stdout and stderr streams are redirected, it is not immediately obvious when a build failed, even though brmake really exits with the same error code as make did. When there is an error, print the exit code after the elapsed time. Reported-by: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/check-package: don't check filenames of hashesYann E. MORIN2017-07-031-16/+0
| | | | | | | | | | | | | | | | | | | | Currently, we check that the filenames in hash lists do not contain a slash '/' character, because all we are checking so far are the downloaded archives, and we explicitly need the filename to not contain a directory component at all. However, we're soon to also check the hashes of the license files in packages sources, and those license files may be at any arbitrary directory-depth in the packages source tree. [Peter: Remove reference to files with same basename] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Luca Ceresoli <luca@lucaceresoli.net> Cc: Peter Korsgaard <peter@korsgaard.com> Cc: Rahul Bedarkar <rahulbedarkar89@gmail.com> Cc: Ricardo Martincoski <ricardo.martincoski@gmail.com> Acked-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* utils/readme.txt: fix typos for size-stats-compareThomas De Schampheleire2017-07-021-3/+3
| | | | | | | | | A few typos sneaked into the new utils readme... Additionally, I formulated the list of use cases a bit differently. Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* get-developers: fix handling of syntax errorArnout Vandecappelle2017-07-011-0/+1
| | | | | | | | When getdeveloperlib.parse_developers doesn't find anything, the script tries sys.exit(1) but sys is not imported. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* scancpan: update old reference to support/scriptsArnout Vandecappelle2017-07-011-1/+1
| | | | | | | | | | scancpan's help text refers to its location, so update it after the move to utils/. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Cc: "Yann E. MORIN" <yann.morin.1998@free.fr> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* tools: rename to 'utils'Thomas Petazzoni2017-07-0117-0/+2979
After some discussion, we found out that "tools" has the four first letters identical to the "toolchain" subfolder, which makes it a bit unpractical with tab-completion. So, this commit renames "tools" to "utils", which is more tab-completion-friendly. This has been discussed with Arnout and Yann. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
OpenPOWER on IntegriCloud