test: turn USR_BIN_TIME into a lazy prerequisite
authorJunio C Hamano <gitster@pobox.com>
Mon, 9 Jun 2014 20:54:25 +0000 (13:54 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 Jun 2014 21:18:55 +0000 (14:18 -0700)
Two test scripts (t3302 and t3419) had copy & paste code to set
USR_BIN_TIME prerequisite. Use the test_lazy_prereq helper to define
them in the common t/test-lib.sh.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3302-notes-index-expensive.sh
t/t3419-rebase-patch-id.sh
t/test-lib.sh
index e35d7811acc60415e38e58866b5488938d0372a4..dc706abe5c616a6f212a0cec4a74afcce0e11c9b 100755 (executable)
@@ -9,7 +9,6 @@ test_description='Test commit notes index (expensive!)'
 
 test_set_prereq NOT_EXPENSIVE
 test -n "$GIT_NOTES_TIMING_TESTS" && test_set_prereq EXPENSIVE
-test -x /usr/bin/time && test_set_prereq USR_BIN_TIME
 
 create_repo () {
        number_of_commits=$1
index e70ac10a0cdbcd112b7b3c3e74aa89b09d46d1df..08e30b30f40e767c19f3b074a19840f07944d063 100755 (executable)
@@ -6,7 +6,6 @@ test_description='git rebase - test patch id computation'
 
 test_set_prereq NOT_EXPENSIVE
 test -n "$GIT_PATCHID_TIMING_TESTS" && test_set_prereq EXPENSIVE
-test -x /usr/bin/time && test_set_prereq USR_BIN_TIME
 
 count()
 {
index d70d05e1cb60951df221069d75f460a46b759096..884c57c30bfa60ac55cce020828b025b75a8a26c 100644 (file)
@@ -859,6 +859,10 @@ test_lazy_prereq EXPENSIVE '
        test -n "$GIT_TEST_LONG"
 '
 
+test_lazy_prereq USR_BIN_TIME '
+       test -x /usr/bin/time
+'
+
 # When the tests are run as root, permission tests will report that
 # things are writable when they shouldn't be.
 test -w / || test_set_prereq SANITY