Move some stuff formerly in `Library/ENV` around:
- Move `Library/ENV/$XCODE_VERSION` to `Library/Homebrew/env/super` as they are
all superenv wrappers and all symlinks to the same version. We never needed
the "separate shims for separate versions" functionality and it just adds
confusion.
- Move `Library/ENV/pkgconfig` to `Library/Homebrew/env/pkgconfig` to get more
things under `Library/Homebrew`
- Move `Library/ENV/scm` to `Library/scm` as these wrappers are not actually
used by or related to superenv (or stdenv) in any way.
* test-bot: start running generic tests.
Start running the test suite in the "generic" mode i.e. a base layer for
non-OS X platforms to be able to use to ensure we don't break the generic code
for the parts of the code we've got running.
Currently this just runs the integration tests as that's the only useful suite
that's entirely passing but eventually this will be changed to run the full test
suite in generic mode.
* test_integration_cmds: fix tests on Linux.
Fix minor regression in b55250c44eacd49646407b26a73753965d4d36d0. The
bottle is placed in the current working directory, is unaffected by the
the single teardown introduced in #475, and thus needs manual handling.
Closes#483.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
Test was added in 61614d35294c8faffaeb5c7f0ec6dea78dbbc30f, but never
had any effect because it was replaced by a method of the same name a
few lines further down.
* readall: move readall logic to new class.
* tap: run readall when tapping.
This will prevent tapping an tap with syntax errors from causing issues
for users.
Fixes#58.
Instead of writing a custom ensure for every test let's just nuke
all the files every time. This may be something we might want to use for
other unit tests too. It leans heavily on the fact that a
`FileUtils.rm_rf` on files that don't exist is very quick and things
like `brew cleanup` are super slow in comparison.
Before:
```
$ brew tests --only=integration_cmds --official-cmd-taps
Finished in 49.764724s, 1.0047 runs/s, 5.2648 assertions/s.
```
After:
```
$ brew tests --only=integration_cmds --official-cmd-taps
Finished in 43.014769s, 1.1624 runs/s, 5.8352 assertions/s.
```
Beta versions of XQuartz have address sanitization enabled, which
breaks some software at runtime, including wine.
Closes Homebrew/homebrew-core#2481.
Closes#459.
Signed-off-by: Misty De Meo <mistydemeo@github.com>
Rearrange path constants such that persistent paths (that point into the
Homebrew code base) are in one spot and all other paths (that are being
redirected to a temporary location for the duration of the test run) are
grouped together.
Closes#440.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
Prior to the fix, every run of the test suite would leave behind a pair
of empty directories in `$TMPDIR`. (A temporary home directory was
created but only its child `Applications` was wiped when done.)
This reverts commit 252c701c59227c385ef6178fe99523cca8c843bb.
Taps installed prior to running the test suite are not visible to the
test suite as most Homebrew paths are redefined as to not mess up the
local installation.
All of these taps use Homebrew internal APIs (or will shortly) and we
autoinstall them all from `brew $CMD`. We should adjust our CI to ensure
that we never accidentally break these taps when making changes to core
code so that these taps can rely more on this core code rather than
having to e.g. vendor equivalent code that never changes on our end.
Move dylib_path and bundle_path from test_mach to testing_env to
accommodate the new tests.
Closes#400.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
Add SharedEnvExtension#gcc_with_cxx11_support? to centralise the
logic for checking whether a compiler is known to support C++11.
Update logic to accept GCC 4.8 and above (including 6). Thereby also
address oversight in #163 where support for GCC 6 was added without
updating the C++11 compiler whitelist.
Add tests for Superenv#cxx11.
Closes#346.
Problems fixed:
- Broken and leaking test if run as part of `brew tests --coverage` due
to the `cmd` call being nested in the `Pathname#cd` block.
- Output during `git clone` operation because of a missing `shutup do`.
- Still incomplete coverage for `cmd/log.rb` because `brew log` is
invoked on the formula in the origin instead of the shallow clone.
- Minor stylistic fixes:
- Superfluous parentheses around `core_tap.path.dirname`.
- Overly long lines.
Simply drop because the `require`s are not actually used by the tests
and no file from `compat/` should be loaded unconditionally. (This can
otherwise lead to incorrect results for `brew tests --no-compat`.)
Since #292, HOMEBREW_CACHE was moved to a per-user directory. This makes
it unsuitable to store global lock files on multiple users environment.
Therefore, introducing a global lock directory `/Library/Lock.d` to
store lock files from formula lockers as well as `brew update`.
Amends e4d0187120e61bc80d31ebecc3b38f0740b20bb5. The `require` was
accidentally omitted causing the tests to fail very sporadically (or
always, when invoked as `brew tests --only=integration_cmds`).