Makefile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. TESTS = t1 t2 t3 t4 t5 t6 t7
  2. TESTS2 = c1 c2 c3
  3. #SERVER=quack
  4. SERVER=lalo-office.boston.ximian.com
  5. all: rtest.exe ctest.exe test
  6. rtest.exe: rtest.cs
  7. mcs rtest.cs
  8. ctest.exe: ctest.cs
  9. mcs ctest.cs
  10. copy:
  11. for i in $(TESTS) $(TESTS2); do cp $$i.aspx /q/web; done
  12. test: local compare
  13. compare:
  14. @for i in $(TESTS) $(TESTS2); do \
  15. if cmp $$i.expected $$i.result; then echo OK; else echo FAILED; exit 1; fi; \
  16. if test -f $$i.oexpected; then \
  17. if cmp $$i.oexpected $$i.oresult; then echo OK; else echo FAILED; exit 1; fi; fi \
  18. done
  19. local:
  20. @for i in $(TESTS); do \
  21. echo running test $$i; \
  22. mono rtest.exe localhost 8080 /$$i.aspx > $$i.result; \
  23. mono ctest.exe localhost 8080 /$$i.aspx > $$i.oresult; \
  24. done
  25. @for i in $(TESTS2); do \
  26. echo running test $$i; \
  27. mono rtest.exe -header Cache-Control: localhost 8080 /$$i.aspx > $$i.result; \
  28. done
  29. tw:
  30. @for i in $(TESTS); do \
  31. echo running test $$i; \
  32. mono rtest.exe $(SERVER) 80 /test/$$i.aspx > $$i.expected; \
  33. mono ctest.exe $(SERVER) 80 /test/$$i.aspx > $$i.oexpected; \
  34. done
  35. @for i in $(TESTS2); do \
  36. echo running test $$i; \
  37. mono rtest.exe -header Cache-Control: $(SERVER) 80 /test/$$i.aspx > $$i.expected; \
  38. done