litmus_all.sh 723 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/sh
  2. # Run tests
  3. RUBYOPT=-W1 bundle exec rake
  4. if [ $? -ne 0 ] ; then
  5. echo "*** Some Tests failed"
  6. exit 1
  7. fi
  8. echo "*** Tests passed. Starting litmus"
  9. echo
  10. # Ensure fresh store directory
  11. rm -rf /tmp/dav-file-store
  12. mkdir /tmp/dav-file-store
  13. # Run litmus test
  14. bundle exec dav4rack --root /tmp/dav-file-store &
  15. # Allow time for dav4rack to get started
  16. sleep 3
  17. DAV_PID=$?
  18. if [ ! -f /tmp/litmus/litmus-0.13.tar.gz ]; then
  19. mkdir -p /tmp/litmus
  20. wget -O /tmp/litmus/litmus-0.13.tar.gz http://www.webdav.org/neon/litmus/litmus-0.13.tar.gz
  21. cd /tmp/litmus
  22. tar -xzf litmus-0.13.tar.gz
  23. cd /tmp/litmus/litmus-0.13
  24. ./configure
  25. fi
  26. cd /tmp/litmus/litmus-0.13
  27. make URL=http://localhost:3000/ check
  28. kill $DAV_PID