t/test-lib: make sure Git has already been built
When tests were run without building git, they stopped with:
    .: 54: Can't open /path/to/git/source/t/../GIT-BUILD-OPTIONS
Move the check that makes sure that git has already been built from
t0000 to test-lib, so that any test will do so before it runs.
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
			
			
				maint
			
			
		
							parent
							
								
									5805853f22
								
							
						
					
					
						commit
						2006f0adae
					
				|  | @ -18,16 +18,6 @@ swapping compression and hashing order, the person who is making the | ||||||
| modification *should* take notice and update the test vectors here. | modification *should* take notice and update the test vectors here. | ||||||
| ' | ' | ||||||
|  |  | ||||||
| ################################################################ |  | ||||||
| # It appears that people try to run tests without building... |  | ||||||
|  |  | ||||||
| ../git >/dev/null |  | ||||||
| if test $? != 1 |  | ||||||
| then |  | ||||||
| 	echo >&2 'You do not seem to have built git yet.' |  | ||||||
| 	exit 1 |  | ||||||
| fi |  | ||||||
|  |  | ||||||
| . ./test-lib.sh | . ./test-lib.sh | ||||||
|  |  | ||||||
| ################################################################ | ################################################################ | ||||||
|  |  | ||||||
|  | @ -51,6 +51,15 @@ then | ||||||
| fi | fi | ||||||
| GIT_BUILD_DIR="$TEST_DIRECTORY"/.. | GIT_BUILD_DIR="$TEST_DIRECTORY"/.. | ||||||
|  |  | ||||||
|  | ################################################################ | ||||||
|  | # It appears that people try to run tests without building... | ||||||
|  | "$GIT_BUILD_DIR/git" >/dev/null | ||||||
|  | if test $? != 1 | ||||||
|  | then | ||||||
|  | 	echo >&2 'error: you do not seem to have built git yet.' | ||||||
|  | 	exit 1 | ||||||
|  | fi | ||||||
|  |  | ||||||
| . "$GIT_BUILD_DIR"/GIT-BUILD-OPTIONS | . "$GIT_BUILD_DIR"/GIT-BUILD-OPTIONS | ||||||
| export PERL_PATH SHELL_PATH | export PERL_PATH SHELL_PATH | ||||||
|  |  | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Ramkumar Ramachandra
						Ramkumar Ramachandra