summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Add Makefile for running periodically via systemdSimon Hausmann2019-10-211-0/+11
| | | | | | | This is pretty plain right now, but gets the job done Change-Id: I21bea3c065575f4c40ce2a29818a4e49fbaee366 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Add an option to reset the module update stateSimon Hausmann2019-10-211-0/+7
| | | | | | | | This is useful when finding bugs in the updater and wanting to start from scratch Change-Id: I7d17d09f9dfd75d78c8f816ab0e5505ab20ba9a6 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Aapo Keskimolo <aapo.keskimolo@qt.io>
* Change state storage mechanismSimon Hausmann2019-10-214-8/+142
| | | | | | | | | | Store the module update batch state in refs/personal/<user>/state/<branch> in gerrit instead of in a local file. That allows running the bot manually and interact well with an automated run. Change-Id: I10cf43e1c77bc5568c0cdb99c8fabd6fc4bd2f64 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Fix re-trying of updatesSimon Hausmann2019-10-161-1/+2
| | | | | | | | The gerrit status can be "open" but more likely "new", and we have to keep the update pending. Change-Id: I186d2c88daff727abfbeb9f332267a98cbb45acf Reviewed-by: Aapo Keskimolo <aapo.keskimolo@qt.io>
* Handle err in all instancesFrederik Gladhorn2019-10-161-0/+1
| | | | | | | | | While it's not important in the test, it makes sense to make sure all variables are used everywhere to make staticcheck happy. In the Coin code we had issues with shadowed error variables, so now I'm paranoid. Change-Id: Ia5d32375b7659e048fbcd3fbebcbd6323c16123c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Update copyright yearSimon Hausmann2019-10-1510-10/+10
| | | | | | Change-Id: I80f7e5bc5964c00afb85c63ee7bd628295b2c6be Reviewed-by: Aapo Keskimolo <aapo.keskimolo@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Don't let flakey integrations restart the entire processSimon Hausmann2019-10-151-6/+14
| | | | | | | | The reality is that we have flakey tests :(, so try up to three times to push an update. Change-Id: I5af5b8f4854076eca6e31ac7c7d3fdd4f09cdffa Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Aapo Keskimolo <aapo.keskimolo@qt.io>
* Make it possible to create new git indicesSimon Hausmann2019-10-152-0/+40
| | | | | | | | | The API allows for creating brand new index/tree objects, but the implementation didn't take into account that git update-index expects the file to be non-existent instead of being zero-sized. Change-Id: I4b380154626d037da62bf05a90b62d61bc92f8ee Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Fix leaking git index file when posting qt5 updatesSimon Hausmann2019-10-151-0/+1
| | | | | | | We need to remove the temporary git index file used to create the qt5 commit when we're done. Change-Id: I83e00112cd5abf289f516c1cb1b915e61ecfe463 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Fix updating qtrepotools/qtqa in qt5 updatesSimon Hausmann2019-10-151-7/+1
| | | | | | | | Instead of ignoring these, add them to the "done" list right away. That way they show up in the list of modules to update in qt5.git. Change-Id: I31f02bd263d591589f6434d760f28fb73584e7bd Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Allow running the module updater over multiple branchesSimon Hausmann2019-10-144-2/+111
| | | | | | | This will make it easier to run the updater as a bot in the future. Change-Id: If9944225d7d245719f198b29935e71fb9713db76 Reviewed-by: Aapo Keskimolo <aapo.keskimolo@qt.io>
* Simplify main: Move more of the batch iteration code into a separate helper ↵Simon Hausmann2019-10-142-38/+50
| | | | | | | function Change-Id: Iff5416c32259dd1d7ec54834748bfdc3e018a41f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Clean up gerrit interaction optionsSimon Hausmann2019-10-144-21/+26
| | | | | | | | Collect the parameters in a struct to reduce the amount of parameters to pass through. This is done also in preparation for making the code easier when dealing with multiple batches. Change-Id: I3bbe99286b8cf14f9f948bc27c95664d4959db08 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Streamline product fetch ref handlingSimon Hausmann2019-10-142-7/+9
| | | | | | | Make the product ref a property of the module update batch. This makes it easier to later configure the update from a config file. Change-Id: I5642adf05b62f759e21c4c1029cd8e86f777ccbf Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Fix running the bot when a pending change is still integratingSimon Hausmann2019-10-043-12/+16
| | | | | | | | | Before trying to create a new change, we query for an existing change that's open. It may happen that that change is in integrating state, in which case we should put the module back on the todo shelve instead of aborting with an error. Change-Id: Ifd7141bca9dcae486f7e9b3d921343bbb9503757 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix re-running the bot when dependencies were changed manuallySimon Hausmann2019-10-041-0/+2
| | | | | | | | | | It may happen that a dependencies update was merged by hand, in which case the script should catch up with reality and see that the update isn't necessary. This happens automatically when the yaml file in the repo is identical with what the bot proposes. That however in turn requires us to make sure that we're up-to-date, so refresh the module tip before doing so. Change-Id: I352eba235440ab0ed38bafa9f07b07be8aed0472 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix linter warningSimon Hausmann2019-10-041-3/+3
| | | | | Change-Id: I1164c8566612e8b7f5d95aff6218ea2b7fc21437 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix staging/approvalSimon Hausmann2019-10-024-15/+22
| | | | | | | | | | As the update bot's account does not have approver rights, do not use it to attempt to review and stage the pushed changes, that doesn't work. This is also how coin's propose-supermodule-update command behaves. Change-Id: I126429c2019165159e825f1e0321b5c3bdb12fa0 Reviewed-by: Aapo Keskimolo <aapo.keskimolo@qt.io>
* Update .gitignoreSimon Hausmann2019-10-021-0/+1
| | | | | | | Add the bot key. Change-Id: I50b9261d2eec1c3496a57e0dddb5633d909395c8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix removal of state json file when the batch update is doneSimon Hausmann2019-09-292-2/+6
| | | | | | | The file is not called state.json anymore :) Change-Id: I84a59430951c3103df8103ded0f71e88c66b4109 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Improve debug output when checking module statusSimon Hausmann2019-09-291-0/+6
| | | | | | | This is only visible when running in -verbose mode Change-Id: Ieb572f745684a61c98580f4358ce92545cafbb62 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Clean up dependencies.yaml generationSimon Hausmann2019-09-292-18/+24
| | | | | | | | Centralize the conversion to the yaml string, as suggested by Aapo. Change-Id: I22f3738686f4c5bc88a1299f023f7816ed5d4763 Reviewed-by: Aapo Keskimolo <aapo.keskimolo@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Simplify ssh key setupSimon Hausmann2019-09-292-34/+9
| | | | | | | | Use GIT_SSH_COMMAND instead of a wrapper script, as suggested by Aapo. Change-Id: I4a6bffdef4aca0795a35853554ef4a2bfbc25f77 Reviewed-by: Aapo Keskimolo <aapo.keskimolo@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Clean up manual stage handingSimon Hausmann2019-09-293-12/+28
| | | | | | | | Separate pushing the change to Gerrit from approval and staging, as suggested by Aapo. Change-Id: I6d4c8f620c3df4503005baaf9fb2b5fac45076e6 Reviewed-by: Aapo Keskimolo <aapo.keskimolo@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Fix linter warningSimon Hausmann2019-09-292-3/+3
| | | | | | | | There is no need to export the summary printing function. Change-Id: I7d585983112700ecebd4355d9464418b7281afe5 Reviewed-by: Aapo Keskimolo <aapo.keskimolo@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Avoid approval when passing -manual-stageSimon Hausmann2019-09-291-2/+4
| | | | | | | | | The operation might fail, which should not stop us from completing the updates. Change-Id: I86816929558c91d0e8953512936e5b4b0c51d65b Reviewed-by: Aapo Keskimolo <aapo.keskimolo@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Initial import of Qt Module Updater toolSimon Hausmann2019-09-2615-0/+2202
| | | | | | | | This tool serves the purpose of updating the dependencies.yaml files in repositories. Change-Id: I9b428566a4a29eda3ceecc68accfa04bd98d66cb Reviewed-by: Aapo Keskimolo <aapo.keskimolo@qt.io>
* createchangelog: update bug tracker and documentation URLsAntti Kokko2019-02-221-4/+4
| | | | | Change-Id: I3106372c3a258d2f6bbc0924a8a376e3bbbaeaef Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* createchangelog: fetch bug summaries from JiraShawn Rutledge2019-02-211-1/+11
| | | | | | | | | | This is only to provide more context for bug-fix patches that do not have ChangeLog entries. These generally require rewriting in the changelog anyway, but more context makes it easier. Change-Id: Ib5141e66720bcce5e0c65d23be9a7e0ad6da547c Reviewed-by: Sergio Ahumada <sahumada@texla.cl> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add missing go module file so that this is easier to buildSimon Hausmann2019-02-213-10/+12
| | | | | Change-Id: Ib8c231adaf560352d49b4f0f248c3a8918f24754 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* createchangelog: print errors to stderrShawn Rutledge2019-01-291-1/+1
| | | | | | Change-Id: Ib3309ca1ba24e13890796a0306a024e642ace3a7 Reviewed-by: Sergio Ahumada <sahumada@texla.cl> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* createchangelog: log all bug fixes without ChangeLog entriesShawn Rutledge2019-01-141-0/+48
| | | | | | | | These are separate, and are not repeated in case there _is_ a ChangeLog. It's a manual task to distribute them into the appropriate sections afterwards. Change-Id: I8446f7ca3607ef30636be1cba20b5027ea236cf9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* createchangelog: handle Fixes as well as Task-numberShawn Rutledge2019-01-141-3/+4
| | | | | Change-Id: I768d041b646e1818729d94a095001ce764a56507 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* createchangelog: use a simpler regex for .qmake.conf versionShawn Rutledge2019-01-141-1/+1
| | | | | | | | | The raw regex from hashicorp/go-version doesn't seem to work for some reason, even though that lib can still parse the version number after it's been extracted. Change-Id: Ib7b5d084e553987e0d7d35bb56c763ea31a8de0e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Added benchmark runnerSimon Hausmann2016-07-116-10/+286
| | | | | Change-Id: I2d99dc094ed65ad73a47dae48a35ca709788c061 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Fix benchmark result separation for table driven testsSimon Hausmann2016-05-101-4/+6
| | | | | | | | The for loop iterating over the benchmark results would essentially store the address of the last value -- all entries would point to the same value. Change-Id: I74ea59326a5d03d01037ae24b47b5eb184f0e34c Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Fix formatting of percentage display in the footerSimon Hausmann2016-05-101-0/+1
| | | | | | | | | If the sum of all changes in percent is not an integral number, then the auto-formatting (title'ifying) of for example "16.43%" to "14 43%" looks really odd. Disabling the auto-formatting fixes this as well as the capitalization. Change-Id: I30cc92ac487726579f7667511cfd5d0baa69a7a6 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Fix tag handling in benchmark resultsSimon Hausmann2016-03-211-6/+14
| | | | | | | If we don't respect the tags, we may end up mixing results from different tags. Change-Id: I0bfb9b7d685372e1c2ffbb694c4aae08612705e4 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* qtestcompare: Add handling of zipped archives from benchmarkrunner.Robin Burchell2016-03-211-29/+136
| | | | | Change-Id: I45cc05fb1e4dae2a5a688825501ba59e9567f7a0 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* qtestcompare: Move individual test comparisons into a function.Robin Burchell2016-03-181-18/+21
| | | | | | | In preparation for handling zips from benchmarkrunner. Change-Id: I9916c9cf87d85675074b25fb0b88c75538558f0b Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* qtestcompare: Split imports into internal & external dep sections.Robin Burchell2016-03-181-2/+3
| | | | | Change-Id: If556125fc8c74d683d9ce1927e2a529b37d2efe1 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Added a little READMESimon Hausmann2016-02-261-0/+23
| | | | | Change-Id: Ib8ecbd7183e22bf7ee99629bf80ce3f3da78a5ec Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Add support for task-number extractionSimon Hausmann2016-02-262-0/+28
| | | | | | | Prefix the change log text with the task number if present in the commit message. Change-Id: I01d291e3cace49620e6a681097bfa6fce156e6f7 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Added little helper tool to create an initial changelog template for a moduleSimon Hausmann2016-02-262-0/+512
| | | | | | | | | | | Simply run the binary in the module directory with the correct branch checked out. The tool will peek at .qmake.conf to figure out the current version and run git tag -l to see what the previous version is. The resulting change log requires manual editing, but it is a start. Change-Id: I975c0d7a74fee8cab2ae6f400972c5dbc73ff367 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* qtestcompare: Fix percentages and incorrect direction of verdict.Robin Burchell2016-02-251-6/+6
| | | | | | | | | | | | | Calculated values were: (new - old) / new, which gives us a ratio, but to turn that into a percentage we need to multiply by 100. Also, if we have a negative percentage, there's a reduction (in time or instructions) which is a good thing, not a bad thing -- the calculation was the wrong way around. Change-Id: I56f165cc22c0f530c226ce7a569e79c7818c1a7f Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* qtestcompare: Add handling of callgrind instruction counts.Robin Burchell2016-02-251-31/+60
| | | | | | | | | | | | | | | | To ensure that results make sense, we only compare things that match up: duration vs duration, or instruction count vs instruction count. If data is missing, we still won't attempt to compare, too. Anything that does not make sense will not be compared (but will be printed if present). It may be that instruction count should not be stored/printed as a float: this is a change for another day. Done-with: Simo Fält <simo.falt@theqtcompany.com> Change-Id: Ia35e2339d384f971b76166ba2a19c202c5c5fd92 Reviewed-by: Simo Fält <simo.falt@theqtcompany.com>
* qtestcompare: Add a simple tool to compare benchmark results.Robin Burchell2016-02-251-0/+193
| | | | | Change-Id: Ib823d8ca62f887ef4707df3d342b6eb5951a3170 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Fix importsSimon Hausmann2016-02-184-4/+4
| | | | | | | | The package name has to match the directory name in order to be able to import the functionality as a package. Change-Id: I1652eac57d4ececc6c4383d46df90b772981ee4b Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Initial import of golang bindings for reading and interpreting QTestLib XML ↵Simon Hausmann2016-02-034-0/+802
output This also comes with code for running qtestlib binaries and collecting the output. Change-Id: If8cc5db654721a40ab04bbf2e4ba7a93c71ce8df Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>