Erik Andersen | 029011b | 2000-03-04 21:19:32 +0000 | [diff] [blame] | 1 | # ln_tests.mk - Set of tests for busybox ln |
| 2 | # ------------- |
| 3 | # Copyright (C) 2000 Karl M. Hegbloom <karlheg@debian.org> GPL |
| 4 | # |
Erik Andersen | fac10d7 | 2000-02-07 05:29:42 +0000 | [diff] [blame] | 5 | |
| 6 | # GNU `ln' |
| 7 | GLN = /bin/ln |
| 8 | # BusyBox `ln' |
| 9 | BLN = $(shell pwd)/ln |
| 10 | |
Erik Andersen | 029011b | 2000-03-04 21:19:32 +0000 | [diff] [blame] | 11 | all:: ln_tests |
| 12 | clean:: ln_clean |
| 13 | |
Erik Andersen | fac10d7 | 2000-02-07 05:29:42 +0000 | [diff] [blame] | 14 | ln_clean: |
| 15 | rm -rf ln_tests ln_*.{gnu,bb} ln |
| 16 | |
Erik Andersen | fac10d7 | 2000-02-07 05:29:42 +0000 | [diff] [blame] | 17 | ln_tests: ln_clean ln |
| 18 | @echo; |
| 19 | @echo "No output from diff means busybox ln is functioning properly."; |
| 20 | |
| 21 | @echo; |
| 22 | ${BLN} || true; |
| 23 | |
| 24 | @echo; |
| 25 | mkdir ln_tests; |
| 26 | |
| 27 | @echo; |
| 28 | cd ln_tests; \ |
| 29 | echo A file > afile; \ |
| 30 | ls -l afile > ../ln_afile_newname.gnu; \ |
| 31 | ${GLN} afile newname; \ |
| 32 | ls -l afile newname >> ../ln_afile_newname.gnu; |
| 33 | |
| 34 | @echo; |
| 35 | rm -f ln_tests/{afile,newname}; |
| 36 | |
| 37 | @echo; |
| 38 | cd ln_tests; \ |
| 39 | echo A file > afile; \ |
| 40 | ls -l afile > ../ln_afile_newname.bb; \ |
| 41 | ${BLN} afile newname; \ |
| 42 | ls -l afile newname >> ../ln_afile_newname.bb; |
| 43 | |
| 44 | @echo; |
| 45 | diff -u ln_afile_newname.gnu ln_afile_newname.bb |
| 46 | |
| 47 | @echo; |
| 48 | rm -f ln_tests/{afile,newname}; |
| 49 | |
| 50 | @echo; |
| 51 | cd ln_tests; \ |
| 52 | echo A file > afile; \ |
| 53 | ls -l afile > ../ln_s_afile_newname.gnu; \ |
| 54 | ${GLN} -s afile newname; \ |
| 55 | ls -l afile newname >> ../ln_s_afile_newname.gnu; |
| 56 | |
| 57 | @echo; |
| 58 | rm -f ln_tests/{afile,newname}; |
| 59 | |
| 60 | @echo; |
| 61 | cd ln_tests; \ |
| 62 | echo A file > afile; \ |
| 63 | ls -l afile > ../ln_s_afile_newname.bb; \ |
| 64 | ${BLN} -s afile newname; \ |
| 65 | ls -l afile newname >> ../ln_s_afile_newname.bb; |
| 66 | |
| 67 | @echo; |
| 68 | diff -u ln_s_afile_newname.gnu ln_s_afile_newname.bb |
| 69 | |
| 70 | @echo; |
| 71 | rm -f ln_tests/{afile,newname}; |