10755 Commits

Author SHA1 Message Date
Martin Afanasjew
93dad81d95 bin/bash: don't require executable command files
Commands implemented in shell (bash) are supposed to be sourced from
`bin/bash` instead of being executed directly. Consequently, don't
expect the implementation files to be executable.
2016-01-26 16:26:07 +01:00
Mike McQuaid
c2a928eb51 Add Haskell::Cabal#cabal_clean_lib back to compat.
We shouldn't have removed this DSL method without a compat fallback.

Closes Homebrew/homebrew#48479.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-01-26 11:49:15 +00:00
Mike McQuaid
21924396f0 update-report: don't duplicate "already updated".
This would be displayed more than once when verbose output was enabled.

Closes Homebrew/homebrew#48469.
2016-01-26 09:09:20 +00:00
Xu Cheng
9d216a53f8 bottle: clear tab cache
We cached the tab file content during formula loading.
Let's discard them, so we can read tab content after relocation
2016-01-26 15:52:45 +08:00
Xu Cheng
1f2ca73ac1 bottle: ensure to restore relocation on text files 2016-01-26 15:50:17 +08:00
Mike McQuaid
a59c1ae6cb os/mac: hide GCC warnings in config output. 2016-01-25 20:03:13 +00:00
Mike McQuaid
ca8bb1a33c update-bash: release to non-developers.
Allow people to run this command (so we can ask people to test it)
without having to set `HOMEBREW_DEVELOPER`.

Closes Homebrew/homebrew#48260.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-01-25 16:33:52 +00: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
e1875b7a43 audit: avoid false positive pkgshare problems 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
Baptiste Fontaine
e0c7b38aa7 audit: warn once about deprecated *Formula classes
GithubGistFormula inherits from ScriptFileFormula so a problem is added
for each one instead of the first only.
2016-01-25 01:26:24 +01:00
Marcelo Boeira
3d9bc57fea doc: Fix some typos at Formula Cookbook
Closes Homebrew/homebrew#48342.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-01-22 18:05:11 +00:00
Philip May
ead10917d6 Add directions for subscribing to mailing list
Closes Homebrew/homebrew#48369.

Signed-off-by: Tim D. Smith <git@tim-smith.us>
2016-01-22 08:05:55 -08:00
Tim D. Smith
fc704a9b44 Announce new mailing list address
Closes Homebrew/homebrew#48304.
2016-01-21 09:37:51 -08:00
Xu Cheng
e3687a5ba2 update-bash: use array for QUIET_ARGS
Per @UniqMartin's advice, avoid disabling shellcheck rules.

Closes Homebrew/homebrew#48286.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-01-21 21:14:55 +08:00
Xu Cheng
e9096b0701 update-bash: explicitly tag local variables 2016-01-21 21:14:55 +08:00
Xu Cheng
eb54a6b5d5 update-bash: handle option flags like -vd
Per @UniqMartin's advice, the original code will fail to handle flags
like `-vd`, because once a case is handled, no other cases are evaluate.
2016-01-21 21:14:55 +08:00
Xu Cheng
58e0249609 update-bash: don't stash for --simulate-from-current-branch
When invoking --simulate-from-current-branch, we shouldn't do any file
manipulation.
2016-01-21 21:14:55 +08:00
Xu Cheng
f7c276a0be update-bash: fix revision variable setting
* only set HOMEBREW_UPDATE_BEFORE inside pull instead of fetch.
* fix HOMEBREW_UPDATE_BEFORE/AFTER variable settings. They should be set
  to INITIAL_REVISION and CURRENT_REVISION correspondingly.
* avoid unnecessary duplicated shellout.
* remove unused variable.
2016-01-21 21:14:55 +08:00
Xu Cheng
2f52ca9ded update-bash: kill all of subprocess on interrupt when fetching 2016-01-21 21:14:55 +08:00
Xu Cheng
2d84fc56fe update-bash: improve reset_on_interrupt
* make sure exit after reset.
* more wide guardian range. We should trap reset_on_interrupt as soon as
  we are about to change any files.
* check INITIAL_BRANCH against UPSTREAM_BRANCH
2016-01-21 21:14:55 +08:00
Xu Cheng
fafe8f0f53 update: implement rename_taps_dir_if_necessary in bash
rename_taps_dir_if_necessary must be performed before actual update.
Otherwise, it will report that `HOMEBREW_UPDAET_BEFORE<REPO_VAR>` is
unset.
2016-01-21 21:14:55 +08:00
Xu Cheng
ca59d6fbee update: improve repo_var
* use HOMEBREW_REPOSITORY instead of HOMEBREW_PREFIX
* better performance:
  * update-bash: avoid shellout
  * update-report: use strip_prefix and tr
