1899 Commits

Author SHA1 Message Date
Xu Cheng
2496bdf280 remove update-ruby
Closes Homebrew/homebrew#49523.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-02-25 23:05:39 +08:00
Xu Cheng
79a01a47cc test_update_report: fix test
Closes Homebrew/homebrew#48546.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-02-25 17:22:28 +08:00
Xu Cheng
87ecd621eb add Tap#tap_migrations
This enables tap migration feature in per tap case, which will
ultimately help core/formula separation.
2016-02-25 17:22:28 +08:00
Baptiste Fontaine
1208e26c74 audit: a couple more tests
Closes Homebrew/homebrew#49404.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-02-22 12:31:51 +01:00
Baptiste Fontaine
bb37aa2824 go: warn about no-op stage_deps calls
Closes Homebrew/homebrew#49389.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-02-21 21:21:23 +01:00
Dominyk Tiller
e00375e381 test_pathname: add append_lines tests
Closes Homebrew/homebrew#49233.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-02-21 04:22:23 +00:00
Alex Dunn
f15532452e version: correctly parse codeload URLs
Needed for Homebrew/homebrew#49346.

Closes Homebrew/homebrew#49354.

Signed-off-by: Alex Dunn <dunn.alex@gmail.com>
2016-02-19 17:36:42 -08:00
Martin Afanasjew
f8a86e5962 tests: add groups and project name to coverage
Groups make it easier to get an overview of the coverage without having
to scan through a single very long list of files. They also display a
possibly helpful per-group coverage.

The project name is normally derived from the `root` directory which
happens to be `Library` in our case, thus make it explicitly `Homebrew`.

Closes Homebrew/homebrew#49303.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-02-18 21:54:14 +01:00
Mike McQuaid
26ec9f9ea0 formula: add new pour_bottle DSL with reason.
This allows there to be a user-visible description of why a bottle is
not being installed.
2016-02-18 10:21:20 +00:00
Baptiste Fontaine
4c5aee7a56 version: fix GitHub releases URLs parsing
The current code doesn't work with releases that have more than one
digit in the third group, i.e.:

  .../releases/download/1.2.3/...  works
  .../releases/download/1.2.34/... doesn't work

