Commit Graph

56 Commits

Author SHA1 Message Date
Karel Zak 059ba3dd76 travis: cleanup before autogen
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-04-09 08:02:10 +02:00
Karel Zak 34a58c05a7 travis: use verbose mode (V=1) for make
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-01-25 09:23:16 +01:00
Evgeny Vereshchagin 6c13bfcfed travis: stop building fuzz targets on macOS
Looks like `-fsanitize=fuzzer` isn't supported there:

https://travis-ci.org/github/karelzak/util-linux/jobs/716894984
```
clang: error: unsupported option '-fsanitize=fuzzer' for target 'x86_64-apple-darwin17.7.0'
```
2020-08-11 00:21:27 +00:00
Karel Zak c87cce57d8 Merge branch 'fuzz' of https://github.com/evverx/util-linux
* 'fuzz' of https://github.com/evverx/util-linux:
  tests: pack testcases into zip archives
  tests: integrate test_last_fuzz into the testsuite
  tests: add a fuzzer for process_wtmp_file
  docs: mention OSS-Fuzz and CIFuzz and how to build fuzz targets locally
  tools: make it possible to set all the fuzzing flags with config-gen
  build-system: make "make distcheck" work
  travis: set CXX correctly
  travis: turn on --enable-fuzzing-engine
  build-sys: add support for --enable-fuzzing-engine
  tests: integrate test_mount_fuzz into the testsuite
  tests: take exit codes into account
  tests: add a fuzzer for mnt_table_parse_stream
2020-08-10 14:40:44 +02:00
Evgeny Vereshchagin 67884c75e2 travis: turn off libmount on OSX
Now that the absence of the sscanf modifiers no longer prevents Travis from building libmount
automatically it seems util-linux is failing to compile there with
```
In file included from disk-utils/fsck.c:49:

[1m./libmount/src/libmount.h:32:10: [0m[0;1;31mfatal error: [0m[1m'mntent.h' file not found[0m

[0;1;32m         ^~~~~~~~~~

[0m1 error generated.

make[2]: *** [disk-utils/fsck-fsck.o] Error 1

make[2]: *** Waiting for unfinished jobs....

make[1]: *** [all-recursive] Error 1

make: *** [all] Error 2
```

Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2020-08-06 16:15:31 +00:00
Evgeny Vereshchagin 6056e05b28 travis: set CXX correctly
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2020-08-06 12:33:11 +00:00
Evgeny Vereshchagin c8f78bde3a travis: turn on --enable-fuzzing-engine
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2020-08-06 12:33:11 +00:00
Evgeny Vereshchagin 07919e55b0 travis: integrate util-linux with Coverity Scan
For this to work, a daily cron job running on the master branch
should be added: https://docs.travis-ci.com/user/cron-jobs/

The report can found at https://scan.coverity.com/projects/karelzak-util-linux

Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2020-07-13 19:54:48 +00:00
Karel Zak ff89765a8f travis: don't ask for Ubuntu release on XOS
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-07-08 15:11:17 +02:00
Karel Zak bc270ae1a8 Merge branch 'werror' of https://github.com/evverx/util-linux 2020-07-03 11:34:12 +02:00
Evgeny Vereshchagin 5cda653a7b travis: install llvm-* to get llvm-symbolizer
Backtraces like
```
misc-utils/cal.c:295:4: runtime error: signed integer overflow: 2147483647 + 5 cannot be represented in type 'int'
==1405==WARNING: invalid path to external symbolizer!
==1405==WARNING: Failed to use and restart external symbolizer!
    #0 0x4c4c09  (/home/travis/build/karelzak/util-linux/cal+0x4c4c09)
    #1 0x7f4363046b96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #2 0x41bab9  (/home/travis/build/karelzak/util-linux/cal+0x41bab9)
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior misc-utils/cal.c:295:4 in
```
aren't very helpful

It's follow-up to https://github.com/karelzak/util-linux/pull/1075
2020-07-03 11:18:54 +02:00
Evgeny Vereshchagin 5b9df9c40d travis: turn on UBsan on Travis CI to see how it goes
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-07-03 11:18:32 +02:00
Evgeny Vereshchagin 38c5db359d travis: turn off -Werror on precise and osx
I'm not sure anyone is particularly interested in what the compilers
have to say there.
2020-07-02 10:51:04 +00:00
Evgeny Vereshchagin 7b81644f10 travis: turn on -Werror 2020-07-02 09:49:12 +00:00
Evgeny Vereshchagin e0967c5b39 travis: make it easier to switch to the next clang/gcc
by just changing the compiler option in .travis.yml