* more robust:
  * explicitly handle the case when repo is HOMEBREW_REPOSITORY to avoid
    to handle the trailing backslash.
  * handle both lower case and upper case when stripping non alpha and
    digital characters.
2016-01-21 21:14:55 +08:00
Xu Cheng
9cd2658073 update-bash: avoid shellout for stripping prefix 2016-01-21 21:14:55 +08:00
Xu Cheng
83e1373376 update-bash: use odie and chdir from bin/brew 2016-01-21 21:14:55 +08:00
Xu Cheng
bc78f81032 update-bash: always use [[ 2016-01-21 21:14:55 +08:00
Xu Cheng
826f65cc2f update-report: skip non git tap 2016-01-21 21:14:55 +08:00
Xu Cheng
bb5cf70a02 update-bash: fix incorrect argument parsing 2016-01-21 21:14:55 +08: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
5786f36b62 tests: add --only=<test>[/<method>] flag
Simplify running a single test (or even a single method from a single
test), which is useful when developing or debugging a test. Instead of
`brew test TEST=test_diagnostic.rb TESTOPTS=--name=test_check_DYLD_vars`
it is now possible to run `brew tests --only=diagnostic/check_DYLD_vars`
to get the same effect. Similarly, `brew tests --only=diagnostic` maps
to `brew test TEST=test_diagnostic.rb`.

Closes Homebrew/homebrew#48279.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-01-21 05:42:06 +01:00
Martin Afanasjew
0d1e72f55f tests: allow passing --seed <number>
This parameter is printed by every `brew tests` run and feeding it back
into the test suite allows to get an identical run. Make it easier to
do that by accepting the argument as it is printed during `brew tests`.

This requires a slight adjustment to named-argument passing as the
number that follows `--seed` is also seen as a named argument, but we
usually only want to pass `TEST=<something>` and `TESTOPTS=<something>`.
2016-01-21 05:42:06 +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
Alex Dunn
37e61aed62 build#install: install metafiles in buildpath
This came up in https://github.com/Homebrew/homebrew-emacs/pull/158#issuecomment-172031003;  `install_metafiles` is passed the current directory, which can be changed during installation by `Dir.chdir`.

There may be cases where the metafiles are in a subdirectory, but my
guess is those are rare and this is brittle and undocumented behavior
anyway.
2016-01-20 11:42:36 -08:00
Baptiste Fontaine
f9fd251605 tap-readme: fix for Ruby 1.8
Closes Homebrew/homebrew#48281.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-20 20:15:34 +01:00
Baptiste Fontaine
da500eec6a tests: ExternalPatch test added 2016-01-20 20:15:34 +01:00
Baptiste Fontaine
343f431c46 tests: exceptions tests added 2016-01-20 20:15:34 +01:00
Baptiste Fontaine
4ba4812d1d tests: tap-readme integration test added 2016-01-20 20:15:34 +01:00
Baptiste Fontaine
36c734b392 tests: cmd/edit & cmd/info tests added 2016-01-20 20:15:34 +01:00
Baptiste Fontaine
861910b85f sh: flush stdout before executing the shell
Closes Homebrew/homebrew#48268.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-20 11:37:42 +01:00
Martin Afanasjew
026363e1ed diagnostic: fix autoconf check
Xcode can only provide autotools if it is installed, thus check that
first. Skipping this check will try to compare a `nil` Xcode version to
4.3, the first version of Xcode to not provide autotools.

Fixes Homebrew/homebrew#48208.

Closes Homebrew/homebrew#48278.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-01-20 10:23:21 +01:00
Martin Afanasjew
4ffe25adc8 doc: move images into their own directory
By doing this, make the GitHub directory listing for the documentation
directory more useful and less cluttered.

Closes Homebrew/homebrew#48219.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-01-20 09:44:33 +01:00
Martin Afanasjew
ca676d4d6f doc: remove unused images
These files were imported from the wiki, but they are not referenced by
any of the other documentation files.
2016-01-20 09:44:33 +01:00
Xu Cheng
2d65caaee9 bin/brew: use not operator inside [[ 2016-01-20 16:04:02 +08:00
Xu Cheng
318ce388d7 bin/brew: use full path for xcode-select
Closes Homebrew/homebrew#48197.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-01-20 13:55:07 +08:00