Closes Homebrew/homebrew#49255.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-02-17 13:23:26 +01:00
Xu Cheng
4e51c0b8ea add Tap#formula_file?
Return true if given path would present a Formula file in this Tap.
Accepts both absolute path and relative path (relative to this Tap's path)

It offer an abstraction such that caller would not need to worry about
low level file system in the tap.

It will be used in `brew pull` and `brew update`.

Closes Homebrew/homebrew#49191.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-02-16 14:23:39 +08:00
Mike McQuaid
775c4eedd7 Promote update-bash to the default updater.
Also, rename the existing updater to `update-ruby` to allow using as
a fallback. It will eventually be removed.

Closes Homebrew/homebrew#49109.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-02-15 08:54:03 +00:00
Baptiste Fontaine
0386f33222 tests: Add missing version tests
Closes Homebrew/homebrew#49031.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-02-10 18:47:00 +01:00
Xu Cheng
e5b6f79b22 bottle: do not follow symlink when setting mtime
Also set atime to mtime, which seems to be a more common practice.

Fixes Homebrew/homebrew#49007

Closes Homebrew/homebrew#49027.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-02-10 21:01:12 +08:00
Misty De Meo
7b81066038 Audit: Regexp.escape formula names
We allow certain special regex characters in formula names, and if
those aren't escaped when interpolating them into a regex, they'll be
interpreted as special regex characters.

This can cause regex compile errors on Ruby 1.8 (for example, with
"libxml++3", which has nested match characters), and more subtle
matching bugs in general.

Refs an issue surfaced in Homebrew/homebrew#48744.

Closes Homebrew/homebrew#49005.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2016-02-09 15:33:38 -08:00
Baptiste Fontaine
eba429d947 tests: add leaves & prune integration tests
Closes Homebrew/homebrew#48943.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-02-07 13:30:40 +01:00
Baptiste Fontaine
570345d1a0 tests: cleanup test bottle 2016-02-07 13:30:40 +01:00
Baptiste Fontaine
115e6b49bc tests: monkey-patch exec to get coverage reports
Closes Homebrew/homebrew#48923.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-02-07 11:52:26 +01:00
Baptiste Fontaine
4ce99fa010 tests: remove unnecessary cd 2016-02-07 11:52:25 +01:00
Xu Cheng
f57950404b more test for dependency_expansion
Closes Homebrew/homebrew#48904.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-02-07 14:58:05 +08:00
Baptiste Fontaine
268fa841de tests: fix simplecov handling in integration tests
Closes Homebrew/homebrew#48250.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-02-06 14:20:58 +01:00
Baptiste Fontaine
aec4e0723a tests: track all files 2016-02-06 14:20:57 +01:00
Baptiste Fontaine
abf81f9845 tests: use our patched simplecov, bump coveralls
We must bump coveralls otherwise we get a conflicting dependency: we use
a patched simplecov v0.11.1 but coveralls 0.8.9 needs simplecov 0.10.x.
2016-02-06 14:20:57 +01:00
Baptiste Fontaine
d45467172d tests: enforce min. 40% coverage 2016-02-06 14:20:57 +01:00
Baptiste Fontaine
2cf5ceaa20 tests: don't use Coveralls outside of CI 2016-02-06 14:20:57 +01:00
Xu Cheng
12a452557d make HOMEBREW_BREW_FILE a Pathname object
Currently HOMEBREW_BREW_FILE is a String, while other of HOMEBREW_*
variables are all Pathname. This commit unifies them all as Pathname,
so it will not cause any confusion.

Closes Homebrew/homebrew#48872.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-02-06 02:52:48 +08:00
ilovezfs
fb9818ae8c HOMEBREW_BREW_FILE was unset for the tests
This fixes a regression introduced by 3f6a355, which caused
HOMEBREW_BREW_FILE to be unset while running the tests.

Patch provided by Xu Cheng.
2016-02-05 21:52:11 +08:00
ilovezfs
37e423ebb2 os/mac/hardware: add Skylake CPU.
Closes Homebrew/homebrew#48781.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-02-03 21:10:01 +00:00
ilovezfs
051cd36046 test_integration_cmds: fix warning.
Closes Homebrew/homebrew#48772.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-02-03 21:09:12 +00:00
Baptiste Fontaine
bdf0e0ef4d tests: remove the problematic test-bot test
It makes Travis checks fail on the master.
2016-02-03 18:11:29 +01:00
Baptiste Fontaine
299419a881 tests: more integration tests
Closes Homebrew/homebrew#48785.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-02-03 16:28:28 +01:00
Baptiste Fontaine
6cccc2d0fe tests: remove unnecessary code 2016-02-03 16:28:28 +01:00
Baptiste Fontaine
abf75cd08f tests: add audit regression test for Homebrew/homebrew#48744
Closes Homebrew/homebrew#48748.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-02-03 14:04:31 +01:00
ilovezfs
cc3d041c26 DSL method "apply" to specify patch files
The "apply" DSL method can be called from patch-do blocks to specify
the paths within an archive of the desired patch files, which will be
applied in the order in which they were supplied to the "apply" calls.
If "apply" isn't used, raise an error whenever the extracted directory
doesn't contain exactly one file.

The "apply" method can be called zero or more times within a patch-do
block with the following syntaxes supported:

    apply "single_apply"
    apply "multiple_apply_1", "multiple_apply_2"
    apply [array_of_apply]

If apply must be used, a single call using the second syntax above is
usually best practice. Each apply leaf should be the relative path to a
specific patch file in the extracted directory.

For example, if extracting this-v123-patches.tar.gz gives you

    this-123
    this-123/.DS_Store
    this-123/LICENSE.txt
    this-123/patches
    this-123/patches/A.diff
    this-123/patches/B.diff
    this-123/patches/C.diff
    this-123/README.txt

and you want to apply only B.diff and C.diff, then you need to use
"patches/B.diff" and "patches/C.diff" for the lowest-level apply leaves.

The code was provided by Xu Cheng. Any mistakes are mine.
2016-02-01 18:37:36 +00:00
Baptiste Fontaine
a173196e32 tests: more integration tests
Closes Homebrew/homebrew#48674.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-31 16:03:36 +01:00
Dominyk Tiller
c6e0c9538f test_cmd_audit: add resource placement test 2016-01-31 00:39:29 +00:00
Baptiste Fontaine
86eb44c96c tests: more integration tests
Closes Homebrew/homebrew#48635.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-31 00:46:35 +01:00
Baptiste Fontaine
47aa71e633 tests: don't try to rm an unexisting file
This line is necessary if the test fails. If it passes the file won't
exist anymore and shouldn't be removed.
2016-01-27 23:03:44 +01:00
Baptiste Fontaine
c25e11563c tests: fix a file leak 2016-01-27 22:38:24 +01:00
Martin Afanasjew
99fd172ea8 tests: validate developer bash commands
Also change the logic a bit to iterate over the individual files per
directory, as having a directory without bash commands will otherwise
pass a literal `*.sh` to `bash -n`, causing it to fail.

Closes Homebrew/homebrew#48323.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-01-26 16:26:08 +01:00
Baptiste Fontaine
bb588df058 tests: add pkgshare audit tests
Closes Homebrew/homebrew#48435.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-25 17:19:51 +01:00
Baptiste Fontaine
d0998a4907 testing_env: needs_compat utility added
Closes Homebrew/homebrew#48302.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-25 01:26:24 +01:00
Baptiste Fontaine
7b4c43e512 tests: cmd/audit tests added 2016-01-25 01:26:24 +01:00
Martin Afanasjew
89f97295b8 tests: speed up integration test runs
While running a command from the integration tests, invoke `.result` to
trigger a save of the result set, but don't call `.format!` to avoid
(re)generating the HTML output with every run. The final output will
still be written once the main unit test run completes.

This significantly speeds up the integration tests, that take about 1/3
less time to complete when not generating the intermediate output.

Closes Homebrew/homebrew#48280.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-01-21 05:42:23 +01:00
Martin Afanasjew
274640c97a tests: use unique identifiers w/ integration tests
Commands executed during integration testing are executed in a separate
process and thus generate a new result set for each command. To avoid
that these results override each other, they need to have a unique
`command_name`. Derive this name from the test class/name and the index
of the command inside that test, resulting in identifiers like
`IntegrationCommandTests#test_prefix.1 brew --prefix`.

Also replaces `TEST_TMPDIR` in the arguments with `"@TMPDIR@"` to get a
cleaner command identifier that is independent of the temporary
directory that changes with every run.
2016-01-21 05:42:23 +01:00
Martin Afanasjew
a12c5816aa tests: remove useless filter for coverage tests
The filter for `vendor/bundle/` is useless because this directory is
located in `Homebrew/test/` and that one is already filtered. Moreover,
SimpleCov already loads the `bundler_filter` profile (that installs
basically the same filter) in its default configuration.
2016-01-21 05:42:06 +01:00
Baptiste Fontaine
5775d3b326 command: support .sh commands
Closes Homebrew/homebrew#48192.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-20 22:27:13 +01:00
Baptiste Fontaine
c1e673e19a commands: support .sh commands 2016-01-20 22:27:13 +01:00
Alex Dunn
b8547eab2c update test for Homebrew/homebrew-emacs#158
Closes Homebrew/homebrew#48131.

Signed-off-by: Alex Dunn <dunn.alex@gmail.com>
2016-01-20 11:42:36 -08:00
Alex Dunn
0cde5dd060 test: add metafiles to testball 2016-01-20 11:42:36 -08:00