In https://travis-ci.org/github/karelzak/util-linux/builds/703664282 I switched
to gcc-9/clang-9 by simply applying the following patch:
```
diff --git a/.travis.yml b/.travis.yml
index ec1284717..12a247d91 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,8 +7,8 @@ git:
   depth: 1500

 compiler:
-  - gcc-10
-  - clang-10
+  - gcc-9
+  - clang-9

 env:
   - MAKE_CHECK="nonroot"
```
2020-06-30 18:11:30 +00:00
Evgeny Vereshchagin d98d498727 travis: switch to clang-10
to prepare the infrastructure for https://github.com/karelzak/util-linux/pull/1068
2020-06-29 14:54:26 +00:00
Evgeny Vereshchagin f99c2464e7 travis: switch to gcc-10
to get around an ASan bug mentioned in https://github.com/karelzak/util-linux/issues/1076
2020-06-29 14:28:42 +00:00
Evgeny Vereshchagin c297ed7533 travis: ignore memory leaks in checkusage
Closes https://github.com/karelzak/util-linux/issues/1077
2020-06-29 12:36:48 +00:00
Evgeny Vereshchagin 852db9d87d travis: install all the "official" build dependencies 2020-06-28 20:14:40 +02:00
Karel Zak 1cb82714ce travis: fix sudo command line
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-12-16 14:29:33 +01:00
Karel Zak 406fb25387 tests: add --parsable, remove TS_OPT_parsable
* don't enable parsable for non-parallel executions in travis
* add --parsable to run.sh
* use --parsable rather than TS_OPT_ in travis

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-10-09 13:04:34 +02:00
Karel Zak 060c4cee0f build-sys: cleanup prefixed used for tests
It's ugly to use the same TS_ prefix in tests as well as in
build-system (e.g. make check), because then some env. variable can be
interpreted by our regression tests. For example TS_PARALLEL=.

It's seems better to use TS_ exclusively for tests and TESTS_ for
build-system.

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-10-09 12:31:28 +02:00
Karel Zak 571f5f5ba1 build-sys: support 'none' for parallel tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-10-09 12:01:57 +02:00
Karel Zak 1740d29cdd travis: force non-parallel for root
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-10-09 11:36:52 +02:00
Karel Zak ac543a15b6 travis: don't call tests in parallel for root
Let's make it more readable in logs for root user.

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-10-09 09:55:27 +02:00
Karel Zak 450016eb72 build-sys: don't use ASAN on XOS
It seems that Apple Clang is not mature enough to use ASAN.

  AddressSanitizer: detect_leaks is not supported on this platform.

Let's disable ASAN on XOS at all.

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-25 10:18:08 +02:00
Karel Zak 7bd44e8ade build-sys: enable ASAN on travis-ci
Addresses: Addresses: https://github.com/systemd/systemd/pull/12252
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-15 13:05:33 +02:00
Ruediger Meier fbba676998 travis: homebrew/dupes was deprecated
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-03-09 09:57:23 +01:00
Ruediger Meier 5917d17f0d travis: use parallel root checks
Also improve CPU count detection for tests.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-03-07 20:49:25 +01:00
Ruediger Meier 277d61b9f4 travis: enable osx root checks
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-03-07 18:31:55 +01:00
Ruediger Meier d1a7c00eae travis: add make checkusage
We will run all built programs with 3 different
options on Linux and OSX.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2017-06-27 08:25:30 +02:00
Ruediger Meier 22174021f8 build-sys: fix chown mistake, add checkusage.sh to the dist
Sorry, don't know why I reverted fad561b0.

But for travis we need it only in check_nonroot().
check_root() *can* do chown and the check_dist() is handled
by Makefile.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2017-06-26 21:00:09 +02:00
Karel Zak 4ccea66996 travis: fix another chown issue
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-06-21 13:41:08 +02:00
Karel Zak 4a679468ca travis: use --disable-makeinstall-chown everywhere
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-06-21 11:51:39 +02:00
Karel Zak a65041b5ae build-sys: make chown usage more robust
* add --disable-makeinstall-chown to travis non-root mode

