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.
 
 
 
 

90 lines
2.8 KiB

  1. #URL="http://bucket.mit.edu:8080/nilmdb"
  2. URL="http://localhost/nilmdb"
  3. all: test
  4. test:
  5. ifeq ($(INSIDE_EMACS), t)
  6. @make test_trainola3
  7. else
  8. @echo 'No test suite for nilmtools. Try "make install"'
  9. endif
  10. test_pipewatch:
  11. nilmtools/pipewatch.py -t 3 "seq 10 20" "seq 20 30"
  12. test_trainola:
  13. -nilmtool -u http://bucket/nilmdb remove -s min -e max \
  14. /sharon/prep-a-matches
  15. nilmtools/trainola.py "$$(cat extras/trainola-test-param.js)"
  16. test_trainola2:
  17. -nilmtool -u http://bucket/nilmdb remove -s min -e max \
  18. /sharon/prep-a-matches
  19. nilmtools/trainola.py "$$(cat extras/trainola-test-param-2.js)"
  20. test_trainola3:
  21. -nilmtool -u "http://bucket/nilmdb" destroy -R /test/jim
  22. nilmtool -u "http://bucket/nilmdb" create /test/jim uint8_3
  23. nilmtools/trainola.py "$$(cat extras/trainola-test-param-3.js)"
  24. nilmtool -u "http://bucket/nilmdb" extract /test/jim -s min -e max
  25. test_cleanup:
  26. nilmtools/cleanup.py -e extras/cleanup.cfg
  27. nilmtools/cleanup.py extras/cleanup.cfg
  28. test_insert:
  29. nilmtools/insert.py --skip --file --dry-run /foo/bar ~/data/20130311T2100.prep1.gz ~/data/20130311T2100.prep1.gz ~/data/20130311T2200.prep1.gz
  30. test_copy:
  31. nilmtools/copy_wildcard.py -U "http://nilmdb.com/bucket/" -D /lees*
  32. /tmp/raw.dat:
  33. octave --eval 'fs = 8000;' \
  34. --eval 't = (0:fs*10)*2*pi*60/fs;' \
  35. --eval 'raw = transpose([sin(t); 0.3*sin(3*t)+sin(t)]);' \
  36. --eval 'save("-ascii","/tmp/raw.dat","raw");'
  37. test_prep: /tmp/raw.dat
  38. -nilmtool destroy -R /test/raw
  39. -nilmtool destroy -R /test/sinefit
  40. -nilmtool destroy -R /test/prep
  41. nilmtool create /test/raw float32_2
  42. nilmtool create /test/sinefit float32_3
  43. nilmtool create /test/prep float32_8
  44. nilmtool insert -s '@0' -t -r 8000 /test/raw /tmp/raw.dat
  45. nilmtools/sinefit.py -a 0.5 -c 1 -s '@0' -e '@5000000' /test/raw /test/sinefit
  46. nilmtools/prep.py -c 2 /test/raw /test/sinefit /test/prep
  47. nilmtools/prep.py -c 2 /test/raw /test/sinefit /test/prep
  48. nilmtool extract -s min -e max /test/prep | head -20
  49. test_decimate:
  50. -@nilmtool destroy /lees-compressor/no-leak/raw/4 || true
  51. -@nilmtool destroy /lees-compressor/no-leak/raw/16 || true
  52. -@nilmtool create /lees-compressor/no-leak/raw/4 float32_18 || true
  53. -@nilmtool create /lees-compressor/no-leak/raw/16 float32_18 || true
  54. time python nilmtools/decimate.py -s '2013-02-04 18:10:00' -e '2013-02-04 18:11:00' /lees-compressor/no-leak/raw/1 /lees-compressor/no-leak/raw/4
  55. python nilmtools/decimate.py -s '2013-02-04 18:10:00' -e '2013-02-04 18:11:00' /lees-compressor/no-leak/raw/4 /lees-compressor/no-leak/raw/16
  56. version:
  57. python setup.py version
  58. dist: sdist
  59. sdist:
  60. python setup.py sdist
  61. install:
  62. python setup.py install
  63. develop:
  64. python setup.py develop
  65. clean::
  66. find . -name '*pyc' | xargs rm -f
  67. rm -rf nilmtools.egg-info/ build/ MANIFEST.in
  68. gitclean::
  69. git clean -dXf
  70. .PHONY: all version dist sdist install clean gitclean test