A utility for downloading and verifying FreeBSD releases and snapshots
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

11 lines
1.4 KiB

  1. test:
  2. (ls snapaid.sh mksnapidx.awk fixtures/*) | entr sh -c 'set -e; awk -f mksnapidx.awk -v DO_TESTS=1; export SNAPAID_SH=source; . ./snapaid.sh; for i in fixtures/*.txt; do minimizeemail < "$$i" | awk -f mksnapidx.awk > "$${i%.txt}".test.out; if ! cmp "$${i%.txt}".test.out "$${i%txt}snapidx.out"; then diff -u "$${i%.txt}".test.out "$${i%txt}snapidx.out"; exit 1; else echo "$$i ok"; fi; done; awk "{ print \$$9 }" fixtures/*.test.out | grep -v ^https'
  3. # snapaid.sh test is a bit slow. Make it's own special target.
  4. all-tests:
  5. (ls snapaid.sh mksnapidx.awk fixtures/*) | entr sh -c 'set -e; awk -f mksnapidx.awk -v DO_TESTS=1; bash snapaid.sh test; export SNAPAID_SH=source; . ./snapaid.sh; for i in fixtures/*.txt; do minimizeemail < "$$i" | awk -f mksnapidx.awk > "$${i%.txt}".test.out; if ! cmp "$${i%.txt}".test.out "$${i%txt}snapidx.out"; then diff -u "$${i%.txt}".test.out "$${i%txt}snapidx.out"; exit 1; else echo "$$i ok"; fi; done; awk "{ print \$$9 }" fixtures/*.test.out | grep -v ^https'
  6. # example: make test-file FNAME=fixtures/11.4-stable.txt
  7. test-file:
  8. (ls mksnapidx.awk $(FNAME) ) | entr sh -c 'set -e; export SNAPAID_SH=source; . ./snapaid.sh; for i in $(FNAME); do minimizeemail < "$$i" | awk -f mksnapidx.awk > "$${i%.txt}".test.out; if ! cmp "$${i%.txt}".test.out "$${i%txt}snapidx.out"; then diff -u "$${i%.txt}".test.out "$${i%txt}snapidx.out"; exit 1; else echo "$$i ok"; fi; done'