* use "if MAKEINSTALL_DO_SETUID" for chown root:root

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-06-21 11:12:04 +02:00
Ruediger Meier cf76bbae48 travis: minor cosmetics
This is just to make the diff to my private travis script a bit smaller.

Now we always use $CC _after_ the install script which makes it possible
to install/update the compiler in the install section.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2017-06-15 09:13:14 +02:00
Ruediger Meier 4fb3fe39de tests: check for timeout command
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2017-06-01 11:24:53 +02:00
Ruediger Meier 22edf0a639 Revert "tests: use stdbuf when stderr and stdout is randomly ordered"
stdbuf does not seem to work reliable. Failed on travis/OSX

This reverts commit 398b3148be.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2017-06-01 11:24:00 +02:00
Ruediger Meier 398b3148be tests: use stdbuf when stderr and stdout is randomly ordered
glibc seems to flush stdout before stderr.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2017-06-01 10:28:02 +02:00
Karel Zak 74fe554a41 tests: add --show-diff
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-02-16 14:14:54 +01:00
Ruediger Meier 85d846b88a travis: let OSX auto-skip utmpx tools
It will disable all these programs automatically except wall(1)
which is now non-Linux compatible.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-12-07 12:35:24 +01:00
Karel Zak 91891979f7 build-sys: improve libncursesw5 install for travis
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-10-21 18:48:10 +02:00
Karel Zak 307546ed8b build-sys: fix drone.io builds
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-10-21 13:33:32 +02:00
Ruediger Meier 160eef814a travis: fix OSX, glibtoolize could not find sed
Since a few days travis OSX seems to have a bad libtool package:
$ glibtoolize --version
/usr/local/bin/glibtoolize: line 406: /usr/local/Library/ENV/4.3/sed: No such file or directory

Exporting SED is a simple fix. Otherwise we could have also re-installed libtool:
  brew uninstall libtool
  brew install libtool

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-08-11 18:04:00 +02:00
Ruediger Meier c3f323cb2c tests: don't depend on GNU md5sum
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-04-13 12:29:16 +02:00
Karel Zak 83a77afb31 travis: let's ignore apt-get return code
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-14 17:01:25 +01:00
Ruediger Meier 668d6d2ef9 travis: add OSX build
Of course OSX is not an important target but since it's available on
travis we can (mis)use it to generally improve non-Linux and non-GNU
compatibility. People are using musl, busybox or whatever and
util-linux should work for them. Having OSX build running regularly
will help us to freeze the lately improved BSD compatibility and
to check code which is usually ifdef'ed.

We are using the most recent OSX 10.11.x / Xcode 7.3 though the older
travis OSX images are working too currently.

If it turns out that this OSX build is too annoying when we are about
to add support for latest Linux features then we could add:
  allow_failures:
    - os: osx
to let it fail silently.

Note I've tried hard to keep .travis-functions.sh readable for the
Linux case. I've removed --with-python because it's default anyway,
--enable-gtk-doc is still tested in discheck.

OSX root check would also work (almost, using another --prefix) but
would only run one more test yet (minix).

OSX distcheck would have some issues with conditionally built man
pages and does not work with default distcheck confopts. No need to
fix that because distcheck is more for maintainer machines.

BTW to increase travis build speed again we could remove some targets
from the matrix without losing tested scenarios:
 - nonroot for Linux seems to be waste of time
 - clang/Linux could be root check only
For now we keep it as is.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-13 21:51:18 +01:00
Ruediger Meier fc412fe4ce travis: switch to Ubuntu 14.04 Trusty
Now we have a reasonable recent build system with systemd, etc. We still
keep old Ubuntu 12.04 Precise to check backward compatibility but
remove the hack to install socat.

Note the new env variable PRECISE="yes" is only there to see it on travis
website.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-13 21:48:21 +01:00
Ruediger Meier 855f7f0650 tests: add option --parsable
This is to force the one-line results also for non-parallel case.
We are using it for travis auto-build and on other build farms.

Moreover you can set this (and any other) option globally by env
which is the only way to pass it to make distcheck.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-05 22:19:24 +01:00
Ruediger Meier 1091e83e84 travis: minor cleanup
- print env for debugging
 - remove unused builddir stuff
 - avoid non-portable find/xargs usage

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-02-18 12:53:03 +01:00