aboutsummaryrefslogtreecommitdiffstats
path: root/Library
AgeCommit message (Collapse)Author
2016-01-27tests: don't try to rm an unexisting fileBaptiste Fontaine
This line is necessary if the test fails. If it passes the file won't exist anymore and shouldn't be removed.
2016-01-27tests: fix a file leakBaptiste Fontaine
2016-01-27diagnostic: speed up check for outdated HomebrewMartin Afanasjew
Determine the age of the local `HEAD` first and only if it is older than 24 hours proceed with the much more expensive `git ls-remote` to check if there are any new upstream commits (there usually will be). This keeps the overall logic unaltered, but significantly speeds up the check for users that have recently updated (still slow for all others). Closes Homebrew/homebrew#48499. Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-01-27allow PYTHONPATH to override Homebrew site-packagesTim D. Smith
2016-01-27config: fail when HOMEBREW_BREW_FILE is unset.Mike McQuaid
Not sure why this is happening (beyond the Chef cookbook stupidly deciding to not call through `bin/brew`) but fail and print a scary looking error to hope to point people in the right direction. Closes Homebrew/homebrew#48261. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-01-27update-bash: fully resolve Git's path in hash.Mike McQuaid
Otherwise Bash can cache a relative PATH and then get upset when it changes directory and cannot find it any more. Closes Homebrew/homebrew#48493. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-01-26tests: validate developer bash commandsMartin Afanasjew
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-26bin/brew: put commands into 'homebrew-' namespaceMartin Afanasjew
This should help to avoid collisions with external commands and other shell functions in the future and is closer to what we do in Ruby, where commands are namespaced by being methods of the `Homebrew` module.
2016-01-26brew.rb: don't re-export for external commandsMartin Afanasjew
`bin/brew` already sets up a bunch of environment variables. There's no need to re-export them for external commands. (`HOMEBREW_LIBRARY_PATH` and `HOMEBREW_CACHE` continue to be determined later in the Ruby code.)
2016-01-26update-bash: stop handling command name argumentMartin Afanasjew
2016-01-26update-bash: discourage direct useMartin Afanasjew
Remove the executable bit from the file to make it clear it is not supposed to be executed directly. This should make the shebang line and the early check also unnecessary.
2016-01-26Add Haskell::Cabal#cabal_clean_lib back to compat.Mike McQuaid
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-26update-report: don't duplicate "already updated".Mike McQuaid
This would be displayed more than once when verbose output was enabled. Closes Homebrew/homebrew#48469.
2016-01-26bottle: clear tab cacheXu Cheng
We cached the tab file content during formula loading. Let's discard them, so we can read tab content after relocation
2016-01-26bottle: ensure to restore relocation on text filesXu Cheng
2016-01-25os/mac: hide GCC warnings in `config` output.Mike McQuaid
2016-01-25update-bash: release to non-developers.Mike McQuaid
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-25tests: add pkgshare audit testsBaptiste Fontaine
Closes Homebrew/homebrew#48435. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-25audit: avoid false positive pkgshare problemsBaptiste Fontaine
2016-01-25testing_env: needs_compat utility addedBaptiste Fontaine
Closes Homebrew/homebrew#48302. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-25tests: cmd/audit tests addedBaptiste Fontaine
2016-01-25audit: warn once about deprecated *Formula classesBaptiste Fontaine
GithubGistFormula inherits from ScriptFileFormula so a problem is added for each one instead of the first only.
2016-01-21update-bash: use array for QUIET_ARGSXu Cheng
Per @UniqMartin's advice, avoid disabling shellcheck rules. Closes Homebrew/homebrew#48286. Signed-off-by: Xu Cheng <xucheng@me.com>
2016-01-21update-bash: explicitly tag local variablesXu Cheng
2016-01-21update-bash: handle option flags like -vdXu Cheng
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-21update-bash: don't stash for --simulate-from-current-branchXu Cheng
When invoking --simulate-from-current-branch, we shouldn't do any file manipulation.
2016-01-21update-bash: fix revision variable settingXu Cheng
* 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-21update-bash: kill all of subprocess on interrupt when fetchingXu Cheng
2016-01-21update-bash: improve reset_on_interruptXu Cheng
* 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-21update: implement rename_taps_dir_if_necessary in bashXu Cheng
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-21update: improve repo_varXu Cheng
* 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-21update-bash: avoid shellout for stripping prefixXu Cheng
2016-01-21update-bash: use odie and chdir from bin/brewXu Cheng
2016-01-21update-bash: always use `[[`Xu Cheng
2016-01-21update-report: skip non git tapXu Cheng
2016-01-21update-bash: fix incorrect argument parsingXu Cheng
2016-01-21tests: speed up integration test runsMartin Afanasjew
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-21tests: use unique identifiers w/ integration testsMartin Afanasjew
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-21tests: add --only=<test>[/<method>] flagMartin Afanasjew
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-21tests: allow passing --seed <number>Martin Afanasjew
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-21tests: remove useless filter for coverage testsMartin Afanasjew
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-20command: support .sh commandsBaptiste Fontaine
Closes Homebrew/homebrew#48192. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-20commands: support .sh commandsBaptiste Fontaine
2016-01-20update test for Homebrew/homebrew-emacs#158Alex Dunn
Closes Homebrew/homebrew#48131. Signed-off-by: Alex Dunn <dunn.alex@gmail.com>
2016-01-20test: add metafiles to testballAlex Dunn
2016-01-20build#install: install metafiles in buildpathAlex Dunn
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-20tap-readme: fix for Ruby 1.8Baptiste Fontaine
Closes Homebrew/homebrew#48281. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-20tests: ExternalPatch test addedBaptiste Fontaine
2016-01-20tests: exceptions tests addedBaptiste Fontaine
2016-01-20tests: tap-readme integration test addedBaptiste Fontaine