Commit Graph

10 Commits

Author SHA1 Message Date
Oliver Smith 74e103d1f2 static code analysis: make it pass flake8 3.5.0
This commit adds two new ignores to the flake8 call:
* W504 line break after binary operator
* W605 invalid escape sequence 'x'

Without these, newer flake8 versions, such as the one shipped by Arch
Linux, don't run through on the code base (which leads to not running
it at all locally, only in CI).

Additional changes:
* Don't give the exception instance of subprocess.CalledProcessError a
  name, so it does not trigger F841
* Dont' advise to run "autopep8" anymore, because that will likely
  touch unrelated code.

For reference, here is the list of error codes:
https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes
2018-07-11 18:58:29 +00:00
Clayton Craft 256914c1a0
Implement support for gitlab CI
This implements support for the gitlab CI system. Wiki, static analysis,
and build tests are implemented.
2018-06-29 23:16:41 -07:00
Oliver Smith ceac21766f
check_checksums.py: Non-zero exit on build error
Fixes #1124.
2018-02-14 00:12:46 +01:00
Oliver Smith 3fe75ddb56
Fix screwed up progress bars in Travis output (#1213)
Right now, they appear on screen when using --details-to-stdout. This
does not work well with Travis CI and screws up the log.

Disabling the progress bars in abuild works just like Alpine does it in
their Travis CI script: Exporting SUDO_APK as
"abuild-apk --no-progress" instead of "abuild-apk".

test_check_checksums.py: Run "pmbootstrap build_init" before building
any packages, so it is a bit less verbose (downloading the APKINDEX
files etc.). Later we run the build init code again (because we use
--strict while building the packages), but then the APKINDEX files
are already present. So overall the log is a bit shorter before the
building starts. (It is still logged to the logfile, which gets
printed on error anyway.)
2018-02-09 18:43:58 +00:00
Oliver Smith 5e85d72ca0
Testsuite: Run UIs in Qemu and check running processes and more (#982)
* Testsuite: Run UIs in Qemu and check running processes (and other changes)

* When `pmbootstrap qemu` gets killed, it now takes down the Qemu process with it
* `test/check_checksums.py` got a new optional `--build` parameter, which makes
  it build all changed packages instead of just checking the checksums
* We run this before running the testsuite now, so all changed packages get
  built before running tests (otherwise tests would hang without any output
  while a changed package is building)
* New testcase, that zaps all chroots, installs a specific UI (xfce4 and
  plasma-mobile currently, easy to extend), runs it via Qemu and checks the
  running processes via SSH.
* Version checking testcase: rewritten to include Alpine's testsuite file in
  our source tree, so we don't need to clone their git repo anymore. Now it
  is enabled for Travis.
* All this gives us a nice 10% code coverage boost
* Increased the `hello-world` pkgrel to verify that the Travis job is working.

* Various fixes
* Build device-packages for the device arch and don't raise an
  exception, but print a note if --ignore-depends is not specified
  and therefore the kernel gets installed, too.
* Don't use --force when building in Travis (because abuild doesn't
  check the checksums then. Bug report on the way.)
* Don't run the building process in the background, but wait for its
  completion
* Exit with 1 when showing usage in check_checksums.py
2018-02-02 00:16:29 +00:00
Martijn Braam d12ca0db86 Fixed checksum on travis for removed packages (#332)
* Add check for removed packages

* Change for testing travis

* Fixed package depth
2017-08-04 14:52:24 +00:00
Martijn Braam 0188dd91a6 Travis checksum pr fix (#308)
* Check the correct branch in PR runs
2017-07-31 17:53:23 +00:00
Pablo Castellano e04797f93c Print "git diff" output when the checksums tests has failed (#306)
In some cases this output is useful to identify the root of the problem.
See https://github.com/postmarketOS/pmbootstrap/pull/303#issuecomment-319017197
2017-07-31 11:55:51 +02:00
Martijn Braam 61f35c080d Fix test script not crashing hard enough in travis (#301)
Made check_checksums.py exit 1 on errors
2017-07-30 21:54:47 +00:00
Martijn Braam c0a70cce3f Implemented checksum test in the travis script (#298)
* Implemented checksum test in the travis script
* Added workaround for squashed forced pushes
* Made test possible to run locally
* Match multiple git versions for the working directory message
2017-07-30 19:43:02 +00:00