summaryrefslogtreecommitdiff
path: root/cbuildbot/cbuildbot_run_unittest.py
AgeCommit message (Collapse)Author
2015-05-29config_lib: Remove simple cbuildbot_config references.Don Garrett
This CL gets rid of all cbuildbot_config references, other than those related to GetConfig, and OverrideConfigForTrybot. It also removes most symbols from cbuildbot_config to prove they aren't being used. BUG=chromium:483566 TEST=cbuildbot/run_tests Change-Id: Id289d1aad190d865cd4c609c5550a64f9dfdd463 Reviewed-on: https://chromium-review.googlesource.com/273913 Trybot-Ready: Don Garrett <dgarrett@chromium.org> Tested-by: Don Garrett <dgarrett@chromium.org> Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org> Commit-Queue: Don Garrett <dgarrett@chromium.org>
2015-05-07cbuildbot_config: Stop exporting 'config'.Don Garrett
Stop exporting the variable 'config' from cbuildbot_config and instead export 'GetConfig()'. Instead of giving every script access to the global variable 'config', export via a function. This is to simplify upcoming changes that may need to load the config dynamically, or handle not having one. TEST=cbuildbot/run_tests && cros lint *.py BUG=chromium:483566 CQ-DEPEND=CL:269775 Change-Id: Ifaa33a597907cfc18a7e5e99c218609e26eed683 Reviewed-on: https://chromium-review.googlesource.com/269770 Reviewed-by: Don Garrett <dgarrett@chromium.org> Commit-Queue: Don Garrett <dgarrett@chromium.org> Tested-by: Don Garrett <dgarrett@chromium.org>
2015-05-05cbuidlbot_config: Rename _config -> BuildConfig.Don Garrett
The _config class is used in a number of unittests so officially export it. Also makes it generally easier to search for. TEST=cbuildbot/run_tests && cros lint *.py BUG=chromium:483566 Change-Id: Ia5a921ff53ab3397927e19cd33de69970f88f1c9 Reviewed-on: https://chromium-review.googlesource.com/268915 Reviewed-by: Mike Frysinger <vapier@chromium.org> Tested-by: Don Garrett <dgarrett@chromium.org> Commit-Queue: Don Garrett <dgarrett@chromium.org>
2015-04-14cbuildbot: allow builders to control the version informationMike Frysinger
Currently, the version of a build is hardcoded to looking it up in the chromiumos-overlay/chromeos/config/chromeos_version.sh file. If we try to build something that lacks that overlay, then everything explodes. Here we pull the storage out of the main cbuildbot _BuilderRunBase obj and store it entirely in the run attributes. The base Builder grows a SetVersionInfo which takes care of syncing the version info (via Builder.GetVersionInfo) back into the run attributes. Each builder class then must implement GetVersionInfo, but we add a default one to SimpleBuilder that behaves like today -- it pulls from the overlay. The overall interface otherwise is unchanged -- anything that wants the version info talks directly to the main builder object. BUG=brillo:134, chromium:299943 TEST=`./cbuildbot/run_tests` passes TEST=`cbuildbot link-{release,firmware}` passes Change-Id: Ibebfda96aa4af4944158cccf53949b35abcd8648 Reviewed-on: https://chromium-review.googlesource.com/264250 Tested-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> Commit-Queue: Mike Frysinger <vapier@chromium.org>
2015-02-07lint: fix various lint warningsMike Frysinger
Newer pylint warns about redundant assert helpers. Use the standard fail() helper instead when we want to always trigger a failure. Also fix up a few things that have slipped in. BUG=None TEST=`cros lint` doesn't warn TEST=`./cbuildbot/run_tests` passes Change-Id: I4e7ecb383dd97bce06c4194a14683a34ab3693bc Reviewed-on: https://chromium-review.googlesource.com/246350 Reviewed-by: Aviv Keshet <akeshet@chromium.org> Commit-Queue: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org>
2015-01-21unittests: cut over to the new wrapperMike Frysinger
Now that we have a wrapper to deal with the namespace munging, we can clean up all our unittests. This means: - add a wrapper symlink for all the unittests - drop the +x bits on the direct .py file - drop the shebang on the direct .py file - delete the manual sys.path munging - move the mock import to the common system import path - delete unused os/sys imports - delete most manual calls to cros_test_lib.main - add a main() for the few complicated cros_test_lib.main calls BUG=chromium:219660 TEST=ran all the unittests Change-Id: I85614c301e48c86a0ca4201c2b60349d2d488e52 Reviewed-on: https://chromium-review.googlesource.com/233832 Reviewed-by: David James <davidjames@chromium.org> Reviewed-by: Don Garrett <dgarrett@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org> Commit-Queue: Mike Frysinger <vapier@chromium.org>
2014-11-20lint: silence assigning-non-slot in a few casesMike Frysinger
In general this warning is useful, but in a few cases in our code, the linter can't figure out the right answer. Silence it until upstream can fix the issue. BUG=chromium:431514 TEST=`cros lint` no longer complains Change-Id: Iae22d2859c093e1d2bbdd1575cf505d1da689356 Reviewed-on: https://chromium-review.googlesource.com/230784 Reviewed-by: Don Garrett <dgarrett@chromium.org> Commit-Queue: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org>
2014-09-18convert to print_functionMike Frysinger
BUG=chromium:414895 TEST=`./cbuildbot/run_tests` passes TEST=`cros lint` passes (it complains if print is used incorrectly) TEST=`cbuildbot chromiumos-sdk` passes TEST=`cbuildbot lumpy-release` passes Change-Id: I67e7e1290b03a16525e0c2b1afa74ebbd8d3508f Reviewed-on: https://chromium-review.googlesource.com/218572 Reviewed-by: David James <davidjames@chromium.org> Reviewed-by: Yu-Ju Hong <yjhong@chromium.org> Commit-Queue: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org>
2014-09-17standardize file styleMike Frysinger
Minor fixups: - don't use shebangs on non-executable files - drop +x from files that don't need it - fix blank line spacing - fix typos in a few module docstrings BUG=chromium:414895 TEST=`./cbuildbot/run_tests` passes Change-Id: Idbce70b406254fbfcd5efa4beff2b1d5aa058d11 Reviewed-on: https://chromium-review.googlesource.com/218571 Reviewed-by: David James <davidjames@chromium.org> Commit-Queue: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org>
2014-07-31Use correct run object to look for parallel attribute.David James
Currently we use lookup whether a board was successful on the wrong run object, causing us to always mark boards as failed on grouped builders. Fix this, and add a check to make sure that this failure is caught earlier in the future. BUG=chromium:398505 TEST=All unit tests. Change-Id: Id72090d053d42502ef7fd4b9d6805d2f3236fadb Reviewed-on: https://chromium-review.googlesource.com/210540 Reviewed-by: Yu-Ju Hong <yjhong@chromium.org> Tested-by: David James <davidjames@chromium.org> Commit-Queue: David James <davidjames@chromium.org>
2014-06-05Rename more cbuildbot_* modules.David James
- Rename cbuildbot_archive -> archive_lib. - Rename cbuildbot_metadata -> metadata_lib. BUG=none TEST=All unit tests. TEST=Full release trybot run. TEST=Paladin trybot run. Change-Id: If4e4a6307e38e4e83b7cd4ec3f502d45cac25e2d Reviewed-on: https://chromium-review.googlesource.com/202629 Reviewed-by: Don Garrett <dgarrett@chromium.org> Tested-by: David James <davidjames@chromium.org> Commit-Queue: David James <davidjames@chromium.org>
2014-05-26Rename chromite.buildbot -> chromite.cbuildbot.Don Garrett
The cbuildbot script lives in a directory named buildbot. Which is a bit confusing. BUG=chromium:373277 TEST=Unitests + cros lint. CQ-DEPEND=CL:200157 CQ-DEPEND=CL:200165 CQ-DEPEND=CL:200149 CQ-DEPEND=CL:*163598 CQ-DEPEND=CL:*163760 CQ-DEPEND=CL:*163786 Change-Id: Ia5953a4506e8b47d27e1a6908ecb938a439da8c2 Reviewed-on: https://chromium-review.googlesource.com/199664 Reviewed-by: Don Garrett <dgarrett@chromium.org> Commit-Queue: Don Garrett <dgarrett@chromium.org> Tested-by: Don Garrett <dgarrett@chromium.org>