aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* tests: use sys-apps/gentoo-functions if availableSam James2022-09-231-9/+16
| | | | | | Gives us nicer looking output. Signed-off-by: Sam James <sam@gentoo.org>
* */*: use portable Bash shebangSam James2022-09-231-1/+1
| | | | | | Useful for Prefix in particular. Signed-off-by: Sam James <sam@gentoo.org>
* tests: fix 'insanity' testsSergei Trofimovich2020-06-201-4/+1
| | | | | | | | commit 8a4854aec042f ("gcc-config: make USE_NATIVE_LINKS=no to clean stale symlinks") dropped warnings around 'insanity' checks. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* gcc-config: install /usr/bin/c{89,99}, take over from toolchain.eclassSergei Trofimovich2020-06-204-0/+0
| | | | | | Reported-by: Kent Fredric Bug: https://bugs.gentoo.org/728722 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* tests: add a test for bug #706318v2.2.1Sergei Trofimovich2020-01-269-0/+15
| | | | | Bug: https://bugs.gentoo.org/706318 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* gcc-config: add basic version sorting supportv2.2Sergei Trofimovich2020-01-123-0/+19
| | | | | | | | | | | | | | | | Before the change gcc version orderig was relying on bash sorting in flob matches, like: cat /etc/env.d/gcc/${CHOST}-* | fgrep LDPATH | tail -n 1 This stopped working with gcc-10, which lexicographically goes before gcc-9. The workaround for now is to normalizeversions to fixed-width and order them lexicographically: gcc-0009 gcc-0010 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Convert binary wrapper to a symlink wrapper.v2.0Sergei Trofimovich2018-08-243-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before the change: /usr/bin/gcc and friends were a copy of /usr/$(libexecdir)/misc/gcc-config After the change: /usr/bin/gcc is a symlink to a real compiler binary. Examples: /usr/${CTARGET}/gcc-bin/${GCC_VER}/gcc (native) /usr/${CHOST}/${CTARGET}/gcc-bin/${GCC_VER}/gcc (cross) gcc-config is a binary wrapper that does (or did) a few things: - [removed in 2011] injects additional CFLAGS_${ABI} Removed in commit 7ac40f3eb8434961f70485247d883f5b3009dcf2 "Stop auto appending CFLAGS_<abi> from the env." - traverses PATH for real compiler binary and reexecutes it. - reads /etc/env.d/05gcc-${CTARGET} as a fallback if PATH is empty. Today binary wrapper does only PATH resolution and re-execution. This change has a few minor benefits: - PATH will not contain explicit /usr/${CHOST}/${CTARGET}/gcc-bin/${GCC_VER} entry. This will make PATH shorter for those who have mavy cross-compilers installed. - compiler switch will not require sourcing '. /etc/profile' as changes are applied as soon an symlink is switched. - ccache will see gcc binary changes directly and react accordingly. Previously in default configuration ccache cache depended on state of /usr/$(libexecdir)/misc/gcc-config See bug #640958 where ccache did not notice USE=-pie -> USE=pie switch. - Reasoning about PATH ordering is straightforward: all available binaries (as symlinks) are in /usr/bin. See bug #255695 where PATH ordering changed and bug #626606 where people get confused on what is in /usr/bin/gcc binary. Bug: https://bugs.gentoo.org/626606 Bug: https://bugs.gentoo.org/255695 Bug: https://bugs.gentoo.org/640958 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* tests: follow rename of 'gcc-config' -> 'wrapper'Sergei Trofimovich2018-08-131-0/+0
| | | | | | | Fix tests to follow commit 39af3214ed29d9a3ca867988f7f2f3b995cafd66 ("rename installed binary wrapper from 'gcc-config' to 'wrapper'") Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* gcc-config: fix tests (drop einfo for LTO plugin)Sergei Trofimovich2018-08-131-2/+0
| | | | | | | | | | Before the change 3 tests failed due to extra output about switching to LTO plugin: * Running rw-multi-native-configs/test.use-old ... due to log difference; see .../TMP-test.use-old-rw-multi-native-configs/test.use-old.log [ !! ] * Running rw-multi-native-configs/test.select-insane ... due to log difference; see .../TMP-test.select-insane-rw-multi-native-configs/test.select-insane.log [ !! ] * Running rw-multi-native-configs/test.select ... due to log difference; see .../TMP-test.select-rw-multi-native-configs/test.select.log [ !! ] Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* tests/run_tests: switch to /lib/gentoo/functions.shSergei Trofimovich2018-08-131-2/+2
| | | | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Ignore whitespace when diffing test results.Ryan Hill2015-05-121-1/+1
| | | | | | | | | | The amount of whitespace output by ebegin/eend from gentoo-functions is dynamic (seems to be dependent on terminal width). Since we can't predict this we have to ignore all whitespace differences. URL: https://bugs.gentoo.org/547586 Reported-by: tka <tka@kamph.org> Signed-off-by: Ryan Hill <rhill@gentoo.org>
* compile gcc-config into .gcc-config so we can test it properlyMike Frysinger2013-01-022-2/+3
| | | | | | | Otherwise, it means we can't sed certain values in a way which we then attempt to test. e.g. EPREFIX. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* gcc-config: use ${SED} everywhereMike Frysinger2012-12-302-0/+3
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* tests: check for trailing whitespaceMike Frysinger2012-12-302-0/+2
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* tests: run in parallelMike Frysinger2012-12-301-19/+41
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* run_test: set RC_NOCOLOR to suppress coloursFabian Groffen2012-12-301-1/+2
| | | | | | | | | | NOCOLOR appears not to work with functions.sh from baselayout-prefix, which is an old copy, prior to 2.0. Not sure if this patch is really worth it, since the output of functions.sh also differs enough to make tests fail. Signed-off-by: Fabian Groffen <grobian@gentoo.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* gcc-config: fix relative ROOT handlingMike Frysinger2012-08-172-1/+17
| | | | | | | | Fix suggested by Greg. URL: https://bugs.gentoo.org/431104 Reported-by: Greg Turner <gmturner007@ameritech.net> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* tests: verify removal of wrappers between diff configsv1.7.2Mike Frysinger2012-05-313-2/+20
| | | | | | | | If we switch from a gcc that supports fortran to one that doesn't, we want to make sure to clean out the old wrappers. Add test cases to verify those paths. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* gcc-config: fix old wrapper removal code pathMike Frysinger2012-05-318-0/+16
| | | | | | | | | While this code path won't fire on a sane setup, we still need it to function on an insane one, so fix the old variable name (which has been broken since it was originally added due to rewrites while it was under initial development) so the stale wrapper actually gets removed. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* gcc-config: fix install of reference progsv1.7.1Mike Frysinger2012-05-134-2/+4
| | | | | | | | | | | The rework to make installation of helpers more automatic lost support for the binaries which gcc doesn't actually install -- namely, the cc and f77 helpers. Rework the code slightly onto the new framework to make adding these easier, and to make the existing ones work again. URL: http://bugs.gentoo.org/238984 Reported-by: Yuta SATOH <nigoro.gentoo@0x100.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* tests: add some!Mike Frysinger2012-03-2173-0/+339
Signed-off-by: Mike Frysinger <vapier@gentoo.org>