mirror of
https://github.com/textmate/textmate.git
synced 2026-01-21 04:38:13 -05:00
Introduce test targets that always run
This means having a test file open (in TextMate) and using ⌘B, the test will always run, even if it has previously succeeded and none of the test’s dependencies have been updated.
This commit is contained in:
@@ -30,7 +30,7 @@ fileType = 'source.c++'
|
||||
|
||||
[ tests/*.{cc,mm} ]
|
||||
scopeAttributes = 'attr.test.cxxtest'
|
||||
TM_NINJA_TARGET = '${TM_FILEPATH/^.*?([^\/]*)\/tests\/.*$/$1/}'
|
||||
TM_NINJA_TARGET = '${TM_FILEPATH/^.*?([^\/]*)\/tests\/.*$/$1\/test/}'
|
||||
|
||||
[ tests/t_*.mm ]
|
||||
GUI_TESTS = '${TM_FILENAME/^t_(.*)\.mm$/$1/}'
|
||||
|
||||
@@ -271,10 +271,12 @@ def tests(target)
|
||||
res << " RAVE_FLAGS = #{fws} #{libs}\n"
|
||||
|
||||
res << "build #{dst}.run: run_test #{dst}\n"
|
||||
res << "build #{dst}.always-run: always_run_test #{dst}\n"
|
||||
res << "build #{dst}.coerce: skip_test #{dst}\n"
|
||||
res << " seal = #{dst}.run\n"
|
||||
|
||||
res << "build #{target[:name]}: phony #{dst}.run\n"
|
||||
res << "build #{target[:name]}/test: phony #{dst}.always-run\n"
|
||||
res << "build #{target[:name]}/coerce: phony #{dst}.coerce\n"
|
||||
|
||||
target[:test] = "#{dst}.run"
|
||||
@@ -697,6 +699,10 @@ rule run_test
|
||||
command = $in && touch $out
|
||||
description = Run test ‘$in’…
|
||||
|
||||
rule always_run_test
|
||||
command = $in
|
||||
description = Run test ‘$in’…
|
||||
|
||||
rule skip_test
|
||||
command = touch "$seal"
|
||||
description = Skip test ‘$in’…
|
||||
|
||||
Reference in New Issue
Block a user