26 Commits

Author SHA1 Message Date
Andrew Janke
acc9a7ca85 brew test, install, update-test: add --keep-tmp option
Also enables sandbox for --interactive and --debug use of install
and test, using automatic retention.

Closes #66.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-04-18 12:23:08 -04: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
Alex Dunn
0cde5dd060 test: add metafiles to testball 2016-01-20 11:42:36 -08:00
Baptiste Fontaine
8ba0fb9fcf unnecessary calls to .select simplified
These are minor perf optimizations.

Closes Homebrew/homebrew#43028.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-08-18 00:18:22 +02:00
Xu Cheng
a5a1cc9865 fix ruby syntax warnings
Closes Homebrew/homebrew#42409.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-08-03 21:27:40 +08:00
BrewTestBot
13d544e11e Core files style updates.
Closes Homebrew/homebrew#42354.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-03 13:22:35 +01:00
Xu Cheng
33befcf312 tests: fix patching test for no-compat mode
Closes Homebrew/homebrew#41977.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-07-22 15:12:31 +08:00
Jack Nagel
8805f3ae51 Drop unnecessary requires 2014-12-28 00:03:16 -05:00
Jack Nagel
6dd242e2df Refactor patching tests 2014-12-26 20:51:43 -05:00
Jack Nagel
f14e38de2f Commit test updates that were supposed to be part of b76e26c9cf1fc805663d86b6d6d081f91f73ea18 2014-12-26 20:20:10 -05:00
Jack Nagel
56aec9494c Fix filename case 2014-10-26 23:17:13 -05:00
Jack Nagel
3f12ddbccd Decouple DATA patches from the executing script 2014-07-29 16:22:06 -05:00
Jack Nagel
e0c9717717 Store test patches in constants 2014-07-29 16:06:06 -05:00
Jack Nagel
88165986e8 Clear cache after patching tests 2014-06-23 22:11:39 -05:00
Jack Nagel
4b6abc7da2 Use assert_includes 2014-06-18 20:34:10 -05:00
Jack Nagel
982e9239b8 Use a custom test class so we can avoid monkeypatching 2014-06-18 20:32:51 -05:00
Jack Nagel
a50f09c343 Remove an extra slash in file:// URLs in tests 2014-06-12 17:58:12 -05:00
Jack Nagel
0505582507 Rename TEST_FOLDER to TEST_DIRECTORY 2014-06-10 21:49:41 -05:00
Jack Nagel
c7685d2b70 Extract constant strings 2014-06-10 20:24:07 -05:00
Jack Nagel
665b14c4a4 Enable new patch implementation with compatibility layer 2014-03-13 21:35:41 -05:00
Jack Nagel
34bcb10b54 test_patching: inline test classes 2013-04-07 20:59:51 -05:00
Jack Nagel
93f8c71e21 tests: clean up whitespace
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 22:47:34 -05:00
Jack Nagel
90dbb8a141 Prune some requires from test files
testing_env already requires utils; set up the ARGV and ENV extensions
there as well.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 22:47:34 -05:00
Jack Nagel
af7bf47e31 tests: add utility method to quell output
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-18 15:16:00 -05:00
Adam Vandenberg
1f82fe4dc7 Move TestBall definition to separate file. 2010-04-06 08:27:11 -07:00
Adam Vandenberg
fd453107c6 Add tests for patching. 2010-04-06 08:27:10 -07:00